lib/contrast/agent.rb in contrast-agent-3.13.2 vs lib/contrast/agent.rb in contrast-agent-3.14.0

- old
+ new

@@ -1,52 +1,52 @@ # Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true -cs__scoped_require 'English' +require 'English' # This must precede other Contrast C extensions -cs__scoped_require 'cs__common/cs__common' +require 'cs__common/cs__common' # This must precede any patching we do as we log patches and we shouldn't cause # requires to happen during that process. -cs__scoped_require 'contrast/components/logger' +require 'contrast/components/logger' # defining instrumentation, this must precede core extensions # because they need to register their patches -cs__scoped_require 'contrast/agent/patching/policy/patcher' -cs__scoped_require 'contrast/agent/patching/policy/patch' +require 'contrast/agent/patching/policy/patcher' +require 'contrast/agent/patching/policy/patch' # core extensions -cs__scoped_require 'contrast/extension/assess' -cs__scoped_require 'contrast/extension/delegator' -cs__scoped_require 'contrast/extension/inventory' -cs__scoped_require 'contrast/extension/module' -cs__scoped_require 'contrast/extension/protect' -cs__scoped_require 'contrast/extension/protect/kernel' +require 'contrast/extension/assess' +require 'contrast/extension/delegator' +require 'contrast/extension/inventory' +require 'contrast/extension/module' +require 'contrast/extension/protect' +require 'contrast/extension/protect/kernel' -cs__scoped_require 'contrast/utils/object_share' -cs__scoped_require 'contrast/utils/boolean_util' -cs__scoped_require 'contrast/utils/string_utils' -cs__scoped_require 'contrast/utils/io_util' -cs__scoped_require 'contrast/utils/os' +require 'contrast/utils/object_share' +require 'contrast/utils/boolean_util' +require 'contrast/utils/string_utils' +require 'contrast/utils/io_util' +require 'contrast/utils/os' -cs__scoped_require 'contrast/common_agent_configuration' +require 'contrast/common_agent_configuration' -cs__scoped_require 'contrast/utils/hash_digest' -cs__scoped_require 'contrast/utils/invalid_configuration_util' +require 'contrast/utils/hash_digest' +require 'contrast/utils/invalid_configuration_util' # scoping -cs__scoped_require 'contrast/agent/scope' +require 'contrast/agent/scope' -cs__scoped_require 'contrast/utils/thread_tracker' +require 'contrast/utils/thread_tracker' # Framework support -cs__scoped_require 'contrast/framework/manager' +require 'contrast/framework/manager' # Communication to SR -cs__scoped_require 'contrast/api/communication' +require 'contrast/api/communication' -cs__scoped_require 'contrast/agent/thread_watcher' +require 'contrast/agent/thread_watcher' module Contrast # Top namespace of the Agent section. Holds tracking contexts that will be # accessed throughout the Agent. module Agent @@ -65,41 +65,41 @@ @_thread_watcher ||= Contrast::Agent::ThreadWatcher.new end end end -cs__scoped_require 'contrast/api' +require 'contrast/api' -cs__scoped_require 'contrast/utils/resource_loader' -cs__scoped_require 'contrast/utils/duck_utils' -cs__scoped_require 'contrast/agent/tracepoint_hook' -cs__scoped_require 'contrast/agent/at_exit_hook' +require 'contrast/utils/resource_loader' +require 'contrast/utils/duck_utils' +require 'contrast/agent/tracepoint_hook' +require 'contrast/agent/at_exit_hook' # communication with contrast service -cs__scoped_require 'contrast/agent/exclusion_matcher' +require 'contrast/agent/exclusion_matcher' # threads that handle contrast scope -cs__scoped_require 'contrast/agent/thread' +require 'contrast/agent/thread' # keep track of attacks -cs__scoped_require 'contrast/agent/request_context' +require 'contrast/agent/request_context' -cs__scoped_require 'contrast/agent/assess' +require 'contrast/agent/assess' # protect rules -cs__scoped_require 'contrast/agent/protect/rule' +require 'contrast/agent/protect/rule' # application libraries -cs__scoped_require 'contrast/utils/gemfile_reader' +require 'contrast/utils/gemfile_reader' # rack event monitoring -cs__scoped_require 'contrast/agent/middleware' +require 'contrast/agent/middleware' # TODO: RUBY-919 # Refactor to use Contrast::Framework::Manager # Contrast::Framework::Manager.before_load_patches! if defined?(::Rails) - cs__scoped_require 'contrast/framework/rails/patch/support' - cs__scoped_require 'contrast/framework/rails/patch/rails_application_configuration' + require 'contrast/framework/rails/patch/support' + require 'contrast/framework/rails/patch/rails_application_configuration' Contrast::Framework::Rails::Patch::RailsApplicationConfiguration.instrument - cs__scoped_require 'contrast/agent/railtie' if ::Rails::VERSION::MAJOR.to_i >= 3 + require 'contrast/agent/railtie' if ::Rails::VERSION::MAJOR.to_i >= 3 end