contrast-agent 3.11.0 → 3.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.flayignore +1 -0
- data/ext/cs__assess_active_record_named/cs__active_record_named.c +7 -2
- data/ext/cs__assess_active_record_named/cs__active_record_named.h +1 -0
- data/ext/cs__assess_array/cs__assess_array.c +2 -1
- data/ext/cs__assess_array/cs__assess_array.h +1 -0
- data/ext/cs__assess_basic_object/cs__assess_basic_object.c +3 -7
- data/ext/cs__assess_basic_object/cs__assess_basic_object.h +2 -1
- data/ext/cs__assess_kernel/cs__assess_kernel.c +1 -1
- data/ext/cs__assess_module/cs__assess_module.c +5 -7
- data/ext/cs__assess_module/cs__assess_module.h +3 -0
- data/ext/cs__common/cs__common.c +1 -1
- data/ext/cs__protect_kernel/cs__protect_kernel.c +4 -2
- data/ext/cs__protect_kernel/cs__protect_kernel.h +1 -0
- data/funchook/autom4te.cache/output.0 +13 -1
- data/funchook/autom4te.cache/requests +49 -48
- data/funchook/autom4te.cache/traces.0 +3 -0
- data/funchook/config.log +217 -378
- data/funchook/config.status +24 -23
- data/funchook/configure +13 -1
- data/funchook/src/Makefile +7 -7
- data/funchook/src/config.h +2 -2
- 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.so +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 +2 -2
- data/funchook/test/funchook_test +0 -0
- data/funchook/test/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.rb +0 -1
- data/lib/contrast/agent.rb +19 -22
- data/lib/contrast/agent/assess.rb +0 -9
- data/lib/contrast/agent/assess/policy/patcher.rb +1 -0
- data/lib/contrast/agent/assess/policy/policy_node.rb +1 -1
- data/lib/contrast/agent/assess/policy/policy_scanner.rb +1 -1
- data/lib/contrast/agent/assess/policy/propagation_method.rb +3 -0
- data/lib/contrast/agent/assess/policy/propagator/custom.rb +1 -1
- data/lib/contrast/agent/assess/policy/propagator/database_write.rb +1 -3
- data/lib/contrast/agent/assess/policy/trigger/reflected_xss.rb +90 -0
- data/lib/contrast/agent/assess/policy/trigger/xpath.rb +57 -0
- data/lib/contrast/agent/assess/policy/trigger_method.rb +3 -7
- data/lib/contrast/agent/assess/policy/trigger_node.rb +4 -1
- data/lib/contrast/agent/assess/rule/base.rb +0 -15
- data/lib/contrast/agent/assess/rule/provider/hardcoded_value_rule.rb +22 -5
- data/lib/contrast/agent/assess/rule/redos.rb +0 -1
- data/lib/contrast/agent/at_exit_hook.rb +2 -2
- data/lib/contrast/agent/class_reopener.rb +9 -4
- data/lib/contrast/agent/exclusion_matcher.rb +0 -1
- data/lib/contrast/agent/inventory/policy/datastores.rb +54 -0
- data/lib/contrast/agent/inventory/policy/policy.rb +1 -1
- data/lib/contrast/agent/middleware.rb +38 -34
- data/lib/contrast/agent/patching/policy/after_load_patch.rb +11 -2
- data/lib/contrast/agent/patching/policy/after_load_patcher.rb +51 -56
- data/lib/contrast/agent/patching/policy/patch.rb +2 -1
- data/lib/contrast/agent/patching/policy/patcher.rb +10 -12
- data/lib/contrast/agent/patching/policy/policy_node.rb +1 -1
- data/lib/contrast/agent/patching/policy/trigger_node.rb +1 -1
- data/lib/contrast/agent/protect/policy/applies_command_injection_rule.rb +63 -0
- data/lib/contrast/agent/protect/policy/applies_deserialization_rule.rb +52 -0
- data/lib/contrast/agent/protect/policy/applies_no_sqli_rule.rb +68 -0
- data/lib/contrast/agent/protect/policy/applies_path_traversal_rule.rb +117 -0
- data/lib/contrast/agent/protect/policy/applies_sqli_rule.rb +54 -0
- data/lib/contrast/agent/protect/policy/applies_xxe_rule.rb +129 -0
- data/lib/contrast/agent/protect/policy/policy.rb +6 -6
- data/lib/contrast/agent/protect/policy/rule_applicator.rb +51 -0
- data/lib/contrast/agent/protect/rule.rb +0 -5
- data/lib/contrast/agent/protect/rule/base.rb +6 -5
- data/lib/contrast/agent/protect/rule/cmd_injection.rb +3 -3
- data/lib/contrast/agent/protect/rule/path_traversal.rb +2 -7
- data/lib/contrast/agent/protect/rule/sqli.rb +4 -4
- data/lib/contrast/agent/railtie.rb +1 -0
- data/lib/contrast/agent/request.rb +2 -6
- data/lib/contrast/agent/request_context.rb +5 -6
- data/lib/contrast/agent/request_handler.rb +2 -2
- data/lib/contrast/agent/response.rb +0 -69
- data/lib/contrast/agent/service_heartbeat.rb +2 -2
- data/lib/contrast/agent/socket_client.rb +8 -8
- data/lib/contrast/agent/static_analysis.rb +2 -3
- data/lib/contrast/agent/version.rb +1 -1
- data/lib/contrast/api/decorators/application_settings.rb +1 -1
- data/lib/contrast/api/speedracer.rb +1 -1
- data/lib/contrast/components/agent.rb +17 -12
- data/lib/contrast/components/app_context.rb +33 -1
- data/lib/contrast/components/assess.rb +25 -15
- data/lib/contrast/components/contrast_service.rb +23 -67
- data/lib/contrast/components/interface.rb +4 -12
- data/lib/contrast/components/inventory.rb +5 -1
- data/lib/contrast/components/logger.rb +2 -2
- data/lib/contrast/components/protect.rb +40 -4
- data/lib/contrast/components/scope.rb +2 -52
- data/lib/contrast/components/settings.rb +24 -18
- data/lib/contrast/config/protect_rules_configuration.rb +0 -1
- data/lib/contrast/{extensions/ruby_core → extension}/assess.rb +12 -14
- data/lib/contrast/extension/assess/array.rb +77 -0
- data/lib/contrast/{extensions/ruby_core → extension}/assess/assess_extension.rb +2 -2
- data/lib/contrast/{extensions/ruby_core → extension}/assess/erb.rb +0 -0
- data/lib/contrast/extension/assess/eval_trigger.rb +78 -0
- data/lib/contrast/{extensions/ruby_core → extension}/assess/exec_trigger.rb +1 -1
- data/lib/contrast/{extensions/ruby_core → extension}/assess/fiber.rb +6 -5
- data/lib/contrast/{extensions/ruby_core → extension}/assess/hash.rb +2 -2
- data/lib/contrast/extension/assess/kernel.rb +110 -0
- data/lib/contrast/{extensions/ruby_core → extension}/assess/regexp.rb +4 -4
- data/lib/contrast/{extensions/ruby_core → extension}/assess/string.rb +5 -5
- data/lib/contrast/{extensions/ruby_core → extension}/delegator.rb +0 -0
- data/lib/contrast/{extensions/ruby_core → extension}/inventory.rb +2 -2
- data/lib/contrast/extension/kernel.rb +54 -0
- data/lib/contrast/{extensions/ruby_core → extension}/module.rb +0 -0
- data/lib/contrast/{extensions/ruby_core → extension}/protect.rb +2 -2
- data/lib/contrast/extension/protect/kernel.rb +44 -0
- data/lib/contrast/{extensions/ruby_core → extension}/protect/psych.rb +1 -1
- data/lib/contrast/{extensions/ruby_core → extension}/thread.rb +0 -0
- data/lib/contrast/framework/base_support.rb +22 -0
- data/lib/contrast/framework/manager.rb +33 -8
- data/lib/contrast/framework/rack/patch/session_cookie.rb +126 -0
- data/lib/contrast/framework/rack/patch/support.rb +24 -0
- data/lib/contrast/framework/rack/support.rb +22 -0
- data/lib/contrast/framework/rails/patch/action_controller_live_buffer.rb +43 -0
- data/lib/contrast/framework/rails/patch/assess_configuration.rb +103 -0
- data/lib/contrast/framework/rails/patch/rails_application_configuration.rb +31 -0
- data/lib/contrast/framework/rails/patch/support.rb +67 -0
- data/lib/contrast/framework/rails/rewrite/action_controller_railties_helper_inherited.rb +34 -0
- data/lib/contrast/framework/rails/rewrite/active_record_attribute_methods_read.rb +39 -0
- data/lib/contrast/framework/rails/rewrite/active_record_named.rb +73 -0
- data/lib/contrast/framework/rails/rewrite/active_record_time_zone_inherited.rb +33 -0
- data/lib/contrast/framework/rails/support.rb +115 -0
- data/lib/contrast/framework/sinatra/application_helper.rb +51 -0
- data/lib/contrast/framework/sinatra/patch/base.rb +83 -0
- data/lib/contrast/framework/sinatra/patch/support.rb +27 -0
- data/lib/contrast/framework/sinatra/support.rb +109 -0
- data/lib/contrast/logger/application.rb +80 -0
- data/lib/contrast/{agent/logger.rb → logger/log.rb} +23 -54
- data/lib/contrast/logger/time.rb +50 -0
- data/lib/contrast/tasks/config.rb +54 -0
- data/lib/contrast/tasks/service.rb +1 -5
- data/lib/contrast/utils/class_util.rb +1 -1
- data/lib/contrast/utils/gemfile_reader.rb +2 -2
- data/lib/contrast/utils/hash_digest.rb +2 -7
- data/lib/contrast/utils/invalid_configuration_util.rb +3 -3
- data/lib/contrast/utils/job_servers_running.rb +4 -2
- data/lib/contrast/utils/object_share.rb +0 -1
- data/lib/contrast/utils/service_response_util.rb +14 -12
- data/lib/contrast/utils/service_sender_util.rb +78 -21
- data/resources/assess/policy.json +9 -50
- data/resources/inventory/policy.json +2 -2
- data/resources/protect/policy.json +6 -6
- data/ruby-agent.gemspec +5 -1
- data/service_executables/VERSION +1 -1
- data/service_executables/linux/contrast-service +0 -0
- data/service_executables/mac/contrast-service +0 -0
- metadata +69 -83
- data/funchook/src/libfunchook.dylib +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/lib/contrast/agent/assess/rule/csrf.rb +0 -66
- data/lib/contrast/agent/assess/rule/csrf/csrf_action.rb +0 -28
- data/lib/contrast/agent/assess/rule/csrf/csrf_applicator.rb +0 -53
- data/lib/contrast/agent/assess/rule/csrf/csrf_watcher.rb +0 -136
- data/lib/contrast/agent/assess/rule/response_scanning_rule.rb +0 -47
- data/lib/contrast/agent/assess/rule/response_watcher.rb +0 -36
- data/lib/contrast/agent/assess/rule/watcher.rb +0 -36
- data/lib/contrast/agent/feature_state.rb +0 -346
- data/lib/contrast/agent/protect/rule/csrf.rb +0 -119
- data/lib/contrast/agent/protect/rule/csrf/csrf_evaluator.rb +0 -100
- data/lib/contrast/agent/protect/rule/csrf/csrf_token_injector.rb +0 -85
- data/lib/contrast/agent/settings_state.rb +0 -88
- data/lib/contrast/api/decorators/exclusion.rb +0 -20
- data/lib/contrast/extensions/framework/rack/cookie.rb +0 -24
- data/lib/contrast/extensions/framework/rack/request.rb +0 -24
- data/lib/contrast/extensions/framework/rack/response.rb +0 -23
- data/lib/contrast/extensions/framework/rails/action_controller_inheritance.rb +0 -39
- data/lib/contrast/extensions/framework/rails/action_controller_railties_helper_inherited.rb +0 -20
- data/lib/contrast/extensions/framework/rails/active_record.rb +0 -26
- data/lib/contrast/extensions/framework/rails/active_record_named.rb +0 -58
- data/lib/contrast/extensions/framework/rails/active_record_time_zone_inherited.rb +0 -21
- data/lib/contrast/extensions/framework/rails/buffer.rb +0 -28
- data/lib/contrast/extensions/framework/rails/configuration.rb +0 -27
- data/lib/contrast/extensions/framework/sinatra/base.rb +0 -59
- data/lib/contrast/extensions/ruby_core/assess/array.rb +0 -59
- data/lib/contrast/extensions/ruby_core/assess/basic_object.rb +0 -15
- data/lib/contrast/extensions/ruby_core/assess/kernel.rb +0 -96
- data/lib/contrast/extensions/ruby_core/assess/module.rb +0 -14
- data/lib/contrast/extensions/ruby_core/assess/tilt_template_trigger.rb +0 -78
- data/lib/contrast/extensions/ruby_core/assess/xpath_library_trigger.rb +0 -40
- data/lib/contrast/extensions/ruby_core/eval_trigger.rb +0 -51
- data/lib/contrast/extensions/ruby_core/inventory/datastores.rb +0 -37
- data/lib/contrast/extensions/ruby_core/protect/applies_command_injection_rule.rb +0 -61
- data/lib/contrast/extensions/ruby_core/protect/applies_deserialization_rule.rb +0 -50
- data/lib/contrast/extensions/ruby_core/protect/applies_no_sqli_rule.rb +0 -66
- data/lib/contrast/extensions/ruby_core/protect/applies_path_traversal_rule.rb +0 -115
- data/lib/contrast/extensions/ruby_core/protect/applies_sqli_rule.rb +0 -53
- data/lib/contrast/extensions/ruby_core/protect/applies_xxe_rule.rb +0 -127
- data/lib/contrast/extensions/ruby_core/protect/kernel.rb +0 -30
- data/lib/contrast/extensions/ruby_core/protect/rule_applicator.rb +0 -50
- data/lib/contrast/framework/rails_support.rb +0 -104
- data/lib/contrast/framework/sinatra_application_helper.rb +0 -49
- data/lib/contrast/framework/sinatra_support.rb +0 -104
- data/lib/contrast/utils/data_store_util.rb +0 -23
- data/lib/contrast/utils/rack_assess_session_cookie.rb +0 -104
- data/lib/contrast/utils/rails_assess_configuration.rb +0 -95
- data/lib/contrast/utils/random_util.rb +0 -22
- data/resources/csrf/inject.js +0 -44
@@ -2,8 +2,8 @@
|
|
2
2
|
"rules":[
|
3
3
|
{
|
4
4
|
"name":"data_store",
|
5
|
-
"applicator": "Contrast::
|
6
|
-
"applicator_method": "
|
5
|
+
"applicator": "Contrast::Agent::Inventory::Policy::DataStores",
|
6
|
+
"applicator_method": "report_data_store",
|
7
7
|
"required_properties": ["data_store"],
|
8
8
|
"optional_properties": [],
|
9
9
|
"triggers":[
|
@@ -2,7 +2,7 @@
|
|
2
2
|
"rules":[
|
3
3
|
{
|
4
4
|
"name": "cmd-injection",
|
5
|
-
"applicator": "Contrast::
|
5
|
+
"applicator": "Contrast::Agent::Protect::Policy::AppliesCommandInjectionRule",
|
6
6
|
"applicator_method": "apply_rule",
|
7
7
|
"required_properties": [],
|
8
8
|
"optional_properties": [],
|
@@ -114,7 +114,7 @@
|
|
114
114
|
},
|
115
115
|
{
|
116
116
|
"name": "nosql-injection",
|
117
|
-
"applicator": "Contrast::
|
117
|
+
"applicator": "Contrast::Agent::Protect::Policy::AppliesNoSqliRule",
|
118
118
|
"applicator_method": "apply_rule",
|
119
119
|
"required_properties": ["database"],
|
120
120
|
"optional_properties": [],
|
@@ -156,7 +156,7 @@
|
|
156
156
|
},
|
157
157
|
{
|
158
158
|
"name":"path-traversal",
|
159
|
-
"applicator": "Contrast::
|
159
|
+
"applicator": "Contrast::Agent::Protect::Policy::AppliesPathTraversalRule",
|
160
160
|
"applicator_method": "apply_rule",
|
161
161
|
"required_properties": ["action"],
|
162
162
|
"optional_properties": [],
|
@@ -254,7 +254,7 @@
|
|
254
254
|
},
|
255
255
|
{
|
256
256
|
"name": "sql-injection",
|
257
|
-
"applicator": "Contrast::
|
257
|
+
"applicator": "Contrast::Agent::Protect::Policy::AppliesSqliRule",
|
258
258
|
"applicator_method": "apply_rule",
|
259
259
|
"required_properties": ["index", "database"],
|
260
260
|
"optional_properties": [],
|
@@ -336,7 +336,7 @@
|
|
336
336
|
},
|
337
337
|
{
|
338
338
|
"name": "untrusted-deserialization",
|
339
|
-
"applicator": "Contrast::
|
339
|
+
"applicator": "Contrast::Agent::Protect::Policy::AppliesDeserializationRule",
|
340
340
|
"applicator_method": "apply_rule",
|
341
341
|
"required_properties": [],
|
342
342
|
"optional_properties": [],
|
@@ -361,7 +361,7 @@
|
|
361
361
|
},
|
362
362
|
{
|
363
363
|
"name": "xxe",
|
364
|
-
"applicator": "Contrast::
|
364
|
+
"applicator": "Contrast::Agent::Protect::Policy::AppliesXxeRule",
|
365
365
|
"applicator_method": "apply_rule",
|
366
366
|
"required_properties": [],
|
367
367
|
"optional_properties": [],
|
data/ruby-agent.gemspec
CHANGED
@@ -71,7 +71,7 @@ def self.add_dependencies spec
|
|
71
71
|
spec.add_dependency 'google-protobuf', '~> 3.9.0'
|
72
72
|
spec.add_dependency 'ougai', '~> 1.8'
|
73
73
|
spec.add_dependency 'parser', '~> 2.6'
|
74
|
-
spec.add_dependency 'rack', '>=
|
74
|
+
spec.add_dependency 'rack', '>= 2.0', '< 3.0'
|
75
75
|
end
|
76
76
|
|
77
77
|
# Enumerate the files required to build the Agent.
|
@@ -126,6 +126,10 @@ Gem::Specification.new do |spec|
|
|
126
126
|
spec.extensions = Dir['ext/cs__common/extconf.rb', 'ext/**/extconf.rb']
|
127
127
|
spec.require_paths = ['lib']
|
128
128
|
|
129
|
+
unless File.exist?(File.join(Dir.pwd, 'contrast_security.yaml'))
|
130
|
+
spec.post_install_message = 'To generate the required contrast_security.yaml file you can run: bundle exec rake contrast:config:create'
|
131
|
+
end
|
132
|
+
|
129
133
|
add_authors(spec)
|
130
134
|
add_files(spec)
|
131
135
|
add_dev_dependencies(spec)
|
data/service_executables/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.8.1
|
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.12.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-06-22 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: amazing_print
|
@@ -440,7 +440,7 @@ dependencies:
|
|
440
440
|
requirements:
|
441
441
|
- - ">="
|
442
442
|
- !ruby/object:Gem::Version
|
443
|
-
version: '
|
443
|
+
version: '2.0'
|
444
444
|
- - "<"
|
445
445
|
- !ruby/object:Gem::Version
|
446
446
|
version: '3.0'
|
@@ -450,7 +450,7 @@ dependencies:
|
|
450
450
|
requirements:
|
451
451
|
- - ">="
|
452
452
|
- !ruby/object:Gem::Version
|
453
|
-
version: '
|
453
|
+
version: '2.0'
|
454
454
|
- - "<"
|
455
455
|
- !ruby/object:Gem::Version
|
456
456
|
version: '3.0'
|
@@ -462,24 +462,25 @@ executables:
|
|
462
462
|
- contrast_service
|
463
463
|
extensions:
|
464
464
|
- ext/cs__common/extconf.rb
|
465
|
-
- ext/
|
466
|
-
- ext/
|
467
|
-
- ext/
|
468
|
-
- ext/cs__protect_kernel/extconf.rb
|
469
|
-
- ext/cs__assess_regexp/extconf.rb
|
465
|
+
- ext/cs__assess_marshal_module/extconf.rb
|
466
|
+
- ext/cs__assess_basic_object/extconf.rb
|
467
|
+
- ext/cs__assess_fiber_track/extconf.rb
|
470
468
|
- ext/cs__assess_string_interpolation26/extconf.rb
|
471
|
-
- ext/
|
469
|
+
- ext/cs__contrast_patch/extconf.rb
|
472
470
|
- ext/cs__assess_array/extconf.rb
|
473
|
-
- ext/
|
474
|
-
- ext/cs__assess_marshal_module/extconf.rb
|
471
|
+
- ext/cs__assess_kernel/extconf.rb
|
475
472
|
- ext/cs__assess_string/extconf.rb
|
476
|
-
- ext/
|
477
|
-
- ext/
|
473
|
+
- ext/cs__assess_hash/extconf.rb
|
474
|
+
- ext/cs__assess_module/extconf.rb
|
475
|
+
- ext/cs__assess_regexp/extconf.rb
|
476
|
+
- ext/cs__assess_yield_track/extconf.rb
|
478
477
|
- ext/cs__assess_active_record_named/extconf.rb
|
478
|
+
- ext/cs__protect_kernel/extconf.rb
|
479
479
|
extra_rdoc_files: []
|
480
480
|
files:
|
481
481
|
- ".clang-format"
|
482
482
|
- ".dockerignore"
|
483
|
+
- ".flayignore"
|
483
484
|
- ".gitignore"
|
484
485
|
- ".gitmodules"
|
485
486
|
- ".rspec"
|
@@ -663,7 +664,7 @@ files:
|
|
663
664
|
- funchook/src/funchook_x86.o
|
664
665
|
- funchook/src/instructions.o
|
665
666
|
- funchook/src/insts.o
|
666
|
-
- funchook/src/libfunchook.
|
667
|
+
- funchook/src/libfunchook.so
|
667
668
|
- funchook/src/mnemonics.o
|
668
669
|
- funchook/src/operands.o
|
669
670
|
- funchook/src/os_func.c
|
@@ -683,8 +684,6 @@ files:
|
|
683
684
|
- funchook/test/funchook_test
|
684
685
|
- funchook/test/libfunchook_test.c
|
685
686
|
- funchook/test/libfunchook_test.so
|
686
|
-
- funchook/test/libfunchook_test.so.dSYM/Contents/Info.plist
|
687
|
-
- funchook/test/libfunchook_test.so.dSYM/Contents/Resources/DWARF/libfunchook_test.so
|
688
687
|
- funchook/test/libfunchook_test2.c
|
689
688
|
- funchook/test/suffix.list
|
690
689
|
- funchook/test/test_main.c
|
@@ -742,6 +741,8 @@ files:
|
|
742
741
|
- lib/contrast/agent/assess/policy/source_node.rb
|
743
742
|
- lib/contrast/agent/assess/policy/source_validation/cross_site_validator.rb
|
744
743
|
- lib/contrast/agent/assess/policy/source_validation/source_validation.rb
|
744
|
+
- lib/contrast/agent/assess/policy/trigger/reflected_xss.rb
|
745
|
+
- lib/contrast/agent/assess/policy/trigger/xpath.rb
|
745
746
|
- lib/contrast/agent/assess/policy/trigger_method.rb
|
746
747
|
- lib/contrast/agent/assess/policy/trigger_node.rb
|
747
748
|
- lib/contrast/agent/assess/policy/trigger_validation/ssrf_validator.rb
|
@@ -750,18 +751,11 @@ files:
|
|
750
751
|
- lib/contrast/agent/assess/properties.rb
|
751
752
|
- lib/contrast/agent/assess/rule.rb
|
752
753
|
- lib/contrast/agent/assess/rule/base.rb
|
753
|
-
- lib/contrast/agent/assess/rule/csrf.rb
|
754
|
-
- lib/contrast/agent/assess/rule/csrf/csrf_action.rb
|
755
|
-
- lib/contrast/agent/assess/rule/csrf/csrf_applicator.rb
|
756
|
-
- lib/contrast/agent/assess/rule/csrf/csrf_watcher.rb
|
757
754
|
- lib/contrast/agent/assess/rule/provider.rb
|
758
755
|
- lib/contrast/agent/assess/rule/provider/hardcoded_key.rb
|
759
756
|
- lib/contrast/agent/assess/rule/provider/hardcoded_password.rb
|
760
757
|
- lib/contrast/agent/assess/rule/provider/hardcoded_value_rule.rb
|
761
758
|
- lib/contrast/agent/assess/rule/redos.rb
|
762
|
-
- lib/contrast/agent/assess/rule/response_scanning_rule.rb
|
763
|
-
- lib/contrast/agent/assess/rule/response_watcher.rb
|
764
|
-
- lib/contrast/agent/assess/rule/watcher.rb
|
765
759
|
- lib/contrast/agent/assess/tag.rb
|
766
760
|
- lib/contrast/agent/at_exit_hook.rb
|
767
761
|
- lib/contrast/agent/class_reopener.rb
|
@@ -769,10 +763,9 @@ files:
|
|
769
763
|
- lib/contrast/agent/deadzone/policy/policy.rb
|
770
764
|
- lib/contrast/agent/disable_reaction.rb
|
771
765
|
- lib/contrast/agent/exclusion_matcher.rb
|
772
|
-
- lib/contrast/agent/
|
766
|
+
- lib/contrast/agent/inventory/policy/datastores.rb
|
773
767
|
- lib/contrast/agent/inventory/policy/policy.rb
|
774
768
|
- lib/contrast/agent/inventory/policy/trigger_node.rb
|
775
|
-
- lib/contrast/agent/logger.rb
|
776
769
|
- lib/contrast/agent/middleware.rb
|
777
770
|
- lib/contrast/agent/module_data.rb
|
778
771
|
- lib/contrast/agent/patching/policy/after_load_patch.rb
|
@@ -785,15 +778,19 @@ files:
|
|
785
778
|
- lib/contrast/agent/patching/policy/policy.rb
|
786
779
|
- lib/contrast/agent/patching/policy/policy_node.rb
|
787
780
|
- lib/contrast/agent/patching/policy/trigger_node.rb
|
781
|
+
- lib/contrast/agent/protect/policy/applies_command_injection_rule.rb
|
782
|
+
- lib/contrast/agent/protect/policy/applies_deserialization_rule.rb
|
783
|
+
- lib/contrast/agent/protect/policy/applies_no_sqli_rule.rb
|
784
|
+
- lib/contrast/agent/protect/policy/applies_path_traversal_rule.rb
|
785
|
+
- lib/contrast/agent/protect/policy/applies_sqli_rule.rb
|
786
|
+
- lib/contrast/agent/protect/policy/applies_xxe_rule.rb
|
788
787
|
- lib/contrast/agent/protect/policy/policy.rb
|
788
|
+
- lib/contrast/agent/protect/policy/rule_applicator.rb
|
789
789
|
- lib/contrast/agent/protect/policy/trigger_node.rb
|
790
790
|
- lib/contrast/agent/protect/rule.rb
|
791
791
|
- lib/contrast/agent/protect/rule/base.rb
|
792
792
|
- lib/contrast/agent/protect/rule/base_service.rb
|
793
793
|
- lib/contrast/agent/protect/rule/cmd_injection.rb
|
794
|
-
- lib/contrast/agent/protect/rule/csrf.rb
|
795
|
-
- lib/contrast/agent/protect/rule/csrf/csrf_evaluator.rb
|
796
|
-
- lib/contrast/agent/protect/rule/csrf/csrf_token_injector.rb
|
797
794
|
- lib/contrast/agent/protect/rule/default_scanner.rb
|
798
795
|
- lib/contrast/agent/protect/rule/deserialization.rb
|
799
796
|
- lib/contrast/agent/protect/rule/http_method_tampering.rb
|
@@ -820,7 +817,6 @@ files:
|
|
820
817
|
- lib/contrast/agent/rule_set.rb
|
821
818
|
- lib/contrast/agent/scope.rb
|
822
819
|
- lib/contrast/agent/service_heartbeat.rb
|
823
|
-
- lib/contrast/agent/settings_state.rb
|
824
820
|
- lib/contrast/agent/socket_client.rb
|
825
821
|
- lib/contrast/agent/static_analysis.rb
|
826
822
|
- lib/contrast/agent/thread.rb
|
@@ -832,7 +828,6 @@ files:
|
|
832
828
|
- lib/contrast/api/decorators.rb
|
833
829
|
- lib/contrast/api/decorators/application_settings.rb
|
834
830
|
- lib/contrast/api/decorators/application_update.rb
|
835
|
-
- lib/contrast/api/decorators/exclusion.rb
|
836
831
|
- lib/contrast/api/decorators/input_analysis.rb
|
837
832
|
- lib/contrast/api/decorators/server_features.rb
|
838
833
|
- lib/contrast/api/dtm_pb.rb
|
@@ -875,63 +870,57 @@ files:
|
|
875
870
|
- lib/contrast/config/server_configuration.rb
|
876
871
|
- lib/contrast/config/service_configuration.rb
|
877
872
|
- lib/contrast/configuration.rb
|
878
|
-
- lib/contrast/
|
879
|
-
- lib/contrast/
|
880
|
-
- lib/contrast/
|
881
|
-
- lib/contrast/
|
882
|
-
- lib/contrast/
|
883
|
-
- lib/contrast/
|
884
|
-
- lib/contrast/
|
885
|
-
- lib/contrast/
|
886
|
-
- lib/contrast/
|
887
|
-
- lib/contrast/
|
888
|
-
- lib/contrast/
|
889
|
-
- lib/contrast/
|
890
|
-
- lib/contrast/
|
891
|
-
- lib/contrast/
|
892
|
-
- lib/contrast/
|
893
|
-
- lib/contrast/
|
894
|
-
- lib/contrast/
|
895
|
-
- lib/contrast/
|
896
|
-
- lib/contrast/
|
897
|
-
- lib/contrast/extensions/ruby_core/assess/kernel.rb
|
898
|
-
- lib/contrast/extensions/ruby_core/assess/module.rb
|
899
|
-
- lib/contrast/extensions/ruby_core/assess/regexp.rb
|
900
|
-
- lib/contrast/extensions/ruby_core/assess/string.rb
|
901
|
-
- lib/contrast/extensions/ruby_core/assess/tilt_template_trigger.rb
|
902
|
-
- lib/contrast/extensions/ruby_core/assess/xpath_library_trigger.rb
|
903
|
-
- lib/contrast/extensions/ruby_core/delegator.rb
|
904
|
-
- lib/contrast/extensions/ruby_core/eval_trigger.rb
|
905
|
-
- lib/contrast/extensions/ruby_core/inventory.rb
|
906
|
-
- lib/contrast/extensions/ruby_core/inventory/datastores.rb
|
907
|
-
- lib/contrast/extensions/ruby_core/module.rb
|
908
|
-
- lib/contrast/extensions/ruby_core/protect.rb
|
909
|
-
- lib/contrast/extensions/ruby_core/protect/applies_command_injection_rule.rb
|
910
|
-
- lib/contrast/extensions/ruby_core/protect/applies_deserialization_rule.rb
|
911
|
-
- lib/contrast/extensions/ruby_core/protect/applies_no_sqli_rule.rb
|
912
|
-
- lib/contrast/extensions/ruby_core/protect/applies_path_traversal_rule.rb
|
913
|
-
- lib/contrast/extensions/ruby_core/protect/applies_sqli_rule.rb
|
914
|
-
- lib/contrast/extensions/ruby_core/protect/applies_xxe_rule.rb
|
915
|
-
- lib/contrast/extensions/ruby_core/protect/kernel.rb
|
916
|
-
- lib/contrast/extensions/ruby_core/protect/psych.rb
|
917
|
-
- lib/contrast/extensions/ruby_core/protect/rule_applicator.rb
|
918
|
-
- lib/contrast/extensions/ruby_core/thread.rb
|
873
|
+
- lib/contrast/extension/assess.rb
|
874
|
+
- lib/contrast/extension/assess/array.rb
|
875
|
+
- lib/contrast/extension/assess/assess_extension.rb
|
876
|
+
- lib/contrast/extension/assess/erb.rb
|
877
|
+
- lib/contrast/extension/assess/eval_trigger.rb
|
878
|
+
- lib/contrast/extension/assess/exec_trigger.rb
|
879
|
+
- lib/contrast/extension/assess/fiber.rb
|
880
|
+
- lib/contrast/extension/assess/hash.rb
|
881
|
+
- lib/contrast/extension/assess/kernel.rb
|
882
|
+
- lib/contrast/extension/assess/regexp.rb
|
883
|
+
- lib/contrast/extension/assess/string.rb
|
884
|
+
- lib/contrast/extension/delegator.rb
|
885
|
+
- lib/contrast/extension/inventory.rb
|
886
|
+
- lib/contrast/extension/kernel.rb
|
887
|
+
- lib/contrast/extension/module.rb
|
888
|
+
- lib/contrast/extension/protect.rb
|
889
|
+
- lib/contrast/extension/protect/kernel.rb
|
890
|
+
- lib/contrast/extension/protect/psych.rb
|
891
|
+
- lib/contrast/extension/thread.rb
|
919
892
|
- lib/contrast/framework/base_support.rb
|
920
893
|
- lib/contrast/framework/manager.rb
|
921
894
|
- lib/contrast/framework/platform_version.rb
|
922
|
-
- lib/contrast/framework/
|
923
|
-
- lib/contrast/framework/
|
924
|
-
- lib/contrast/framework/
|
895
|
+
- lib/contrast/framework/rack/patch/session_cookie.rb
|
896
|
+
- lib/contrast/framework/rack/patch/support.rb
|
897
|
+
- lib/contrast/framework/rack/support.rb
|
898
|
+
- lib/contrast/framework/rails/patch/action_controller_live_buffer.rb
|
899
|
+
- lib/contrast/framework/rails/patch/assess_configuration.rb
|
900
|
+
- lib/contrast/framework/rails/patch/rails_application_configuration.rb
|
901
|
+
- lib/contrast/framework/rails/patch/support.rb
|
902
|
+
- lib/contrast/framework/rails/rewrite/action_controller_railties_helper_inherited.rb
|
903
|
+
- lib/contrast/framework/rails/rewrite/active_record_attribute_methods_read.rb
|
904
|
+
- lib/contrast/framework/rails/rewrite/active_record_named.rb
|
905
|
+
- lib/contrast/framework/rails/rewrite/active_record_time_zone_inherited.rb
|
906
|
+
- lib/contrast/framework/rails/support.rb
|
907
|
+
- lib/contrast/framework/sinatra/application_helper.rb
|
908
|
+
- lib/contrast/framework/sinatra/patch/base.rb
|
909
|
+
- lib/contrast/framework/sinatra/patch/support.rb
|
910
|
+
- lib/contrast/framework/sinatra/support.rb
|
925
911
|
- lib/contrast/framework/view_technologies_descriptor.rb
|
926
912
|
- lib/contrast/internal_exception.rb
|
913
|
+
- lib/contrast/logger/application.rb
|
914
|
+
- lib/contrast/logger/log.rb
|
915
|
+
- lib/contrast/logger/time.rb
|
927
916
|
- lib/contrast/security_exception.rb
|
917
|
+
- lib/contrast/tasks/config.rb
|
928
918
|
- lib/contrast/tasks/service.rb
|
929
919
|
- lib/contrast/utils/assess/sampling_util.rb
|
930
920
|
- lib/contrast/utils/assess/tracking_util.rb
|
931
921
|
- lib/contrast/utils/boolean_util.rb
|
932
922
|
- lib/contrast/utils/cache.rb
|
933
923
|
- lib/contrast/utils/class_util.rb
|
934
|
-
- lib/contrast/utils/data_store_util.rb
|
935
924
|
- lib/contrast/utils/duck_utils.rb
|
936
925
|
- lib/contrast/utils/env_configuration_item.rb
|
937
926
|
- lib/contrast/utils/freeze_util.rb
|
@@ -946,9 +935,6 @@ files:
|
|
946
935
|
- lib/contrast/utils/os.rb
|
947
936
|
- lib/contrast/utils/preflight_util.rb
|
948
937
|
- lib/contrast/utils/prevent_serialization.rb
|
949
|
-
- lib/contrast/utils/rack_assess_session_cookie.rb
|
950
|
-
- lib/contrast/utils/rails_assess_configuration.rb
|
951
|
-
- lib/contrast/utils/random_util.rb
|
952
938
|
- lib/contrast/utils/resource_loader.rb
|
953
939
|
- lib/contrast/utils/ruby_ast_rewriter.rb
|
954
940
|
- lib/contrast/utils/service_response_util.rb
|
@@ -961,7 +947,6 @@ files:
|
|
961
947
|
- lib/contrast/utils/thread_tracker.rb
|
962
948
|
- lib/contrast/utils/timer.rb
|
963
949
|
- resources/assess/policy.json
|
964
|
-
- resources/csrf/inject.js
|
965
950
|
- resources/deadzone/policy.json
|
966
951
|
- resources/inventory/policy.json
|
967
952
|
- resources/protect/policy.json
|
@@ -973,7 +958,7 @@ files:
|
|
973
958
|
- service_executables/mac/contrast-service
|
974
959
|
- shared_libraries/.gitkeep
|
975
960
|
- shared_libraries/funchook.h
|
976
|
-
- shared_libraries/libfunchook.
|
961
|
+
- shared_libraries/libfunchook.so
|
977
962
|
homepage: https://www.contrastsecurity.com
|
978
963
|
licenses:
|
979
964
|
- CONTRAST SECURITY (see license file)
|
@@ -982,7 +967,8 @@ metadata:
|
|
982
967
|
support_uri: https://support.contrastsecurity.com
|
983
968
|
trouble_shooting_uri: https://support.contrastsecurity.com/hc/en-us/search?utf8=%E2%9C%93&query=Ruby
|
984
969
|
wiki_uri: https://docs.contrastsecurity.com/
|
985
|
-
post_install_message:
|
970
|
+
post_install_message: 'To generate the required contrast_security.yaml file you can
|
971
|
+
run: bundle exec rake contrast:config:create'
|
986
972
|
rdoc_options: []
|
987
973
|
require_paths:
|
988
974
|
- lib
|
@@ -1000,7 +986,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1000
986
|
- !ruby/object:Gem::Version
|
1001
987
|
version: '0'
|
1002
988
|
requirements: []
|
1003
|
-
rubygems_version: 3.
|
989
|
+
rubygems_version: 3.0.3
|
1004
990
|
signing_key:
|
1005
991
|
specification_version: 4
|
1006
992
|
summary: Contrast Security's agent for rack-based applications.
|
Binary file
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
-
<plist version="1.0">
|
4
|
-
<dict>
|
5
|
-
<key>CFBundleDevelopmentRegion</key>
|
6
|
-
<string>English</string>
|
7
|
-
<key>CFBundleIdentifier</key>
|
8
|
-
<string>com.apple.xcode.dsym.libfunchook_test.so</string>
|
9
|
-
<key>CFBundleInfoDictionaryVersion</key>
|
10
|
-
<string>6.0</string>
|
11
|
-
<key>CFBundlePackageType</key>
|
12
|
-
<string>dSYM</string>
|
13
|
-
<key>CFBundleSignature</key>
|
14
|
-
<string>????</string>
|
15
|
-
<key>CFBundleShortVersionString</key>
|
16
|
-
<string>1.0</string>
|
17
|
-
<key>CFBundleVersion</key>
|
18
|
-
<string>1</string>
|
19
|
-
</dict>
|
20
|
-
</plist>
|
Binary file
|
@@ -1,66 +0,0 @@
|
|
1
|
-
# Copyright (c) 2020 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
module Contrast
|
5
|
-
module Agent
|
6
|
-
module Assess
|
7
|
-
module Rule
|
8
|
-
# The Ruby implementation of the CSRF Assess Rule.
|
9
|
-
class Csrf < Contrast::Agent::Assess::Rule::ResponseScanningRule
|
10
|
-
NAME = 'csrf'
|
11
|
-
def name
|
12
|
-
NAME
|
13
|
-
end
|
14
|
-
|
15
|
-
DB_STATE_CHANGE = 'db'
|
16
|
-
ACTION_LIMIT = 3
|
17
|
-
QUERY_SIZE_LIMIT = 50
|
18
|
-
STATE_CHANGING_ACTIONS_KEY = 'csrf.statechange.actions'
|
19
|
-
def record_db_state_change context, query
|
20
|
-
return unless context
|
21
|
-
|
22
|
-
changes = context.get_property(STATE_CHANGING_ACTIONS_KEY)
|
23
|
-
changes ||= []
|
24
|
-
return unless changes.length < ACTION_LIMIT
|
25
|
-
|
26
|
-
return unless state_change?(query)
|
27
|
-
|
28
|
-
action = Contrast::Agent::Assess::Rule::Csrf::CsrfAction.new
|
29
|
-
action.type = DB_STATE_CHANGE
|
30
|
-
action.evidence = query[0..QUERY_SIZE_LIMIT]
|
31
|
-
|
32
|
-
changes << action
|
33
|
-
|
34
|
-
context.add_property(STATE_CHANGING_ACTIONS_KEY, changes)
|
35
|
-
end
|
36
|
-
|
37
|
-
STATE_CHANGE_QUERY_ACTIONS = %w[
|
38
|
-
insert
|
39
|
-
update
|
40
|
-
delete
|
41
|
-
drop
|
42
|
-
create
|
43
|
-
alter
|
44
|
-
upsert
|
45
|
-
].cs__freeze
|
46
|
-
# Returns true if the given query starts with any
|
47
|
-
# of the STATE_CHANGE_QUERY_ACTIONS listed above
|
48
|
-
def state_change? query
|
49
|
-
return false unless query.is_a?(String) && !query.empty?
|
50
|
-
|
51
|
-
query.downcase.start_with?(*STATE_CHANGE_QUERY_ACTIONS)
|
52
|
-
end
|
53
|
-
|
54
|
-
# some watchers keep state and need to be reset in each request.
|
55
|
-
# this one is not one of those.
|
56
|
-
def watcher
|
57
|
-
@_watcher ||= Contrast::Agent::Assess::Rule::Csrf::Watcher.new
|
58
|
-
end
|
59
|
-
|
60
|
-
# Indicates if this request has been checked for a CSRF token
|
61
|
-
CHECKED = 'csrf.token.checked'
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
66
|
-
end
|