contrast-agent 3.12.2 → 3.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dockerignore +0 -1
- data/.gitignore +1 -1
- data/.simplecov +1 -1
- data/Rakefile +31 -0
- data/exe/contrast_service +1 -7
- data/ext/build_funchook.rb +0 -2
- data/ext/cs__assess_active_record_named/cs__active_record_named.c +8 -7
- data/ext/cs__assess_array/cs__assess_array.c +6 -5
- data/ext/cs__assess_basic_object/cs__assess_basic_object.c +5 -5
- data/ext/cs__assess_fiber_track/cs__assess_fiber_track.c +4 -9
- data/ext/cs__assess_fiber_track/cs__assess_fiber_track.h +0 -1
- data/ext/cs__assess_hash/cs__assess_hash.c +18 -17
- data/ext/cs__assess_hash/cs__assess_hash.h +2 -1
- data/ext/cs__assess_kernel/cs__assess_kernel.c +7 -8
- data/ext/cs__assess_marshal_module/cs__assess_marshal_module.c +18 -16
- data/ext/cs__assess_marshal_module/cs__assess_marshal_module.h +1 -0
- data/ext/cs__assess_module/cs__assess_module.c +6 -6
- data/ext/cs__assess_regexp/cs__assess_regexp.c +4 -4
- data/ext/cs__assess_string/cs__assess_string.c +31 -16
- data/ext/cs__assess_string/cs__assess_string.h +6 -1
- data/ext/cs__assess_string_interpolation26/cs__assess_string_interpolation26.c +4 -7
- data/ext/cs__assess_yield_track/cs__assess_yield_track.c +3 -7
- data/ext/cs__assess_yield_track/cs__assess_yield_track.h +0 -1
- data/ext/cs__common/cs__common.c +63 -30
- data/ext/cs__common/cs__common.h +19 -21
- data/ext/cs__common/extconf.rb +0 -14
- data/ext/cs__contrast_patch/cs__contrast_patch.c +27 -25
- data/ext/cs__contrast_patch/cs__contrast_patch.h +5 -7
- data/ext/cs__protect_kernel/cs__protect_kernel.c +11 -12
- data/ext/cs__protect_kernel/cs__protect_kernel.h +2 -2
- data/ext/extconf_common.rb +0 -28
- data/lib/contrast-agent.rb +1 -1
- data/lib/contrast.rb +15 -23
- data/lib/contrast/agent.rb +51 -39
- data/lib/contrast/agent/assess.rb +12 -12
- data/lib/contrast/agent/assess/contrast_event.rb +40 -185
- data/lib/contrast/agent/assess/events/event_factory.rb +2 -2
- data/lib/contrast/agent/assess/events/source_event.rb +5 -9
- data/lib/contrast/agent/assess/finalizers/freeze.rb +15 -0
- data/lib/contrast/agent/assess/finalizers/hash.rb +97 -0
- data/lib/contrast/agent/assess/policy/dynamic_source_factory.rb +2 -2
- data/lib/contrast/agent/assess/policy/patcher.rb +6 -6
- data/lib/contrast/agent/assess/policy/policy.rb +9 -11
- data/lib/contrast/agent/assess/policy/policy_node.rb +5 -99
- data/lib/contrast/agent/assess/policy/policy_scanner.rb +2 -3
- data/lib/contrast/agent/assess/policy/preshift.rb +13 -7
- data/lib/contrast/agent/assess/policy/propagation_method.rb +64 -45
- data/lib/contrast/agent/assess/policy/propagation_node.rb +6 -2
- data/lib/contrast/agent/assess/policy/propagator.rb +18 -18
- data/lib/contrast/agent/assess/policy/propagator/append.rb +8 -5
- data/lib/contrast/agent/assess/policy/propagator/base.rb +2 -2
- data/lib/contrast/agent/assess/policy/propagator/center.rb +9 -5
- data/lib/contrast/agent/assess/policy/propagator/custom.rb +1 -1
- data/lib/contrast/agent/assess/policy/propagator/database_write.rb +6 -4
- data/lib/contrast/agent/assess/policy/propagator/insert.rb +7 -7
- data/lib/contrast/agent/assess/policy/propagator/keep.rb +4 -1
- data/lib/contrast/agent/assess/policy/propagator/match_data.rb +18 -9
- data/lib/contrast/agent/assess/policy/propagator/next.rb +7 -5
- data/lib/contrast/agent/assess/policy/propagator/prepend.rb +13 -5
- data/lib/contrast/agent/assess/policy/propagator/remove.rb +14 -15
- data/lib/contrast/agent/assess/policy/propagator/replace.rb +5 -2
- data/lib/contrast/agent/assess/policy/propagator/reverse.rb +7 -5
- data/lib/contrast/agent/assess/policy/propagator/select.rb +19 -11
- data/lib/contrast/agent/assess/policy/propagator/splat.rb +14 -8
- data/lib/contrast/agent/assess/policy/propagator/split.rb +19 -13
- data/lib/contrast/agent/assess/policy/propagator/substitution.rb +36 -26
- data/lib/contrast/agent/assess/policy/propagator/trim.rb +17 -15
- data/lib/contrast/agent/assess/policy/rewriter_patch.rb +5 -5
- data/lib/contrast/agent/assess/policy/source_method.rb +90 -73
- data/lib/contrast/agent/assess/policy/source_validation/cross_site_validator.rb +1 -1
- data/lib/contrast/agent/assess/policy/source_validation/source_validation.rb +1 -1
- data/lib/contrast/agent/assess/policy/trigger/reflected_xss.rb +16 -11
- data/lib/contrast/agent/assess/policy/trigger/xpath.rb +2 -2
- data/lib/contrast/agent/assess/policy/trigger_method.rb +41 -26
- data/lib/contrast/agent/assess/policy/trigger_node.rb +30 -17
- data/lib/contrast/agent/assess/policy/trigger_validation/ssrf_validator.rb +2 -1
- data/lib/contrast/agent/assess/policy/trigger_validation/trigger_validation.rb +2 -2
- data/lib/contrast/agent/assess/properties.rb +15 -383
- data/lib/contrast/agent/assess/property/evented.rb +78 -0
- data/lib/contrast/agent/assess/property/tagged.rb +339 -0
- data/lib/contrast/agent/assess/property/updated.rb +136 -0
- data/lib/contrast/agent/assess/rule.rb +2 -2
- data/lib/contrast/agent/assess/rule/base.rb +3 -4
- data/lib/contrast/agent/assess/rule/provider.rb +3 -3
- data/lib/contrast/agent/assess/rule/provider/hardcoded_password.rb +1 -1
- data/lib/contrast/agent/assess/rule/provider/hardcoded_value_rule.rb +4 -22
- data/lib/contrast/agent/assess/tag.rb +27 -12
- data/lib/contrast/agent/assess/tracker.rb +66 -0
- data/lib/contrast/agent/at_exit_hook.rb +4 -2
- data/lib/contrast/agent/class_reopener.rb +14 -11
- data/lib/contrast/agent/deadzone/policy/deadzone_node.rb +1 -1
- data/lib/contrast/agent/deadzone/policy/policy.rb +2 -2
- data/lib/contrast/agent/disable_reaction.rb +1 -1
- data/lib/contrast/agent/exclusion_matcher.rb +3 -3
- data/lib/contrast/agent/inventory/policy/datastores.rb +2 -3
- data/lib/contrast/agent/inventory/policy/policy.rb +3 -3
- data/lib/contrast/agent/inventory/policy/trigger_node.rb +1 -1
- data/lib/contrast/agent/middleware.rb +36 -48
- data/lib/contrast/agent/patching/policy/after_load_patch.rb +4 -4
- data/lib/contrast/agent/patching/policy/after_load_patcher.rb +6 -5
- data/lib/contrast/agent/patching/policy/module_policy.rb +1 -1
- data/lib/contrast/agent/patching/policy/patch.rb +16 -16
- data/lib/contrast/agent/patching/policy/patcher.rb +43 -44
- data/lib/contrast/agent/patching/policy/policy.rb +10 -13
- data/lib/contrast/agent/patching/policy/policy_node.rb +3 -3
- data/lib/contrast/agent/patching/policy/trigger_node.rb +2 -2
- data/lib/contrast/agent/protect/policy/applies_command_injection_rule.rb +3 -3
- data/lib/contrast/agent/protect/policy/applies_deserialization_rule.rb +2 -2
- data/lib/contrast/agent/protect/policy/applies_no_sqli_rule.rb +2 -2
- data/lib/contrast/agent/protect/policy/applies_path_traversal_rule.rb +3 -3
- data/lib/contrast/agent/protect/policy/applies_sqli_rule.rb +2 -2
- data/lib/contrast/agent/protect/policy/applies_xxe_rule.rb +3 -3
- data/lib/contrast/agent/protect/policy/policy.rb +8 -8
- data/lib/contrast/agent/protect/policy/rule_applicator.rb +3 -3
- data/lib/contrast/agent/protect/policy/trigger_node.rb +1 -1
- data/lib/contrast/agent/protect/rule.rb +18 -18
- data/lib/contrast/agent/protect/rule/base.rb +21 -32
- data/lib/contrast/agent/protect/rule/base_service.rb +2 -2
- data/lib/contrast/agent/protect/rule/cmd_injection.rb +5 -5
- data/lib/contrast/agent/protect/rule/deserialization.rb +1 -1
- data/lib/contrast/agent/protect/rule/http_method_tampering.rb +3 -8
- data/lib/contrast/agent/protect/rule/no_sqli.rb +1 -1
- data/lib/contrast/agent/protect/rule/path_traversal.rb +4 -5
- data/lib/contrast/agent/protect/rule/sqli.rb +2 -2
- data/lib/contrast/agent/protect/rule/unsafe_file_upload.rb +1 -1
- data/lib/contrast/agent/protect/rule/xss.rb +1 -1
- data/lib/contrast/agent/protect/rule/xxe.rb +4 -5
- data/lib/contrast/agent/protect/rule/xxe/entity_wrapper.rb +2 -2
- data/lib/contrast/agent/railtie.rb +1 -1
- data/lib/contrast/agent/reaction_processor.rb +5 -5
- data/lib/contrast/agent/request.rb +103 -340
- data/lib/contrast/agent/request_context.rb +25 -21
- data/lib/contrast/agent/request_handler.rb +1 -1
- data/lib/contrast/agent/response.rb +25 -26
- data/lib/contrast/agent/rewriter.rb +6 -9
- data/lib/contrast/agent/scope.rb +1 -1
- data/lib/contrast/agent/service_heartbeat.rb +8 -10
- data/lib/contrast/agent/static_analysis.rb +4 -4
- data/lib/contrast/agent/thread.rb +1 -1
- data/lib/contrast/agent/thread_watcher.rb +49 -0
- data/lib/contrast/agent/tracepoint_hook.rb +1 -1
- data/lib/contrast/agent/version.rb +1 -1
- data/lib/contrast/agent/worker_thread.rb +24 -0
- data/lib/contrast/api.rb +4 -6
- data/lib/contrast/api/communication.rb +20 -0
- data/lib/contrast/api/communication/connection_status.rb +41 -0
- data/lib/contrast/api/communication/messaging_queue.rb +76 -0
- data/lib/contrast/{utils/service_response_util.rb → api/communication/response_processor.rb} +10 -19
- data/lib/contrast/api/communication/service_lifecycle.rb +61 -0
- data/lib/contrast/api/communication/socket.rb +45 -0
- data/lib/contrast/api/communication/socket_client.rb +76 -0
- data/lib/contrast/api/communication/speedracer.rb +111 -0
- data/lib/contrast/api/communication/tcp_socket.rb +31 -0
- data/lib/contrast/api/communication/unix_socket.rb +27 -0
- data/lib/contrast/api/decorators.rb +14 -4
- data/lib/contrast/api/decorators/address.rb +61 -0
- data/lib/contrast/api/decorators/application_settings.rb +10 -5
- data/lib/contrast/api/decorators/application_update.rb +7 -17
- data/lib/contrast/api/decorators/http_request.rb +140 -0
- data/lib/contrast/api/decorators/input_analysis.rb +3 -2
- data/lib/contrast/api/decorators/message.rb +76 -0
- data/lib/contrast/api/decorators/rasp_rule_sample.rb +29 -0
- data/lib/contrast/api/decorators/route_coverage.rb +58 -0
- data/lib/contrast/api/decorators/server_features.rb +3 -2
- data/lib/contrast/api/decorators/trace_event.rb +100 -0
- data/lib/contrast/api/decorators/trace_event_object.rb +58 -0
- data/lib/contrast/api/decorators/trace_event_signature.rb +47 -0
- data/lib/contrast/api/decorators/trace_taint_range.rb +52 -0
- data/lib/contrast/api/decorators/trace_taint_range_tags.rb +109 -0
- data/lib/contrast/api/decorators/user_input.rb +40 -0
- data/lib/contrast/common_agent_configuration.rb +2 -2
- data/lib/contrast/components/agent.rb +2 -2
- data/lib/contrast/components/app_context.rb +12 -17
- data/lib/contrast/components/config.rb +8 -23
- data/lib/contrast/components/contrast_service.rb +3 -3
- data/lib/contrast/components/interface.rb +16 -16
- data/lib/contrast/components/logger.rb +1 -1
- data/lib/contrast/components/scope.rb +3 -3
- data/lib/contrast/components/settings.rb +0 -6
- data/lib/contrast/config.rb +18 -18
- data/lib/contrast/config/application_configuration.rb +5 -2
- data/lib/contrast/config/base_configuration.rb +2 -2
- data/lib/contrast/config/protect_rule_configuration.rb +1 -1
- data/lib/contrast/config/service_configuration.rb +8 -2
- data/lib/contrast/configuration.rb +93 -52
- data/lib/contrast/extension/assess.rb +21 -23
- data/lib/contrast/extension/assess/array.rb +12 -9
- data/lib/contrast/extension/assess/erb.rb +6 -3
- data/lib/contrast/extension/assess/eval_trigger.rb +3 -3
- data/lib/contrast/extension/assess/exec_trigger.rb +1 -1
- data/lib/contrast/extension/assess/fiber.rb +12 -12
- data/lib/contrast/extension/assess/hash.rb +5 -4
- data/lib/contrast/extension/assess/kernel.rb +19 -11
- data/lib/contrast/extension/assess/marshal.rb +63 -0
- data/lib/contrast/extension/assess/regexp.rb +8 -7
- data/lib/contrast/extension/assess/string.rb +13 -15
- data/lib/contrast/extension/inventory.rb +4 -5
- data/lib/contrast/extension/kernel.rb +1 -1
- data/lib/contrast/extension/module.rb +1 -1
- data/lib/contrast/extension/protect.rb +3 -3
- data/lib/contrast/extension/protect/kernel.rb +2 -2
- data/lib/contrast/extension/protect/psych.rb +2 -2
- data/lib/contrast/framework/base_support.rb +0 -23
- data/lib/contrast/framework/manager.rb +7 -17
- data/lib/contrast/framework/rack/patch/session_cookie.rb +13 -19
- data/lib/contrast/framework/rack/patch/support.rb +1 -1
- data/lib/contrast/framework/rack/support.rb +2 -2
- data/lib/contrast/framework/rails/patch/action_controller_live_buffer.rb +1 -3
- data/lib/contrast/framework/rails/patch/assess_configuration.rb +6 -13
- data/lib/contrast/framework/rails/patch/rails_application_configuration.rb +1 -1
- data/lib/contrast/framework/rails/patch/support.rb +3 -3
- data/lib/contrast/framework/rails/rewrite/action_controller_railties_helper_inherited.rb +2 -2
- data/lib/contrast/framework/rails/rewrite/active_record_named.rb +2 -2
- data/lib/contrast/framework/rails/rewrite/active_record_time_zone_inherited.rb +2 -2
- data/lib/contrast/framework/rails/support.rb +58 -37
- data/lib/contrast/framework/sinatra/patch/base.rb +2 -2
- data/lib/contrast/framework/sinatra/patch/support.rb +1 -1
- data/lib/contrast/framework/sinatra/support.rb +13 -24
- data/lib/contrast/funchook/funchook.rb +45 -0
- data/lib/contrast/logger/application.rb +13 -5
- data/lib/contrast/logger/format.rb +64 -0
- data/lib/contrast/logger/log.rb +17 -9
- data/lib/contrast/logger/request.rb +30 -0
- data/lib/contrast/tasks/config.rb +1 -1
- data/lib/contrast/tasks/service.rb +2 -2
- data/lib/contrast/utils/assess/sampling_util.rb +2 -2
- data/lib/contrast/utils/assess/tracking_util.rb +89 -19
- data/lib/contrast/utils/boolean_util.rb +1 -1
- data/lib/contrast/utils/class_util.rb +2 -2
- data/lib/contrast/utils/duck_utils.rb +0 -10
- data/lib/contrast/utils/env_configuration_item.rb +2 -1
- data/lib/contrast/utils/gemfile_reader.rb +5 -5
- data/lib/contrast/utils/hash_digest.rb +13 -3
- data/lib/contrast/utils/heap_dump_util.rb +2 -2
- data/lib/contrast/utils/invalid_configuration_util.rb +21 -35
- data/lib/contrast/utils/inventory_util.rb +6 -11
- data/lib/contrast/utils/io_util.rb +1 -1
- data/lib/contrast/utils/object_share.rb +0 -1
- data/lib/contrast/utils/os.rb +16 -4
- data/lib/contrast/utils/ruby_ast_rewriter.rb +1 -1
- data/lib/contrast/utils/sha256_builder.rb +2 -2
- data/lib/contrast/utils/stack_trace_utils.rb +2 -3
- data/lib/contrast/utils/string_utils.rb +11 -6
- data/lib/contrast/utils/tag_util.rb +1 -1
- data/lib/contrast/utils/thread_tracker.rb +1 -14
- data/lib/contrast/utils/timer.rb +1 -17
- data/resources/assess/policy.json +0 -10
- data/resources/deadzone/policy.json +5 -0
- data/ruby-agent.gemspec +24 -23
- data/service_executables/VERSION +1 -1
- data/service_executables/linux/contrast-service +0 -0
- data/service_executables/mac/contrast-service +0 -0
- metadata +92 -92
- data/funchook/Makefile +0 -29
- data/funchook/autom4te.cache/output.0 +0 -4964
- data/funchook/autom4te.cache/requests +0 -77
- data/funchook/autom4te.cache/traces.0 +0 -361
- data/funchook/config.log +0 -651
- data/funchook/config.status +0 -1015
- data/funchook/configure +0 -4964
- data/funchook/src/Makefile +0 -70
- data/funchook/src/config.h +0 -101
- data/funchook/src/config.h.in +0 -100
- data/funchook/src/decoder.o +0 -0
- data/funchook/src/distorm.o +0 -0
- data/funchook/src/funchook.o +0 -0
- data/funchook/src/funchook_io.o +0 -0
- data/funchook/src/funchook_syscall.o +0 -0
- data/funchook/src/funchook_unix.o +0 -0
- data/funchook/src/funchook_x86.o +0 -0
- data/funchook/src/instructions.o +0 -0
- data/funchook/src/insts.o +0 -0
- data/funchook/src/libfunchook.dylib +0 -0
- data/funchook/src/mnemonics.o +0 -0
- data/funchook/src/operands.o +0 -0
- data/funchook/src/os_func.o +0 -0
- data/funchook/src/os_func_unix.o +0 -0
- data/funchook/src/prefix.o +0 -0
- data/funchook/src/printf_base.o +0 -0
- data/funchook/src/textdefs.o +0 -0
- data/funchook/src/wstring.o +0 -0
- data/funchook/test/Makefile +0 -43
- data/funchook/test/funchook_test +0 -0
- data/funchook/test/libfunchook_test.so +0 -0
- data/funchook/test/libfunchook_test.so.dSYM/Contents/Info.plist +0 -20
- data/funchook/test/libfunchook_test.so.dSYM/Contents/Resources/DWARF/libfunchook_test.so +0 -0
- data/funchook/test/test_main.o +0 -0
- data/funchook/test/x86_64_test.o +0 -0
- data/lib/contrast/agent/assess/adjusted_span.rb +0 -27
- data/lib/contrast/agent/assess/insulator.rb +0 -49
- data/lib/contrast/agent/require_state.rb +0 -61
- data/lib/contrast/agent/socket_client.rb +0 -134
- data/lib/contrast/api/connection_status.rb +0 -49
- data/lib/contrast/api/socket.rb +0 -43
- data/lib/contrast/api/speedracer.rb +0 -188
- data/lib/contrast/api/tcp_socket.rb +0 -29
- data/lib/contrast/api/unix_socket.rb +0 -25
- data/lib/contrast/extension/assess/assess_extension.rb +0 -148
- data/lib/contrast/framework/sinatra/application_helper.rb +0 -51
- data/lib/contrast/framework/view_technologies_descriptor.rb +0 -21
- data/lib/contrast/internal_exception.rb +0 -8
- data/lib/contrast/utils/cache.rb +0 -58
- data/lib/contrast/utils/freeze_util.rb +0 -32
- data/lib/contrast/utils/service_sender_util.rb +0 -167
- data/lib/contrast/utils/sinatra_helper.rb +0 -49
@@ -1,7 +1,7 @@
|
|
1
1
|
# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
4
|
+
require 'contrast/components/interface'
|
5
5
|
|
6
6
|
module Contrast
|
7
7
|
module Utils
|
data/lib/contrast/utils/os.rb
CHANGED
@@ -1,23 +1,35 @@
|
|
1
1
|
# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
+
require 'contrast/components/interface'
|
5
|
+
|
4
6
|
module Contrast
|
5
7
|
module Utils
|
6
8
|
# Simple utility used to make OS calls and determine state. For that state
|
7
9
|
# which will not change at runtime, such as the operating system, the
|
8
10
|
# Utility memozies to avoid multiple lookups.
|
9
11
|
module OS
|
12
|
+
include Contrast::Components::Interface
|
13
|
+
access_component :scope
|
14
|
+
|
10
15
|
class << self
|
11
16
|
def running?
|
12
|
-
|
13
|
-
|
17
|
+
result = false
|
18
|
+
with_contrast_scope do
|
19
|
+
process = `ps aux | grep contrast-servic[e]`
|
20
|
+
processes = process.split("\n")
|
21
|
+
result = !processes.empty? && processes.any? { |process_descriptor| !process_descriptor.include?('grep') }
|
22
|
+
end
|
23
|
+
result
|
14
24
|
end
|
15
25
|
|
16
26
|
# check if service was killed and is a zombie process
|
17
27
|
# returns an array of zombie process PIDs as strings; empty array if there are none
|
18
28
|
def zombie_pids
|
19
|
-
|
20
|
-
|
29
|
+
with_contrast_scope do
|
30
|
+
zombie_pid_list = `ps aux | grep contrast-servic[e] | grep Z | awk '{print $2}'` # retrieve pid of service processes
|
31
|
+
zombie_pid_list.split("\n")
|
32
|
+
end
|
21
33
|
end
|
22
34
|
end
|
23
35
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
5
|
-
|
4
|
+
require 'singleton'
|
5
|
+
require 'contrast/utils/object_share'
|
6
6
|
|
7
7
|
module Contrast
|
8
8
|
module Utils
|
@@ -1,9 +1,8 @@
|
|
1
1
|
# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
cs__scoped_require 'contrast/utils/cache'
|
4
|
+
require 'contrast/utils/object_share'
|
5
|
+
require 'contrast/api'
|
7
6
|
|
8
7
|
module Contrast
|
9
8
|
module Utils
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
4
|
+
require 'contrast/components/interface'
|
5
5
|
|
6
6
|
module Contrast
|
7
7
|
module Utils
|
@@ -11,7 +11,7 @@ module Contrast
|
|
11
11
|
access_component :logging
|
12
12
|
|
13
13
|
UTF8 = 'utf-8'
|
14
|
-
HTTP_PREFIX = '
|
14
|
+
HTTP_PREFIX = 'HTTP_'
|
15
15
|
|
16
16
|
# Convenience method. We assume that we're working on Strings or tags
|
17
17
|
# String representations of things. To that end, we'll to_s anything
|
@@ -69,6 +69,10 @@ module Contrast
|
|
69
69
|
# Given a string return a normalized version of that string.
|
70
70
|
# Keys are memoized so that the normalization process doesn't need
|
71
71
|
# to happen every time.
|
72
|
+
#
|
73
|
+
# @param str [String] the String to normalize
|
74
|
+
# @return [String] a copy of the given String, upper cased, trimmed,
|
75
|
+
# dashes replaced with underscore, and HTTP trimmed
|
72
76
|
def self.normalized_key str
|
73
77
|
return nil unless str
|
74
78
|
|
@@ -77,10 +81,11 @@ module Contrast
|
|
77
81
|
if @_normalized_keys.key?(str)
|
78
82
|
@_normalized_keys[str]
|
79
83
|
else
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
+
upped = str.upcase
|
85
|
+
stripped = upped.strip! || upped
|
86
|
+
trimmed = stripped.tr!('-', '_') || stripped
|
87
|
+
cut = trimmed.start_with?(HTTP_PREFIX) ? trimmed[5..-1] : trimmed
|
88
|
+
@_normalized_keys[str] = cut
|
84
89
|
end
|
85
90
|
end
|
86
91
|
end
|
@@ -114,7 +114,7 @@ module Contrast
|
|
114
114
|
arr.each do |existing|
|
115
115
|
break unless existing.start_idx < new_element.start_idx
|
116
116
|
|
117
|
-
if existing.overlaps?(new_element)
|
117
|
+
if existing.overlaps?(new_element.start_idx, new_element.end_idx)
|
118
118
|
existing.merge(new_element)
|
119
119
|
return # rubocop:disable Lint/NonLocalExitFromIterator
|
120
120
|
end
|
@@ -5,15 +5,12 @@ module Contrast
|
|
5
5
|
module Utils
|
6
6
|
# ThreadTracker allows tracking of singleton objects across threads
|
7
7
|
class ThreadTracker
|
8
|
-
def initialize
|
9
|
-
@logger = logger
|
10
|
-
end
|
8
|
+
def initialize; end
|
11
9
|
|
12
10
|
# Note about Ruby -- thread#[] is fiber-local,
|
13
11
|
# #thread_variables is not.
|
14
12
|
|
15
13
|
def get key, default = nil
|
16
|
-
log(key)
|
17
14
|
Thread.current[key] || default
|
18
15
|
end
|
19
16
|
|
@@ -39,16 +36,6 @@ module Contrast
|
|
39
36
|
def update_current_context context
|
40
37
|
set(:current_context, context)
|
41
38
|
end
|
42
|
-
|
43
|
-
# logger may be nil so use this utility method instead
|
44
|
-
def log key
|
45
|
-
return unless @logger
|
46
|
-
return unless @logger.debug?
|
47
|
-
|
48
|
-
@logger.debug('Accessing object in Thread Tracker', name: key, p_id: Process.pid, thread_id: Thread.current.object_id)
|
49
|
-
rescue StandardError
|
50
|
-
false # NOOP
|
51
|
-
end
|
52
39
|
end
|
53
40
|
end
|
54
41
|
end
|
data/lib/contrast/utils/timer.rb
CHANGED
@@ -6,7 +6,7 @@ module Contrast
|
|
6
6
|
# Timer is class that can track state about when an event starts and how long it takes
|
7
7
|
# Also containes utility methods to get time values in milliseconds
|
8
8
|
class Timer
|
9
|
-
attr_reader :
|
9
|
+
attr_reader :start_ms, :events
|
10
10
|
|
11
11
|
def initialize time = Time.now
|
12
12
|
@start_at = time
|
@@ -14,22 +14,6 @@ module Contrast
|
|
14
14
|
@events = {}
|
15
15
|
end
|
16
16
|
|
17
|
-
def elapsed label
|
18
|
-
before = Time.now
|
19
|
-
result = yield if block_given?
|
20
|
-
events[label.to_s] = ((Time.now - before) * 1000).to_i
|
21
|
-
result
|
22
|
-
end
|
23
|
-
|
24
|
-
def to_s
|
25
|
-
pairs = events.to_a.map { |pair| "#{ pair[0] }=#{ pair[1] }ms" }
|
26
|
-
start_at.strftime('%Y-%m-%d %H:%M:%S.%L') + pairs.join(Contrast::Utils::ObjectShare::SPACE)
|
27
|
-
end
|
28
|
-
|
29
|
-
def now_ms
|
30
|
-
(Time.now.to_f * 1000).to_i
|
31
|
-
end
|
32
|
-
|
33
17
|
def self.now_ms
|
34
18
|
(Time.now.to_f * 1000).to_i
|
35
19
|
end
|
data/ruby-agent.gemspec
CHANGED
@@ -1,21 +1,7 @@
|
|
1
1
|
# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
require_relative './lib/contrast/agent/version'
|
5
|
-
require 'bundler' # rubocop:disable Kernel/Require
|
6
|
-
# https://github.com/grpc/grpc/issues/21514#issuecomment-581417788
|
7
|
-
module BundlerHack
|
8
|
-
def __materialize__
|
9
|
-
if name == 'google-protobuf'
|
10
|
-
Bundler.settings.temporary(force_ruby_platform: true) do
|
11
|
-
super
|
12
|
-
end
|
13
|
-
else
|
14
|
-
super
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
Bundler::LazySpecification.prepend(BundlerHack)
|
4
|
+
require_relative './lib/contrast/agent/version'
|
19
5
|
|
20
6
|
lib = File.expand_path('lib', __dir__)
|
21
7
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
@@ -36,6 +22,7 @@ def self.add_dev_dependencies spec
|
|
36
22
|
spec.add_development_dependency 'amazing_print'
|
37
23
|
spec.add_development_dependency 'bundler'
|
38
24
|
spec.add_development_dependency 'climate_control' # mock ENV
|
25
|
+
spec.add_development_dependency 'debase'
|
39
26
|
spec.add_development_dependency 'debride'
|
40
27
|
spec.add_development_dependency 'execjs'
|
41
28
|
spec.add_development_dependency 'factory_bot'
|
@@ -50,9 +37,10 @@ def self.add_dev_dependencies spec
|
|
50
37
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
51
38
|
spec.add_development_dependency 'rspec-benchmark'
|
52
39
|
spec.add_development_dependency 'rspec_junit_formatter', '0.3.0'
|
53
|
-
spec.add_development_dependency 'rubocop', '0.
|
54
|
-
spec.add_development_dependency 'rubocop-performance', '1.
|
55
|
-
spec.add_development_dependency 'rubocop-rspec', '1.
|
40
|
+
spec.add_development_dependency 'rubocop', '0.89.1'
|
41
|
+
spec.add_development_dependency 'rubocop-performance', '1.7.1'
|
42
|
+
spec.add_development_dependency 'rubocop-rspec', '1.42.0'
|
43
|
+
spec.add_development_dependency 'ruby-debug-ide'
|
56
44
|
spec.add_development_dependency 'simplecov', '~> 0.18'
|
57
45
|
spec.add_development_dependency 'sinatra', '>= 2'
|
58
46
|
spec.add_development_dependency 'sqlite3', '1.3.9'
|
@@ -68,10 +56,10 @@ end
|
|
68
56
|
# dependencies.csv in this directory to indicate that and create a
|
69
57
|
# corresponding update to the fake gem server data in TeamServer.
|
70
58
|
def self.add_dependencies spec
|
71
|
-
spec.add_dependency 'google-protobuf', '~> 3.9.0'
|
72
59
|
spec.add_dependency 'ougai', '~> 1.8'
|
73
60
|
spec.add_dependency 'parser', '~> 2.6'
|
74
|
-
spec.add_dependency '
|
61
|
+
spec.add_dependency 'protobuf', '~> 3.10'
|
62
|
+
spec.add_dependency 'rack', '~> 2.0'
|
75
63
|
end
|
76
64
|
|
77
65
|
# Enumerate the files required to build the Agent.
|
@@ -80,7 +68,7 @@ def self.add_files spec
|
|
80
68
|
# Directories used for testing:
|
81
69
|
f.match(%r{^(spec|test)/}) ||
|
82
70
|
# Directories used in pipelines
|
83
|
-
f.match(%r{^(bin|
|
71
|
+
f.match(%r{^(\.github|bin|internal_resources|vendor)/}) ||
|
84
72
|
# Configuration and other files that don't belong to one directory
|
85
73
|
f.match(/(Dockerfile)/) ||
|
86
74
|
f.match(/(.*\.csv)/) ||
|
@@ -90,11 +78,24 @@ def self.add_files spec
|
|
90
78
|
f.match(/(.*\.ya?ml)/)
|
91
79
|
end
|
92
80
|
|
93
|
-
spec.files << 'lib/contrast/api/
|
94
|
-
spec.files << 'lib/contrast/api/
|
81
|
+
spec.files << 'lib/contrast/api/dtm.pb.rb'
|
82
|
+
spec.files << 'lib/contrast/api/settings.pb.rb'
|
95
83
|
spec.files += Dir['service_executables/**/*']
|
96
84
|
spec.files += Dir['funchook/**/*']
|
97
85
|
spec.files += Dir['shared_libraries/**/*']
|
86
|
+
|
87
|
+
# Clean up compiled funchook files that may have been generated during
|
88
|
+
# testing. Only a concern locally, but better than leaving it to chance.
|
89
|
+
spec.files.delete_if do |file|
|
90
|
+
file.end_with?('ext/libfunchook.dylib',
|
91
|
+
'ext/libfunchook.so',
|
92
|
+
'ext/funchook.h',
|
93
|
+
'shared_libraries/libfunchook.dylib',
|
94
|
+
'shared_libraries/libfunchook.so',
|
95
|
+
'shared_libraries/funchook.h',
|
96
|
+
'funchook/src/libfunchook.dylib',
|
97
|
+
'funchook/src/libfunchook.so')
|
98
|
+
end
|
98
99
|
end
|
99
100
|
|
100
101
|
def self.add_metadata spec
|
data/service_executables/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.12.0
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contrast-agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- galen.palmer@contrastsecurity.com
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: exe
|
14
14
|
cert_chain: []
|
15
|
-
date: 2020-
|
15
|
+
date: 2020-09-18 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: amazing_print
|
@@ -56,6 +56,20 @@ dependencies:
|
|
56
56
|
- - ">="
|
57
57
|
- !ruby/object:Gem::Version
|
58
58
|
version: '0'
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: debase
|
61
|
+
requirement: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
type: :development
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
59
73
|
- !ruby/object:Gem::Dependency
|
60
74
|
name: debride
|
61
75
|
requirement: !ruby/object:Gem::Requirement
|
@@ -258,42 +272,56 @@ dependencies:
|
|
258
272
|
requirements:
|
259
273
|
- - '='
|
260
274
|
- !ruby/object:Gem::Version
|
261
|
-
version: 0.
|
275
|
+
version: 0.89.1
|
262
276
|
type: :development
|
263
277
|
prerelease: false
|
264
278
|
version_requirements: !ruby/object:Gem::Requirement
|
265
279
|
requirements:
|
266
280
|
- - '='
|
267
281
|
- !ruby/object:Gem::Version
|
268
|
-
version: 0.
|
282
|
+
version: 0.89.1
|
269
283
|
- !ruby/object:Gem::Dependency
|
270
284
|
name: rubocop-performance
|
271
285
|
requirement: !ruby/object:Gem::Requirement
|
272
286
|
requirements:
|
273
287
|
- - '='
|
274
288
|
- !ruby/object:Gem::Version
|
275
|
-
version: 1.
|
289
|
+
version: 1.7.1
|
276
290
|
type: :development
|
277
291
|
prerelease: false
|
278
292
|
version_requirements: !ruby/object:Gem::Requirement
|
279
293
|
requirements:
|
280
294
|
- - '='
|
281
295
|
- !ruby/object:Gem::Version
|
282
|
-
version: 1.
|
296
|
+
version: 1.7.1
|
283
297
|
- !ruby/object:Gem::Dependency
|
284
298
|
name: rubocop-rspec
|
285
299
|
requirement: !ruby/object:Gem::Requirement
|
286
300
|
requirements:
|
287
301
|
- - '='
|
288
302
|
- !ruby/object:Gem::Version
|
289
|
-
version: 1.
|
303
|
+
version: 1.42.0
|
290
304
|
type: :development
|
291
305
|
prerelease: false
|
292
306
|
version_requirements: !ruby/object:Gem::Requirement
|
293
307
|
requirements:
|
294
308
|
- - '='
|
295
309
|
- !ruby/object:Gem::Version
|
296
|
-
version: 1.
|
310
|
+
version: 1.42.0
|
311
|
+
- !ruby/object:Gem::Dependency
|
312
|
+
name: ruby-debug-ide
|
313
|
+
requirement: !ruby/object:Gem::Requirement
|
314
|
+
requirements:
|
315
|
+
- - ">="
|
316
|
+
- !ruby/object:Gem::Version
|
317
|
+
version: '0'
|
318
|
+
type: :development
|
319
|
+
prerelease: false
|
320
|
+
version_requirements: !ruby/object:Gem::Requirement
|
321
|
+
requirements:
|
322
|
+
- - ">="
|
323
|
+
- !ruby/object:Gem::Version
|
324
|
+
version: '0'
|
297
325
|
- !ruby/object:Gem::Dependency
|
298
326
|
name: simplecov
|
299
327
|
requirement: !ruby/object:Gem::Requirement
|
@@ -393,67 +421,61 @@ dependencies:
|
|
393
421
|
- !ruby/object:Gem::Version
|
394
422
|
version: '2.0'
|
395
423
|
- !ruby/object:Gem::Dependency
|
396
|
-
name:
|
424
|
+
name: ougai
|
397
425
|
requirement: !ruby/object:Gem::Requirement
|
398
426
|
requirements:
|
399
427
|
- - "~>"
|
400
428
|
- !ruby/object:Gem::Version
|
401
|
-
version:
|
429
|
+
version: '1.8'
|
402
430
|
type: :runtime
|
403
431
|
prerelease: false
|
404
432
|
version_requirements: !ruby/object:Gem::Requirement
|
405
433
|
requirements:
|
406
434
|
- - "~>"
|
407
435
|
- !ruby/object:Gem::Version
|
408
|
-
version:
|
436
|
+
version: '1.8'
|
409
437
|
- !ruby/object:Gem::Dependency
|
410
|
-
name:
|
438
|
+
name: parser
|
411
439
|
requirement: !ruby/object:Gem::Requirement
|
412
440
|
requirements:
|
413
441
|
- - "~>"
|
414
442
|
- !ruby/object:Gem::Version
|
415
|
-
version: '
|
443
|
+
version: '2.6'
|
416
444
|
type: :runtime
|
417
445
|
prerelease: false
|
418
446
|
version_requirements: !ruby/object:Gem::Requirement
|
419
447
|
requirements:
|
420
448
|
- - "~>"
|
421
449
|
- !ruby/object:Gem::Version
|
422
|
-
version: '
|
450
|
+
version: '2.6'
|
423
451
|
- !ruby/object:Gem::Dependency
|
424
|
-
name:
|
452
|
+
name: protobuf
|
425
453
|
requirement: !ruby/object:Gem::Requirement
|
426
454
|
requirements:
|
427
455
|
- - "~>"
|
428
456
|
- !ruby/object:Gem::Version
|
429
|
-
version: '
|
457
|
+
version: '3.10'
|
430
458
|
type: :runtime
|
431
459
|
prerelease: false
|
432
460
|
version_requirements: !ruby/object:Gem::Requirement
|
433
461
|
requirements:
|
434
462
|
- - "~>"
|
435
463
|
- !ruby/object:Gem::Version
|
436
|
-
version: '
|
464
|
+
version: '3.10'
|
437
465
|
- !ruby/object:Gem::Dependency
|
438
466
|
name: rack
|
439
467
|
requirement: !ruby/object:Gem::Requirement
|
440
468
|
requirements:
|
441
|
-
- - "
|
469
|
+
- - "~>"
|
442
470
|
- !ruby/object:Gem::Version
|
443
471
|
version: '2.0'
|
444
|
-
- - "<"
|
445
|
-
- !ruby/object:Gem::Version
|
446
|
-
version: '3.0'
|
447
472
|
type: :runtime
|
448
473
|
prerelease: false
|
449
474
|
version_requirements: !ruby/object:Gem::Requirement
|
450
475
|
requirements:
|
451
|
-
- - "
|
476
|
+
- - "~>"
|
452
477
|
- !ruby/object:Gem::Version
|
453
478
|
version: '2.0'
|
454
|
-
- - "<"
|
455
|
-
- !ruby/object:Gem::Version
|
456
|
-
version: '3.0'
|
457
479
|
description: This gem instantiates a Rack middleware for rack-based web applications
|
458
480
|
in order to provide Interactive Application Security Testing and Protection.
|
459
481
|
email:
|
@@ -462,20 +484,20 @@ executables:
|
|
462
484
|
- contrast_service
|
463
485
|
extensions:
|
464
486
|
- ext/cs__common/extconf.rb
|
465
|
-
- ext/cs__assess_module/extconf.rb
|
466
487
|
- ext/cs__assess_yield_track/extconf.rb
|
467
|
-
- ext/
|
468
|
-
- ext/
|
488
|
+
- ext/cs__assess_module/extconf.rb
|
489
|
+
- ext/cs__assess_active_record_named/extconf.rb
|
490
|
+
- ext/cs__contrast_patch/extconf.rb
|
491
|
+
- ext/cs__assess_string/extconf.rb
|
492
|
+
- ext/cs__assess_fiber_track/extconf.rb
|
469
493
|
- ext/cs__assess_regexp/extconf.rb
|
470
|
-
- ext/cs__assess_string_interpolation26/extconf.rb
|
471
494
|
- ext/cs__assess_kernel/extconf.rb
|
472
|
-
- ext/
|
473
|
-
- ext/cs__assess_fiber_track/extconf.rb
|
495
|
+
- ext/cs__assess_hash/extconf.rb
|
474
496
|
- ext/cs__assess_marshal_module/extconf.rb
|
475
|
-
- ext/
|
476
|
-
- ext/
|
497
|
+
- ext/cs__assess_array/extconf.rb
|
498
|
+
- ext/cs__protect_kernel/extconf.rb
|
477
499
|
- ext/cs__assess_basic_object/extconf.rb
|
478
|
-
- ext/
|
500
|
+
- ext/cs__assess_string_interpolation26/extconf.rb
|
479
501
|
extra_rdoc_files: []
|
480
502
|
files:
|
481
503
|
- ".clang-format"
|
@@ -537,19 +559,12 @@ files:
|
|
537
559
|
- ext/cs__protect_kernel/extconf.rb
|
538
560
|
- ext/extconf_common.rb
|
539
561
|
- funchook/LICENSE
|
540
|
-
- funchook/Makefile
|
541
562
|
- funchook/Makefile.in
|
542
563
|
- funchook/README.md
|
543
564
|
- funchook/appveyor.yml
|
544
565
|
- funchook/autogen.sh
|
545
|
-
- funchook/autom4te.cache/output.0
|
546
|
-
- funchook/autom4te.cache/requests
|
547
|
-
- funchook/autom4te.cache/traces.0
|
548
566
|
- funchook/config.guess
|
549
|
-
- funchook/config.log
|
550
|
-
- funchook/config.status
|
551
567
|
- funchook/config.sub
|
552
|
-
- funchook/configure
|
553
568
|
- funchook/configure.ac
|
554
569
|
- funchook/distorm/COPYING
|
555
570
|
- funchook/distorm/MANIFEST
|
@@ -642,56 +657,28 @@ files:
|
|
642
657
|
- funchook/distorm/src/x86defs.h
|
643
658
|
- funchook/include/funchook.h
|
644
659
|
- funchook/install-sh
|
645
|
-
- funchook/src/Makefile
|
646
660
|
- funchook/src/Makefile.in
|
647
661
|
- funchook/src/__strerror.h
|
648
|
-
- funchook/src/config.h
|
649
|
-
- funchook/src/config.h.in
|
650
|
-
- funchook/src/decoder.o
|
651
|
-
- funchook/src/distorm.o
|
652
662
|
- funchook/src/funchook.c
|
653
|
-
- funchook/src/funchook.o
|
654
663
|
- funchook/src/funchook_internal.h
|
655
664
|
- funchook/src/funchook_io.c
|
656
665
|
- funchook/src/funchook_io.h
|
657
|
-
- funchook/src/funchook_io.o
|
658
666
|
- funchook/src/funchook_syscall.S
|
659
|
-
- funchook/src/funchook_syscall.o
|
660
667
|
- funchook/src/funchook_unix.c
|
661
|
-
- funchook/src/funchook_unix.o
|
662
668
|
- funchook/src/funchook_windows.c
|
663
669
|
- funchook/src/funchook_x86.c
|
664
|
-
- funchook/src/funchook_x86.o
|
665
|
-
- funchook/src/instructions.o
|
666
|
-
- funchook/src/insts.o
|
667
|
-
- funchook/src/libfunchook.dylib
|
668
|
-
- funchook/src/mnemonics.o
|
669
|
-
- funchook/src/operands.o
|
670
670
|
- funchook/src/os_func.c
|
671
671
|
- funchook/src/os_func.h
|
672
|
-
- funchook/src/os_func.o
|
673
672
|
- funchook/src/os_func_unix.c
|
674
|
-
- funchook/src/os_func_unix.o
|
675
673
|
- funchook/src/os_func_windows.c
|
676
|
-
- funchook/src/prefix.o
|
677
674
|
- funchook/src/printf_base.c
|
678
675
|
- funchook/src/printf_base.h
|
679
|
-
- funchook/src/printf_base.o
|
680
|
-
- funchook/src/textdefs.o
|
681
|
-
- funchook/src/wstring.o
|
682
|
-
- funchook/test/Makefile
|
683
676
|
- funchook/test/Makefile.in
|
684
|
-
- funchook/test/funchook_test
|
685
677
|
- funchook/test/libfunchook_test.c
|
686
|
-
- funchook/test/libfunchook_test.so
|
687
|
-
- funchook/test/libfunchook_test.so.dSYM/Contents/Info.plist
|
688
|
-
- funchook/test/libfunchook_test.so.dSYM/Contents/Resources/DWARF/libfunchook_test.so
|
689
678
|
- funchook/test/libfunchook_test2.c
|
690
679
|
- funchook/test/suffix.list
|
691
680
|
- funchook/test/test_main.c
|
692
|
-
- funchook/test/test_main.o
|
693
681
|
- funchook/test/x86_64_test.S
|
694
|
-
- funchook/test/x86_64_test.o
|
695
682
|
- funchook/test/x86_test.S
|
696
683
|
- funchook/win32/config.h
|
697
684
|
- funchook/win32/funchook.sln
|
@@ -706,11 +693,11 @@ files:
|
|
706
693
|
- lib/contrast.rb
|
707
694
|
- lib/contrast/agent.rb
|
708
695
|
- lib/contrast/agent/assess.rb
|
709
|
-
- lib/contrast/agent/assess/adjusted_span.rb
|
710
696
|
- lib/contrast/agent/assess/contrast_event.rb
|
711
697
|
- lib/contrast/agent/assess/events/event_factory.rb
|
712
698
|
- lib/contrast/agent/assess/events/source_event.rb
|
713
|
-
- lib/contrast/agent/assess/
|
699
|
+
- lib/contrast/agent/assess/finalizers/freeze.rb
|
700
|
+
- lib/contrast/agent/assess/finalizers/hash.rb
|
714
701
|
- lib/contrast/agent/assess/policy/dynamic_source_factory.rb
|
715
702
|
- lib/contrast/agent/assess/policy/patcher.rb
|
716
703
|
- lib/contrast/agent/assess/policy/policy.rb
|
@@ -751,6 +738,9 @@ files:
|
|
751
738
|
- lib/contrast/agent/assess/policy/trigger_validation/trigger_validation.rb
|
752
739
|
- lib/contrast/agent/assess/policy/trigger_validation/xss_validator.rb
|
753
740
|
- lib/contrast/agent/assess/properties.rb
|
741
|
+
- lib/contrast/agent/assess/property/evented.rb
|
742
|
+
- lib/contrast/agent/assess/property/tagged.rb
|
743
|
+
- lib/contrast/agent/assess/property/updated.rb
|
754
744
|
- lib/contrast/agent/assess/rule.rb
|
755
745
|
- lib/contrast/agent/assess/rule/base.rb
|
756
746
|
- lib/contrast/agent/assess/rule/provider.rb
|
@@ -759,6 +749,7 @@ files:
|
|
759
749
|
- lib/contrast/agent/assess/rule/provider/hardcoded_value_rule.rb
|
760
750
|
- lib/contrast/agent/assess/rule/redos.rb
|
761
751
|
- lib/contrast/agent/assess/tag.rb
|
752
|
+
- lib/contrast/agent/assess/tracker.rb
|
762
753
|
- lib/contrast/agent/at_exit_hook.rb
|
763
754
|
- lib/contrast/agent/class_reopener.rb
|
764
755
|
- lib/contrast/agent/deadzone/policy/deadzone_node.rb
|
@@ -813,31 +804,47 @@ files:
|
|
813
804
|
- lib/contrast/agent/request.rb
|
814
805
|
- lib/contrast/agent/request_context.rb
|
815
806
|
- lib/contrast/agent/request_handler.rb
|
816
|
-
- lib/contrast/agent/require_state.rb
|
817
807
|
- lib/contrast/agent/response.rb
|
818
808
|
- lib/contrast/agent/rewriter.rb
|
819
809
|
- lib/contrast/agent/rule_set.rb
|
820
810
|
- lib/contrast/agent/scope.rb
|
821
811
|
- lib/contrast/agent/service_heartbeat.rb
|
822
|
-
- lib/contrast/agent/socket_client.rb
|
823
812
|
- lib/contrast/agent/static_analysis.rb
|
824
813
|
- lib/contrast/agent/thread.rb
|
814
|
+
- lib/contrast/agent/thread_watcher.rb
|
825
815
|
- lib/contrast/agent/tracepoint_hook.rb
|
826
816
|
- lib/contrast/agent/version.rb
|
817
|
+
- lib/contrast/agent/worker_thread.rb
|
827
818
|
- lib/contrast/api.rb
|
828
819
|
- lib/contrast/api/.gitkeep
|
829
|
-
- lib/contrast/api/
|
820
|
+
- lib/contrast/api/communication.rb
|
821
|
+
- lib/contrast/api/communication/connection_status.rb
|
822
|
+
- lib/contrast/api/communication/messaging_queue.rb
|
823
|
+
- lib/contrast/api/communication/response_processor.rb
|
824
|
+
- lib/contrast/api/communication/service_lifecycle.rb
|
825
|
+
- lib/contrast/api/communication/socket.rb
|
826
|
+
- lib/contrast/api/communication/socket_client.rb
|
827
|
+
- lib/contrast/api/communication/speedracer.rb
|
828
|
+
- lib/contrast/api/communication/tcp_socket.rb
|
829
|
+
- lib/contrast/api/communication/unix_socket.rb
|
830
830
|
- lib/contrast/api/decorators.rb
|
831
|
+
- lib/contrast/api/decorators/address.rb
|
831
832
|
- lib/contrast/api/decorators/application_settings.rb
|
832
833
|
- lib/contrast/api/decorators/application_update.rb
|
834
|
+
- lib/contrast/api/decorators/http_request.rb
|
833
835
|
- lib/contrast/api/decorators/input_analysis.rb
|
836
|
+
- lib/contrast/api/decorators/message.rb
|
837
|
+
- lib/contrast/api/decorators/rasp_rule_sample.rb
|
838
|
+
- lib/contrast/api/decorators/route_coverage.rb
|
834
839
|
- lib/contrast/api/decorators/server_features.rb
|
835
|
-
- lib/contrast/api/
|
836
|
-
- lib/contrast/api/
|
837
|
-
- lib/contrast/api/
|
838
|
-
- lib/contrast/api/
|
839
|
-
- lib/contrast/api/
|
840
|
-
- lib/contrast/api/
|
840
|
+
- lib/contrast/api/decorators/trace_event.rb
|
841
|
+
- lib/contrast/api/decorators/trace_event_object.rb
|
842
|
+
- lib/contrast/api/decorators/trace_event_signature.rb
|
843
|
+
- lib/contrast/api/decorators/trace_taint_range.rb
|
844
|
+
- lib/contrast/api/decorators/trace_taint_range_tags.rb
|
845
|
+
- lib/contrast/api/decorators/user_input.rb
|
846
|
+
- lib/contrast/api/dtm.pb.rb
|
847
|
+
- lib/contrast/api/settings.pb.rb
|
841
848
|
- lib/contrast/common_agent_configuration.rb
|
842
849
|
- lib/contrast/components/agent.rb
|
843
850
|
- lib/contrast/components/app_context.rb
|
@@ -874,13 +881,13 @@ files:
|
|
874
881
|
- lib/contrast/configuration.rb
|
875
882
|
- lib/contrast/extension/assess.rb
|
876
883
|
- lib/contrast/extension/assess/array.rb
|
877
|
-
- lib/contrast/extension/assess/assess_extension.rb
|
878
884
|
- lib/contrast/extension/assess/erb.rb
|
879
885
|
- lib/contrast/extension/assess/eval_trigger.rb
|
880
886
|
- lib/contrast/extension/assess/exec_trigger.rb
|
881
887
|
- lib/contrast/extension/assess/fiber.rb
|
882
888
|
- lib/contrast/extension/assess/hash.rb
|
883
889
|
- lib/contrast/extension/assess/kernel.rb
|
890
|
+
- lib/contrast/extension/assess/marshal.rb
|
884
891
|
- lib/contrast/extension/assess/regexp.rb
|
885
892
|
- lib/contrast/extension/assess/string.rb
|
886
893
|
- lib/contrast/extension/delegator.rb
|
@@ -906,14 +913,14 @@ files:
|
|
906
913
|
- lib/contrast/framework/rails/rewrite/active_record_named.rb
|
907
914
|
- lib/contrast/framework/rails/rewrite/active_record_time_zone_inherited.rb
|
908
915
|
- lib/contrast/framework/rails/support.rb
|
909
|
-
- lib/contrast/framework/sinatra/application_helper.rb
|
910
916
|
- lib/contrast/framework/sinatra/patch/base.rb
|
911
917
|
- lib/contrast/framework/sinatra/patch/support.rb
|
912
918
|
- lib/contrast/framework/sinatra/support.rb
|
913
|
-
- lib/contrast/
|
914
|
-
- lib/contrast/internal_exception.rb
|
919
|
+
- lib/contrast/funchook/funchook.rb
|
915
920
|
- lib/contrast/logger/application.rb
|
921
|
+
- lib/contrast/logger/format.rb
|
916
922
|
- lib/contrast/logger/log.rb
|
923
|
+
- lib/contrast/logger/request.rb
|
917
924
|
- lib/contrast/logger/time.rb
|
918
925
|
- lib/contrast/security_exception.rb
|
919
926
|
- lib/contrast/tasks/config.rb
|
@@ -921,11 +928,9 @@ files:
|
|
921
928
|
- lib/contrast/utils/assess/sampling_util.rb
|
922
929
|
- lib/contrast/utils/assess/tracking_util.rb
|
923
930
|
- lib/contrast/utils/boolean_util.rb
|
924
|
-
- lib/contrast/utils/cache.rb
|
925
931
|
- lib/contrast/utils/class_util.rb
|
926
932
|
- lib/contrast/utils/duck_utils.rb
|
927
933
|
- lib/contrast/utils/env_configuration_item.rb
|
928
|
-
- lib/contrast/utils/freeze_util.rb
|
929
934
|
- lib/contrast/utils/gemfile_reader.rb
|
930
935
|
- lib/contrast/utils/hash_digest.rb
|
931
936
|
- lib/contrast/utils/heap_dump_util.rb
|
@@ -939,10 +944,7 @@ files:
|
|
939
944
|
- lib/contrast/utils/prevent_serialization.rb
|
940
945
|
- lib/contrast/utils/resource_loader.rb
|
941
946
|
- lib/contrast/utils/ruby_ast_rewriter.rb
|
942
|
-
- lib/contrast/utils/service_response_util.rb
|
943
|
-
- lib/contrast/utils/service_sender_util.rb
|
944
947
|
- lib/contrast/utils/sha256_builder.rb
|
945
|
-
- lib/contrast/utils/sinatra_helper.rb
|
946
948
|
- lib/contrast/utils/stack_trace_utils.rb
|
947
949
|
- lib/contrast/utils/string_utils.rb
|
948
950
|
- lib/contrast/utils/tag_util.rb
|
@@ -959,8 +961,6 @@ files:
|
|
959
961
|
- service_executables/linux/contrast-service
|
960
962
|
- service_executables/mac/contrast-service
|
961
963
|
- shared_libraries/.gitkeep
|
962
|
-
- shared_libraries/funchook.h
|
963
|
-
- shared_libraries/libfunchook.dylib
|
964
964
|
homepage: https://www.contrastsecurity.com
|
965
965
|
licenses:
|
966
966
|
- CONTRAST SECURITY (see license file)
|
@@ -988,7 +988,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
988
988
|
- !ruby/object:Gem::Version
|
989
989
|
version: '0'
|
990
990
|
requirements: []
|
991
|
-
rubygems_version: 3.0.
|
991
|
+
rubygems_version: 3.0.3
|
992
992
|
signing_key:
|
993
993
|
specification_version: 4
|
994
994
|
summary: Contrast Security's agent for rack-based applications.
|