contrast-agent 3.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.clang-format +5 -0
- data/.dockerignore +10 -0
- data/.gitignore +58 -0
- data/.gitmodules +6 -0
- data/.rspec +6 -0
- data/.simplecov +4 -0
- data/Gemfile +7 -0
- data/LICENSE.txt +12 -0
- data/Rakefile +15 -0
- data/exe/contrast_service +29 -0
- data/ext/build_funchook.rb +48 -0
- data/ext/cs__assess_active_record_named/cs__active_record_named.c +47 -0
- data/ext/cs__assess_active_record_named/cs__active_record_named.h +10 -0
- data/ext/cs__assess_active_record_named/extconf.rb +2 -0
- data/ext/cs__assess_array/cs__assess_array.c +38 -0
- data/ext/cs__assess_array/cs__assess_array.h +9 -0
- data/ext/cs__assess_array/extconf.rb +2 -0
- data/ext/cs__assess_basic_object/cs__assess_basic_object.c +50 -0
- data/ext/cs__assess_basic_object/cs__assess_basic_object.h +17 -0
- data/ext/cs__assess_basic_object/extconf.rb +2 -0
- data/ext/cs__assess_fiber_track/cs__assess_fiber_track.c +86 -0
- data/ext/cs__assess_fiber_track/cs__assess_fiber_track.h +34 -0
- data/ext/cs__assess_fiber_track/extconf.rb +2 -0
- data/ext/cs__assess_hash/cs__assess_hash.c +64 -0
- data/ext/cs__assess_hash/cs__assess_hash.h +24 -0
- data/ext/cs__assess_hash/extconf.rb +2 -0
- data/ext/cs__assess_kernel/cs__assess_kernel.c +36 -0
- data/ext/cs__assess_kernel/cs__assess_kernel.h +10 -0
- data/ext/cs__assess_kernel/extconf.rb +2 -0
- data/ext/cs__assess_marshal_module/cs__assess_marshal_module.c +47 -0
- data/ext/cs__assess_marshal_module/cs__assess_marshal_module.h +18 -0
- data/ext/cs__assess_marshal_module/extconf.rb +2 -0
- data/ext/cs__assess_module/cs__assess_module.c +78 -0
- data/ext/cs__assess_module/cs__assess_module.h +25 -0
- data/ext/cs__assess_module/extconf.rb +2 -0
- data/ext/cs__assess_regexp/cs__assess_regexp.c +48 -0
- data/ext/cs__assess_regexp/cs__assess_regexp.h +22 -0
- data/ext/cs__assess_regexp/extconf.rb +2 -0
- data/ext/cs__assess_regexp_track/cs__assess_regexp_track.c +63 -0
- data/ext/cs__assess_regexp_track/cs__assess_regexp_track.h +29 -0
- data/ext/cs__assess_regexp_track/extconf.rb +2 -0
- data/ext/cs__assess_string/cs__assess_string.c +38 -0
- data/ext/cs__assess_string/cs__assess_string.h +19 -0
- data/ext/cs__assess_string/extconf.rb +2 -0
- data/ext/cs__assess_string_interpolation26/cs__assess_string_interpolation26.c +31 -0
- data/ext/cs__assess_string_interpolation26/cs__assess_string_interpolation26.h +13 -0
- data/ext/cs__assess_string_interpolation26/extconf.rb +2 -0
- data/ext/cs__common/cs__common.c +60 -0
- data/ext/cs__common/cs__common.h +28 -0
- data/ext/cs__common/extconf.rb +20 -0
- data/ext/cs__contrast_patch/cs__contrast_patch.c +445 -0
- data/ext/cs__contrast_patch/cs__contrast_patch.h +196 -0
- data/ext/cs__contrast_patch/extconf.rb +2 -0
- data/ext/cs__protect_kernel/cs__protect_kernel.c +37 -0
- data/ext/cs__protect_kernel/cs__protect_kernel.h +11 -0
- data/ext/cs__protect_kernel/extconf.rb +2 -0
- data/ext/cs__scope/cs__scope.c +96 -0
- data/ext/cs__scope/cs__scope.h +33 -0
- data/ext/cs__scope/extconf.rb +2 -0
- data/ext/extconf_common.rb +49 -0
- data/funchook/LICENSE +360 -0
- data/funchook/Makefile +29 -0
- data/funchook/Makefile.in +29 -0
- data/funchook/README.md +121 -0
- data/funchook/appveyor.yml +42 -0
- data/funchook/autogen.sh +3 -0
- data/funchook/autom4te.cache/output.0 +4976 -0
- data/funchook/autom4te.cache/requests +78 -0
- data/funchook/autom4te.cache/traces.0 +364 -0
- data/funchook/config.guess +1530 -0
- data/funchook/config.log +490 -0
- data/funchook/config.status +1016 -0
- data/funchook/config.sub +1773 -0
- data/funchook/configure +4976 -0
- data/funchook/configure.ac +59 -0
- data/funchook/distorm/COPYING +26 -0
- data/funchook/distorm/MANIFEST +25 -0
- data/funchook/distorm/MANIFEST.in +4 -0
- data/funchook/distorm/README.md +12 -0
- data/funchook/distorm/disOps/disOps.py +795 -0
- data/funchook/distorm/disOps/x86db.py +404 -0
- data/funchook/distorm/disOps/x86header.py +247 -0
- data/funchook/distorm/disOps/x86sets.py +1664 -0
- data/funchook/distorm/examples/cs/TestdiStorm/Program.cs +79 -0
- data/funchook/distorm/examples/cs/TestdiStorm/Properties/AssemblyInfo.cs +36 -0
- data/funchook/distorm/examples/cs/TestdiStorm/TestdiStorm.csproj +69 -0
- data/funchook/distorm/examples/cs/distorm-net.sln +26 -0
- data/funchook/distorm/examples/cs/distorm-net/CodeInfo.cs +23 -0
- data/funchook/distorm/examples/cs/distorm-net/DecodedInst.cs +15 -0
- data/funchook/distorm/examples/cs/distorm-net/DecodedResult.cs +14 -0
- data/funchook/distorm/examples/cs/distorm-net/DecomposedInst.cs +36 -0
- data/funchook/distorm/examples/cs/distorm-net/DecomposedResult.cs +14 -0
- data/funchook/distorm/examples/cs/distorm-net/Opcodes.cs +1268 -0
- data/funchook/distorm/examples/cs/distorm-net/Opcodes.tt +37 -0
- data/funchook/distorm/examples/cs/distorm-net/Operand.cs +25 -0
- data/funchook/distorm/examples/cs/distorm-net/Properties/AssemblyInfo.cs +36 -0
- data/funchook/distorm/examples/cs/distorm-net/diStorm3.cs +411 -0
- data/funchook/distorm/examples/cs/distorm-net/distorm-net.csproj +80 -0
- data/funchook/distorm/examples/cs/readme +3 -0
- data/funchook/distorm/examples/ddk/README +48 -0
- data/funchook/distorm/examples/ddk/distorm.ini +11 -0
- data/funchook/distorm/examples/ddk/dummy.c +15 -0
- data/funchook/distorm/examples/ddk/main.c +91 -0
- data/funchook/distorm/examples/ddk/makefile +1 -0
- data/funchook/distorm/examples/ddk/sources +10 -0
- data/funchook/distorm/examples/java/Makefile +23 -0
- data/funchook/distorm/examples/java/distorm/src/Main.java +43 -0
- data/funchook/distorm/examples/java/distorm/src/diStorm3/CodeInfo.java +27 -0
- data/funchook/distorm/examples/java/distorm/src/diStorm3/DecodedInst.java +32 -0
- data/funchook/distorm/examples/java/distorm/src/diStorm3/DecodedResult.java +11 -0
- data/funchook/distorm/examples/java/distorm/src/diStorm3/DecomposedInst.java +89 -0
- data/funchook/distorm/examples/java/distorm/src/diStorm3/DecomposedResult.java +11 -0
- data/funchook/distorm/examples/java/distorm/src/diStorm3/OpcodeEnum.java +131 -0
- data/funchook/distorm/examples/java/distorm/src/diStorm3/Opcodes.java +1123 -0
- data/funchook/distorm/examples/java/distorm/src/diStorm3/Operand.java +24 -0
- data/funchook/distorm/examples/java/distorm/src/diStorm3/distorm3.java +41 -0
- data/funchook/distorm/examples/java/jdistorm.c +405 -0
- data/funchook/distorm/examples/java/jdistorm.h +40 -0
- data/funchook/distorm/examples/java/jdistorm.sln +20 -0
- data/funchook/distorm/examples/java/jdistorm.vcproj +208 -0
- data/funchook/distorm/examples/linux/Makefile +15 -0
- data/funchook/distorm/examples/linux/main.c +181 -0
- data/funchook/distorm/examples/tests/Makefile +15 -0
- data/funchook/distorm/examples/tests/main.cpp +42 -0
- data/funchook/distorm/examples/tests/main.py +66 -0
- data/funchook/distorm/examples/tests/test_distorm3.py +1672 -0
- data/funchook/distorm/examples/tests/tests.sln +20 -0
- data/funchook/distorm/examples/tests/tests.vcxproj +82 -0
- data/funchook/distorm/examples/tests/tests.vcxproj.filters +22 -0
- data/funchook/distorm/examples/win32/disasm.sln +25 -0
- data/funchook/distorm/examples/win32/disasm.vcxproj +201 -0
- data/funchook/distorm/examples/win32/disasm.vcxproj.filters +14 -0
- data/funchook/distorm/examples/win32/main.cpp +163 -0
- data/funchook/distorm/include/distorm.h +482 -0
- data/funchook/distorm/include/mnemonics.h +301 -0
- data/funchook/distorm/make/linux/Makefile +28 -0
- data/funchook/distorm/make/mac/Makefile +24 -0
- data/funchook/distorm/make/win32/cdistorm.vcxproj +239 -0
- data/funchook/distorm/make/win32/cdistorm.vcxproj.filters +80 -0
- data/funchook/distorm/make/win32/distorm.sln +25 -0
- data/funchook/distorm/make/win32/resource.h +14 -0
- data/funchook/distorm/make/win32/resource.rc +99 -0
- data/funchook/distorm/python/distorm3/__init__.py +957 -0
- data/funchook/distorm/python/distorm3/sample.py +51 -0
- data/funchook/distorm/setup.cfg +10 -0
- data/funchook/distorm/setup.py +266 -0
- data/funchook/distorm/src/config.h +169 -0
- data/funchook/distorm/src/decoder.c +641 -0
- data/funchook/distorm/src/decoder.h +33 -0
- data/funchook/distorm/src/distorm.c +413 -0
- data/funchook/distorm/src/instructions.c +597 -0
- data/funchook/distorm/src/instructions.h +463 -0
- data/funchook/distorm/src/insts.c +7939 -0
- data/funchook/distorm/src/insts.h +64 -0
- data/funchook/distorm/src/mnemonics.c +284 -0
- data/funchook/distorm/src/operands.c +1290 -0
- data/funchook/distorm/src/operands.h +28 -0
- data/funchook/distorm/src/prefix.c +368 -0
- data/funchook/distorm/src/prefix.h +64 -0
- data/funchook/distorm/src/textdefs.c +172 -0
- data/funchook/distorm/src/textdefs.h +57 -0
- data/funchook/distorm/src/wstring.c +47 -0
- data/funchook/distorm/src/wstring.h +35 -0
- data/funchook/distorm/src/x86defs.h +82 -0
- data/funchook/include/funchook.h +123 -0
- data/funchook/install-sh +527 -0
- data/funchook/src/Makefile +70 -0
- data/funchook/src/Makefile.in +70 -0
- data/funchook/src/__strerror.h +109 -0
- data/funchook/src/config.h +101 -0
- data/funchook/src/config.h.in +100 -0
- data/funchook/src/decoder.o +0 -0
- data/funchook/src/distorm.o +0 -0
- data/funchook/src/funchook.c +440 -0
- data/funchook/src/funchook.o +0 -0
- data/funchook/src/funchook_internal.h +155 -0
- data/funchook/src/funchook_io.c +182 -0
- data/funchook/src/funchook_io.h +64 -0
- data/funchook/src/funchook_io.o +0 -0
- data/funchook/src/funchook_syscall.S +134 -0
- data/funchook/src/funchook_syscall.o +0 -0
- data/funchook/src/funchook_unix.c +480 -0
- data/funchook/src/funchook_unix.o +0 -0
- data/funchook/src/funchook_windows.c +397 -0
- data/funchook/src/funchook_x86.c +622 -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.c +115 -0
- data/funchook/src/os_func.h +75 -0
- data/funchook/src/os_func.o +0 -0
- data/funchook/src/os_func_unix.c +94 -0
- data/funchook/src/os_func_unix.o +0 -0
- data/funchook/src/os_func_windows.c +32 -0
- data/funchook/src/prefix.o +0 -0
- data/funchook/src/printf_base.c +1688 -0
- data/funchook/src/printf_base.h +46 -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 +43 -0
- data/funchook/test/Makefile.in +43 -0
- data/funchook/test/funchook_test +0 -0
- data/funchook/test/libfunchook_test.c +25 -0
- data/funchook/test/libfunchook_test.so +0 -0
- data/funchook/test/libfunchook_test2.c +18 -0
- data/funchook/test/suffix.list +600 -0
- data/funchook/test/test_main.c +430 -0
- data/funchook/test/test_main.o +0 -0
- data/funchook/test/x86_64_test.S +10 -0
- data/funchook/test/x86_64_test.o +0 -0
- data/funchook/test/x86_test.S +339 -0
- data/funchook/win32/config.h +1 -0
- data/funchook/win32/funchook.sln +52 -0
- data/funchook/win32/funchook.vcxproj +188 -0
- data/funchook/win32/funchook.vcxproj.filters +84 -0
- data/funchook/win32/funchook_test.vcxproj +170 -0
- data/funchook/win32/funchook_test.vcxproj.filters +22 -0
- data/funchook/win32/funchook_test_dll.vcxproj +184 -0
- data/funchook/win32/funchook_test_dll.vcxproj.filters +30 -0
- data/funchook/win32/funchook_test_exe.def +3 -0
- data/lib/contrast-agent.rb +8 -0
- data/lib/contrast.rb +57 -0
- data/lib/contrast/agent.rb +80 -0
- data/lib/contrast/agent/assess.rb +45 -0
- data/lib/contrast/agent/assess/adjusted_span.rb +25 -0
- data/lib/contrast/agent/assess/class_reverter.rb +82 -0
- data/lib/contrast/agent/assess/contrast_event.rb +398 -0
- data/lib/contrast/agent/assess/frozen_properties.rb +41 -0
- data/lib/contrast/agent/assess/insulator.rb +53 -0
- data/lib/contrast/agent/assess/policy/dynamic_source_factory.rb +78 -0
- data/lib/contrast/agent/assess/policy/patcher.rb +85 -0
- data/lib/contrast/agent/assess/policy/policy.rb +116 -0
- data/lib/contrast/agent/assess/policy/policy_node.rb +289 -0
- data/lib/contrast/agent/assess/policy/policy_scanner.rb +44 -0
- data/lib/contrast/agent/assess/policy/preshift.rb +94 -0
- data/lib/contrast/agent/assess/policy/propagation_method.rb +260 -0
- data/lib/contrast/agent/assess/policy/propagation_node.rb +127 -0
- data/lib/contrast/agent/assess/policy/propagator.rb +35 -0
- data/lib/contrast/agent/assess/policy/propagator/append.rb +54 -0
- data/lib/contrast/agent/assess/policy/propagator/base.rb +37 -0
- data/lib/contrast/agent/assess/policy/propagator/center.rb +73 -0
- data/lib/contrast/agent/assess/policy/propagator/custom.rb +36 -0
- data/lib/contrast/agent/assess/policy/propagator/database_write.rb +62 -0
- data/lib/contrast/agent/assess/policy/propagator/insert.rb +55 -0
- data/lib/contrast/agent/assess/policy/propagator/keep.rb +26 -0
- data/lib/contrast/agent/assess/policy/propagator/next.rb +42 -0
- data/lib/contrast/agent/assess/policy/propagator/prepend.rb +50 -0
- data/lib/contrast/agent/assess/policy/propagator/remove.rb +76 -0
- data/lib/contrast/agent/assess/policy/propagator/replace.rb +27 -0
- data/lib/contrast/agent/assess/policy/propagator/reverse.rb +38 -0
- data/lib/contrast/agent/assess/policy/propagator/select.rb +86 -0
- data/lib/contrast/agent/assess/policy/propagator/splat.rb +60 -0
- data/lib/contrast/agent/assess/policy/propagator/split.rb +49 -0
- data/lib/contrast/agent/assess/policy/propagator/substitution.rb +169 -0
- data/lib/contrast/agent/assess/policy/propagator/trim.rb +81 -0
- data/lib/contrast/agent/assess/policy/rewriter_patch.rb +79 -0
- data/lib/contrast/agent/assess/policy/source_method.rb +209 -0
- data/lib/contrast/agent/assess/policy/source_node.rb +62 -0
- data/lib/contrast/agent/assess/policy/trigger_method.rb +209 -0
- data/lib/contrast/agent/assess/policy/trigger_node.rb +198 -0
- data/lib/contrast/agent/assess/policy/trigger_validation/ssrf_validator.rb +77 -0
- data/lib/contrast/agent/assess/policy/trigger_validation/trigger_validation.rb +31 -0
- data/lib/contrast/agent/assess/policy/trigger_validation/xss_validator.rb +40 -0
- data/lib/contrast/agent/assess/properties.rb +392 -0
- data/lib/contrast/agent/assess/rule.rb +18 -0
- data/lib/contrast/agent/assess/rule/base.rb +72 -0
- data/lib/contrast/agent/assess/rule/csrf.rb +66 -0
- data/lib/contrast/agent/assess/rule/csrf/csrf_action.rb +28 -0
- data/lib/contrast/agent/assess/rule/csrf/csrf_applicator.rb +69 -0
- data/lib/contrast/agent/assess/rule/csrf/csrf_watcher.rb +132 -0
- data/lib/contrast/agent/assess/rule/provider.rb +21 -0
- data/lib/contrast/agent/assess/rule/provider/hardcoded_key.rb +62 -0
- data/lib/contrast/agent/assess/rule/provider/hardcoded_password.rb +73 -0
- data/lib/contrast/agent/assess/rule/provider/hardcoded_value_rule.rb +121 -0
- data/lib/contrast/agent/assess/rule/redos.rb +68 -0
- data/lib/contrast/agent/assess/rule/response_scanning_rule.rb +47 -0
- data/lib/contrast/agent/assess/rule/response_watcher.rb +36 -0
- data/lib/contrast/agent/assess/rule/watcher.rb +36 -0
- data/lib/contrast/agent/assess/tag.rb +151 -0
- data/lib/contrast/agent/at_exit_hook.rb +33 -0
- data/lib/contrast/agent/class_reopener.rb +195 -0
- data/lib/contrast/agent/deadzone/policy/deadzone_node.rb +26 -0
- data/lib/contrast/agent/deadzone/policy/policy.rb +57 -0
- data/lib/contrast/agent/disable_reaction.rb +24 -0
- data/lib/contrast/agent/exclusion_matcher.rb +190 -0
- data/lib/contrast/agent/feature_state.rb +379 -0
- data/lib/contrast/agent/inventory/policy/policy.rb +32 -0
- data/lib/contrast/agent/inventory/policy/trigger_node.rb +22 -0
- data/lib/contrast/agent/logger_manager.rb +116 -0
- data/lib/contrast/agent/middleware.rb +352 -0
- data/lib/contrast/agent/module_data.rb +16 -0
- data/lib/contrast/agent/patching/policy/after_load_patch.rb +37 -0
- data/lib/contrast/agent/patching/policy/after_load_patcher.rb +58 -0
- data/lib/contrast/agent/patching/policy/method_policy.rb +94 -0
- data/lib/contrast/agent/patching/policy/module_policy.rb +116 -0
- data/lib/contrast/agent/patching/policy/patch.rb +312 -0
- data/lib/contrast/agent/patching/policy/patch_status.rb +192 -0
- data/lib/contrast/agent/patching/policy/patcher.rb +310 -0
- data/lib/contrast/agent/patching/policy/policy.rb +138 -0
- data/lib/contrast/agent/patching/policy/policy_node.rb +80 -0
- data/lib/contrast/agent/patching/policy/policy_unpatcher.rb +28 -0
- data/lib/contrast/agent/patching/policy/trigger_node.rb +81 -0
- data/lib/contrast/agent/protect/policy/policy.rb +37 -0
- data/lib/contrast/agent/protect/policy/trigger_node.rb +23 -0
- data/lib/contrast/agent/protect/rule.rb +58 -0
- data/lib/contrast/agent/protect/rule/base.rb +300 -0
- data/lib/contrast/agent/protect/rule/base_service.rb +88 -0
- data/lib/contrast/agent/protect/rule/cmd_injection.rb +156 -0
- data/lib/contrast/agent/protect/rule/csrf.rb +118 -0
- data/lib/contrast/agent/protect/rule/csrf/csrf_evaluator.rb +103 -0
- data/lib/contrast/agent/protect/rule/csrf/csrf_token_injector.rb +85 -0
- data/lib/contrast/agent/protect/rule/default_scanner.rb +300 -0
- data/lib/contrast/agent/protect/rule/deserialization.rb +193 -0
- data/lib/contrast/agent/protect/rule/http_method_tampering.rb +80 -0
- data/lib/contrast/agent/protect/rule/no_sqli.rb +101 -0
- data/lib/contrast/agent/protect/rule/no_sqli/mongo_no_sql_scanner.rb +40 -0
- data/lib/contrast/agent/protect/rule/path_traversal.rb +143 -0
- data/lib/contrast/agent/protect/rule/sqli.rb +101 -0
- data/lib/contrast/agent/protect/rule/sqli/default_sql_scanner.rb +16 -0
- data/lib/contrast/agent/protect/rule/sqli/mysql_sql_scanner.rb +38 -0
- data/lib/contrast/agent/protect/rule/sqli/postgres_sql_scanner.rb +22 -0
- data/lib/contrast/agent/protect/rule/sqli/sqlite_sql_scanner.rb +19 -0
- data/lib/contrast/agent/protect/rule/unsafe_file_upload.rb +20 -0
- data/lib/contrast/agent/protect/rule/xss.rb +24 -0
- data/lib/contrast/agent/protect/rule/xxe.rb +120 -0
- data/lib/contrast/agent/protect/rule/xxe/entity_wrapper.rb +82 -0
- data/lib/contrast/agent/railtie.rb +30 -0
- data/lib/contrast/agent/reaction_processor.rb +47 -0
- data/lib/contrast/agent/request.rb +493 -0
- data/lib/contrast/agent/request_context.rb +225 -0
- data/lib/contrast/agent/require_state.rb +61 -0
- data/lib/contrast/agent/response.rb +215 -0
- data/lib/contrast/agent/rewriter.rb +244 -0
- data/lib/contrast/agent/scope.rb +28 -0
- data/lib/contrast/agent/service_heartbeat.rb +37 -0
- data/lib/contrast/agent/settings_state.rb +148 -0
- data/lib/contrast/agent/socket_client.rb +125 -0
- data/lib/contrast/agent/thread.rb +26 -0
- data/lib/contrast/agent/tracepoint_hook.rb +51 -0
- data/lib/contrast/agent/version.rb +8 -0
- data/lib/contrast/api.rb +17 -0
- data/lib/contrast/api/.gitkeep +0 -0
- data/lib/contrast/api/connection_status.rb +49 -0
- data/lib/contrast/api/socket.rb +43 -0
- data/lib/contrast/api/speedracer.rb +206 -0
- data/lib/contrast/api/tcp_socket.rb +31 -0
- data/lib/contrast/api/unix_socket.rb +25 -0
- data/lib/contrast/common_agent_configuration.rb +86 -0
- data/lib/contrast/components/agent.rb +85 -0
- data/lib/contrast/components/app_context.rb +188 -0
- data/lib/contrast/components/assess.rb +67 -0
- data/lib/contrast/components/config.rb +135 -0
- data/lib/contrast/components/contrast_service.rb +113 -0
- data/lib/contrast/components/heap_dump.rb +34 -0
- data/lib/contrast/components/interface.rb +178 -0
- data/lib/contrast/components/inventory.rb +23 -0
- data/lib/contrast/components/logger.rb +92 -0
- data/lib/contrast/components/protect.rb +38 -0
- data/lib/contrast/components/sampling.rb +41 -0
- data/lib/contrast/components/scope.rb +106 -0
- data/lib/contrast/components/settings.rb +140 -0
- data/lib/contrast/config.rb +33 -0
- data/lib/contrast/config/agent_configuration.rb +24 -0
- data/lib/contrast/config/application_configuration.rb +27 -0
- data/lib/contrast/config/assess_configuration.rb +22 -0
- data/lib/contrast/config/assess_rules_configuration.rb +18 -0
- data/lib/contrast/config/base_configuration.rb +105 -0
- data/lib/contrast/config/default_value.rb +16 -0
- data/lib/contrast/config/exception_configuration.rb +21 -0
- data/lib/contrast/config/heap_dump_configuration.rb +23 -0
- data/lib/contrast/config/inventory_configuration.rb +20 -0
- data/lib/contrast/config/logger_configuration.rb +20 -0
- data/lib/contrast/config/protect_configuration.rb +20 -0
- data/lib/contrast/config/protect_rule_configuration.rb +37 -0
- data/lib/contrast/config/protect_rules_configuration.rb +30 -0
- data/lib/contrast/config/root_configuration.rb +26 -0
- data/lib/contrast/config/ruby_configuration.rb +39 -0
- data/lib/contrast/config/sampling_configuration.rb +22 -0
- data/lib/contrast/config/server_configuration.rb +23 -0
- data/lib/contrast/config/service_configuration.rb +22 -0
- data/lib/contrast/configuration.rb +214 -0
- data/lib/contrast/core_extensions/assess.rb +51 -0
- data/lib/contrast/core_extensions/assess/array.rb +58 -0
- data/lib/contrast/core_extensions/assess/assess_extension.rb +145 -0
- data/lib/contrast/core_extensions/assess/basic_object.rb +15 -0
- data/lib/contrast/core_extensions/assess/erb.rb +42 -0
- data/lib/contrast/core_extensions/assess/exec_trigger.rb +48 -0
- data/lib/contrast/core_extensions/assess/fiber.rb +125 -0
- data/lib/contrast/core_extensions/assess/hash.rb +22 -0
- data/lib/contrast/core_extensions/assess/kernel.rb +95 -0
- data/lib/contrast/core_extensions/assess/module.rb +14 -0
- data/lib/contrast/core_extensions/assess/regexp.rb +206 -0
- data/lib/contrast/core_extensions/assess/string.rb +75 -0
- data/lib/contrast/core_extensions/assess/tilt_template_trigger.rb +73 -0
- data/lib/contrast/core_extensions/delegator.rb +14 -0
- data/lib/contrast/core_extensions/eval_trigger.rb +52 -0
- data/lib/contrast/core_extensions/inventory.rb +22 -0
- data/lib/contrast/core_extensions/inventory/datastores.rb +37 -0
- data/lib/contrast/core_extensions/module.rb +42 -0
- data/lib/contrast/core_extensions/object.rb +27 -0
- data/lib/contrast/core_extensions/protect.rb +20 -0
- data/lib/contrast/core_extensions/protect/applies_command_injection_rule.rb +70 -0
- data/lib/contrast/core_extensions/protect/applies_deserialization_rule.rb +58 -0
- data/lib/contrast/core_extensions/protect/applies_no_sqli_rule.rb +81 -0
- data/lib/contrast/core_extensions/protect/applies_path_traversal_rule.rb +119 -0
- data/lib/contrast/core_extensions/protect/applies_sqli_rule.rb +63 -0
- data/lib/contrast/core_extensions/protect/applies_xxe_rule.rb +141 -0
- data/lib/contrast/core_extensions/protect/kernel.rb +30 -0
- data/lib/contrast/core_extensions/protect/psych.rb +7 -0
- data/lib/contrast/core_extensions/thread.rb +31 -0
- data/lib/contrast/internal_exception.rb +8 -0
- data/lib/contrast/rails_extensions/assess/action_controller_inheritance.rb +48 -0
- data/lib/contrast/rails_extensions/assess/active_record.rb +32 -0
- data/lib/contrast/rails_extensions/assess/active_record_named.rb +61 -0
- data/lib/contrast/rails_extensions/assess/configuration.rb +26 -0
- data/lib/contrast/rails_extensions/buffer.rb +30 -0
- data/lib/contrast/rails_extensions/rack.rb +45 -0
- data/lib/contrast/security_exception.rb +14 -0
- data/lib/contrast/sinatra_extensions/assess/cookie.rb +26 -0
- data/lib/contrast/sinatra_extensions/inventory/sinatra_base.rb +59 -0
- data/lib/contrast/tasks/service.rb +95 -0
- data/lib/contrast/utils/assess/sampling_util.rb +96 -0
- data/lib/contrast/utils/assess/tracking_util.rb +39 -0
- data/lib/contrast/utils/boolean_util.rb +33 -0
- data/lib/contrast/utils/cache.rb +69 -0
- data/lib/contrast/utils/class_util.rb +58 -0
- data/lib/contrast/utils/comment_range.rb +19 -0
- data/lib/contrast/utils/data_store_util.rb +23 -0
- data/lib/contrast/utils/duck_utils.rb +58 -0
- data/lib/contrast/utils/env_configuration_item.rb +52 -0
- data/lib/contrast/utils/environment_util.rb +152 -0
- data/lib/contrast/utils/freeze_util.rb +36 -0
- data/lib/contrast/utils/gemfile_reader.rb +191 -0
- data/lib/contrast/utils/hash_digest.rb +148 -0
- data/lib/contrast/utils/heap_dump_util.rb +113 -0
- data/lib/contrast/utils/invalid_configuration_util.rb +88 -0
- data/lib/contrast/utils/inventory_util.rb +126 -0
- data/lib/contrast/utils/io_util.rb +61 -0
- data/lib/contrast/utils/object_share.rb +117 -0
- data/lib/contrast/utils/operating_environment.rb +38 -0
- data/lib/contrast/utils/os.rb +49 -0
- data/lib/contrast/utils/path_util.rb +151 -0
- data/lib/contrast/utils/performs_logging.rb +152 -0
- data/lib/contrast/utils/preflight_util.rb +13 -0
- data/lib/contrast/utils/prevent_serialization.rb +52 -0
- data/lib/contrast/utils/rack_assess_session_cookie.rb +104 -0
- data/lib/contrast/utils/rails_assess_configuration.rb +95 -0
- data/lib/contrast/utils/random_util.rb +22 -0
- data/lib/contrast/utils/resource_loader.rb +23 -0
- data/lib/contrast/utils/ruby_ast_rewriter.rb +74 -0
- data/lib/contrast/utils/scope_util.rb +99 -0
- data/lib/contrast/utils/service_response_util.rb +116 -0
- data/lib/contrast/utils/service_sender_util.rb +98 -0
- data/lib/contrast/utils/sha256_builder.rb +69 -0
- data/lib/contrast/utils/sinatra_helper.rb +49 -0
- data/lib/contrast/utils/stack_trace_utils.rb +209 -0
- data/lib/contrast/utils/string_utils.rb +72 -0
- data/lib/contrast/utils/tag_util.rb +139 -0
- data/lib/contrast/utils/thread_tracker.rb +54 -0
- data/lib/contrast/utils/timer.rb +78 -0
- data/resources/assess/policy.json +1673 -0
- data/resources/csrf/inject.js +44 -0
- data/resources/deadzone/policy.json +55 -0
- data/resources/factory-bot-spec/spec_helper.rb +30 -0
- data/resources/inventory/policy.json +110 -0
- data/resources/protect/policy.json +417 -0
- data/resources/rubocops/kernel/catch_cop.rb +37 -0
- data/resources/rubocops/kernel/require_cop.rb +37 -0
- data/resources/rubocops/kernel/require_relative_cop.rb +33 -0
- data/resources/rubocops/module/autoload_cop.rb +37 -0
- data/resources/rubocops/module/const_defined_cop.rb +37 -0
- data/resources/rubocops/module/const_get_cop.rb +37 -0
- data/resources/rubocops/module/const_set_cop.rb +37 -0
- data/resources/rubocops/module/constants_cop.rb +37 -0
- data/resources/rubocops/module/name_cop.rb +37 -0
- data/resources/rubocops/object/class_cop.rb +37 -0
- data/resources/rubocops/object/freeze_cop.rb +37 -0
- data/resources/rubocops/object/frozen_cop.rb +37 -0
- data/resources/rubocops/object/is_a_cop.rb +37 -0
- data/resources/rubocops/object/method_cop.rb +37 -0
- data/resources/rubocops/object/respond_to_cop.rb +37 -0
- data/resources/rubocops/object/singleton_class_cop.rb +37 -0
- data/resources/rubocops/regexp/spelling_cop.rb +44 -0
- data/resources/rubocops/thread/new_cop.rb +39 -0
- data/resources/ruby-spec/ancestors_spec.rb +70 -0
- data/resources/ruby-spec/modulo_spec.rb +831 -0
- data/resources/ruby-spec/parameters_spec.rb +261 -0
- data/resources/ruby-spec/ruby_spec_spec_helper.rb +35 -0
- data/resources/test_marker.txt +1 -0
- data/ruby-agent.gemspec +129 -0
- data/service_executables/.gitkeep +0 -0
- data/service_executables/VERSION +1 -0
- data/service_executables/linux/contrast-service +0 -0
- data/service_executables/mac/contrast-service +0 -0
- metadata +945 -0
@@ -0,0 +1,261 @@
|
|
1
|
+
require_relative '../../spec_helper'
|
2
|
+
require_relative 'fixtures/classes'
|
3
|
+
|
4
|
+
describe "Method#parameters" do
|
5
|
+
class MethodSpecs::Methods
|
6
|
+
def one_key(a: 1); end
|
7
|
+
def one_keyrest(**a); end
|
8
|
+
|
9
|
+
def one_keyreq(a:); end
|
10
|
+
|
11
|
+
def one_splat_one_req(*a,b); end
|
12
|
+
def one_splat_two_req(*a,b,c); end
|
13
|
+
def one_splat_one_req_with_block(*a,b,&blk); end
|
14
|
+
|
15
|
+
def one_opt_with_stabby(a=-> b { true }); end
|
16
|
+
|
17
|
+
def one_unnamed_splat(*); end
|
18
|
+
|
19
|
+
def one_splat_one_block(*args, &block)
|
20
|
+
local_is_not_parameter = {}
|
21
|
+
end
|
22
|
+
|
23
|
+
define_method(:one_optional_defined_method) {|x = 1|}
|
24
|
+
end
|
25
|
+
|
26
|
+
it "returns an empty Array when the method expects no arguments" do
|
27
|
+
MethodSpecs::Methods.instance_method(:zero).parameters.should == []
|
28
|
+
end
|
29
|
+
|
30
|
+
it "returns [[:req,:name]] for a method expecting one required argument called 'name'" do
|
31
|
+
MethodSpecs::Methods.instance_method(:one_req).parameters.should == [[:req,:a]]
|
32
|
+
end
|
33
|
+
|
34
|
+
it "returns [[:req,:a],[:req,:b]] for a method expecting two required arguments called 'a' and 'b''" do
|
35
|
+
m = MethodSpecs::Methods.instance_method(:two_req)
|
36
|
+
m.parameters.should == [[:req,:a], [:req,:b]]
|
37
|
+
end
|
38
|
+
|
39
|
+
it "returns [[:block,:blk]] for a method expecting one block argument called 'a'" do
|
40
|
+
m = MethodSpecs::Methods.instance_method(:zero_with_block)
|
41
|
+
m.parameters.should == [[:block,:blk]]
|
42
|
+
end
|
43
|
+
|
44
|
+
it "returns [[:req,:a],[:block,:b] for a method expecting a required argument ('a') and a block argument ('b')" do
|
45
|
+
m = MethodSpecs::Methods.instance_method(:one_req_with_block)
|
46
|
+
m.parameters.should == [[:req,:a], [:block,:blk]]
|
47
|
+
end
|
48
|
+
|
49
|
+
it "returns [[:req,:a],[:req,:b],[:block,:c] for a method expecting two required arguments ('a','b') and a block argument ('c')" do
|
50
|
+
m = MethodSpecs::Methods.instance_method(:two_req_with_block)
|
51
|
+
m.parameters.should == [[:req,:a], [:req,:b], [:block,:blk]]
|
52
|
+
end
|
53
|
+
|
54
|
+
it "returns [[:opt,:a]] for a method expecting one optional argument ('a')" do
|
55
|
+
m = MethodSpecs::Methods.instance_method(:one_opt)
|
56
|
+
m.parameters.should == [[:opt,:a]]
|
57
|
+
end
|
58
|
+
|
59
|
+
it "returns [[:req,:a],[:opt,:b]] for a method expecting one required argument ('a') and one optional argument ('b')" do
|
60
|
+
m = MethodSpecs::Methods.instance_method(:one_req_one_opt)
|
61
|
+
m.parameters.should == [[:req,:a],[:opt,:b]]
|
62
|
+
end
|
63
|
+
|
64
|
+
it "returns [[:req,:a],[:opt,:b]] for a method expecting one required argument ('a') and one optional argument ('b')" do
|
65
|
+
m = MethodSpecs::Methods.instance_method(:one_req_one_opt)
|
66
|
+
m.parameters.should == [[:req,:a],[:opt,:b]]
|
67
|
+
end
|
68
|
+
|
69
|
+
it "returns [[:req,:a],[:opt,:b],[:opt,:c]] for a method expecting one required argument ('a') and two optional arguments ('b','c')" do
|
70
|
+
m = MethodSpecs::Methods.instance_method(:one_req_two_opt)
|
71
|
+
m.parameters.should == [[:req,:a],[:opt,:b],[:opt,:c]]
|
72
|
+
end
|
73
|
+
|
74
|
+
it "returns [[:req,:a],[:req,:b],[:opt,:c]] for a method expecting two required arguments ('a','b') and one optional arguments ('c')" do
|
75
|
+
m = MethodSpecs::Methods.instance_method(:two_req_one_opt)
|
76
|
+
m.parameters.should == [[:req,:a],[:req,:b],[:opt,:c]]
|
77
|
+
end
|
78
|
+
|
79
|
+
it "returns [[:opt,:a],[:block,:b]] for a method expecting one required argument ('a') and one block argument ('b')" do
|
80
|
+
m = MethodSpecs::Methods.instance_method(:one_opt_with_block)
|
81
|
+
m.parameters.should == [[:opt,:a],[:block,:blk]]
|
82
|
+
end
|
83
|
+
|
84
|
+
it "returns [[:req,:a],[:opt,:b],[:block,:c]] for a method expecting one required argument ('a'), one optional argument ('b'), and a block ('c')" do
|
85
|
+
m = MethodSpecs::Methods.instance_method(:one_req_one_opt_with_block)
|
86
|
+
m.parameters.should == [[:req,:a],[:opt,:b],[:block,:blk]]
|
87
|
+
end
|
88
|
+
|
89
|
+
it "returns [[:req,:a],[:opt,:b],[:opt,:c],[:block,:d]] for a method expecting one required argument ('a'), two optional arguments ('b','c'), and a block ('d')" do
|
90
|
+
m = MethodSpecs::Methods.instance_method(:one_req_two_opt_with_block)
|
91
|
+
m.parameters.should == [[:req,:a],[:opt,:b],[:opt,:c],[:block,:blk]]
|
92
|
+
end
|
93
|
+
|
94
|
+
it "returns [[:rest,:a]] for a method expecting a single splat argument ('a')" do
|
95
|
+
m = MethodSpecs::Methods.instance_method(:zero_with_splat)
|
96
|
+
m.parameters.should == [[:rest,:a]]
|
97
|
+
end
|
98
|
+
|
99
|
+
it "returns [[:req,:a],[:rest,:b]] for a method expecting a splat argument ('a') and a required argument ('b')" do
|
100
|
+
m = MethodSpecs::Methods.instance_method(:one_req_with_splat)
|
101
|
+
m.parameters.should == [[:req,:a],[:rest,:b]]
|
102
|
+
end
|
103
|
+
|
104
|
+
it "returns [[:req,:a],[:req,:b],[:rest,:c]] for a method expecting two required arguments ('a','b') and a splat argument ('c')" do
|
105
|
+
m = MethodSpecs::Methods.instance_method(:two_req_with_splat)
|
106
|
+
m.parameters.should == [[:req,:a],[:req,:b],[:rest,:c]]
|
107
|
+
end
|
108
|
+
|
109
|
+
it "returns [[:req,:a],[:opt,:b],[:rest,:c]] for a method expecting a required argument ('a','b'), an optional argument ('b'), and a splat argument ('c')" do
|
110
|
+
m = MethodSpecs::Methods.instance_method(:one_req_one_opt_with_splat)
|
111
|
+
m.parameters.should == [[:req,:a],[:opt,:b],[:rest,:c]]
|
112
|
+
end
|
113
|
+
|
114
|
+
it "returns [[:req,:a],[:req,:b],[:opt,:b],[:rest,:d]] for a method expecting two required arguments ('a','b'), an optional argument ('c'), and a splat argument ('d')" do
|
115
|
+
m = MethodSpecs::Methods.instance_method(:two_req_one_opt_with_splat)
|
116
|
+
m.parameters.should == [[:req,:a],[:req,:b],[:opt,:c],[:rest,:d]]
|
117
|
+
end
|
118
|
+
|
119
|
+
it "returns [[:req,:a],[:opt,:b],[:opt,:c],[:rest,:d]] for a method expecting a required argument ('a'), two optional arguments ('b','c'), and a splat argument ('d')" do
|
120
|
+
m = MethodSpecs::Methods.instance_method(:one_req_two_opt_with_splat)
|
121
|
+
m.parameters.should == [[:req,:a],[:opt,:b],[:opt,:c],[:rest,:d]]
|
122
|
+
end
|
123
|
+
|
124
|
+
it "returns [[:rest,:a],[:block,:b]] for a method expecting a splat argument ('a') and a block argument ('b')" do
|
125
|
+
m = MethodSpecs::Methods.instance_method(:zero_with_splat_and_block)
|
126
|
+
m.parameters.should == [[:rest,:a],[:block,:blk]]
|
127
|
+
end
|
128
|
+
|
129
|
+
it "returns [[:req,:a],[:rest,:b],[:block,:c]] for a method expecting a required argument ('a'), a splat argument ('b'), and a block ('c')" do
|
130
|
+
m = MethodSpecs::Methods.instance_method(:one_req_with_splat_and_block)
|
131
|
+
m.parameters.should == [[:req,:a],[:rest,:b],[:block,:blk]]
|
132
|
+
end
|
133
|
+
|
134
|
+
it "returns [[:req,:a],[:req,:b],[:rest,:c],[:block,:d]] for a method expecting two required arguments ('a','b'), a splat argument ('c'), and a block ('d')" do
|
135
|
+
m = MethodSpecs::Methods.instance_method(:two_req_with_splat_and_block)
|
136
|
+
m.parameters.should == [[:req,:a],[:req,:b],[:rest,:c],[:block,:blk]]
|
137
|
+
end
|
138
|
+
|
139
|
+
it "returns [[:req,:a],[:opt,:b],[:rest,:c],[:block,:d]] for a method expecting a required argument ('a'), a splat argument ('c'), and a block ('d')" do
|
140
|
+
m = MethodSpecs::Methods.instance_method(:one_req_one_opt_with_splat_and_block)
|
141
|
+
m.parameters.should == [[:req,:a],[:opt,:b],[:rest,:c],[:block,:blk]]
|
142
|
+
end
|
143
|
+
|
144
|
+
it "returns [[:req,:a],[:req,:b],[:opt,:c],[:block,:d]] for a method expecting two required arguments ('a','b'), an optional argument ('c'), a splat argument ('d'), and a block ('e')" do
|
145
|
+
m = MethodSpecs::Methods.instance_method(:two_req_one_opt_with_splat_and_block)
|
146
|
+
m.parameters.should == [[:req,:a],[:req,:b],[:opt,:c],[:rest,:d],[:block,:blk]]
|
147
|
+
end
|
148
|
+
|
149
|
+
it "returns [[:rest,:a],[:req,:b]] for a method expecting a splat argument ('a') and a required argument ('b')" do
|
150
|
+
m = MethodSpecs::Methods.instance_method(:one_splat_one_req)
|
151
|
+
m.parameters.should == [[:rest,:a],[:req,:b]]
|
152
|
+
end
|
153
|
+
|
154
|
+
it "returns [[:rest,:a],[:req,:b],[:req,:c]] for a method expecting a splat argument ('a') and two required arguments ('b','c')" do
|
155
|
+
m = MethodSpecs::Methods.instance_method(:one_splat_two_req)
|
156
|
+
m.parameters.should == [[:rest,:a],[:req,:b],[:req,:c]]
|
157
|
+
end
|
158
|
+
|
159
|
+
it "returns [[:rest,:a],[:req,:b],[:block,:c]] for a method expecting a splat argument ('a'), a required argument ('b'), and a block ('c')" do
|
160
|
+
m = MethodSpecs::Methods.instance_method(:one_splat_one_req_with_block)
|
161
|
+
m.parameters.should == [[:rest,:a],[:req,:b],[:block,:blk]]
|
162
|
+
end
|
163
|
+
|
164
|
+
it "returns [[:key,:a]] for a method with a single optional keyword argument" do
|
165
|
+
m = MethodSpecs::Methods.instance_method(:one_key)
|
166
|
+
m.parameters.should == [[:key,:a]]
|
167
|
+
end
|
168
|
+
|
169
|
+
it "returns [[:keyrest,:a]] for a method with a keyword rest argument" do
|
170
|
+
m = MethodSpecs::Methods.instance_method(:one_keyrest)
|
171
|
+
m.parameters.should == [[:keyrest,:a]]
|
172
|
+
end
|
173
|
+
|
174
|
+
it "returns [[:keyreq,:a]] for a method with a single required keyword argument" do
|
175
|
+
m = MethodSpecs::Methods.instance_method(:one_keyreq)
|
176
|
+
m.parameters.should == [[:keyreq,:a]]
|
177
|
+
end
|
178
|
+
|
179
|
+
it "works with ->(){} as the value of an optional argument" do
|
180
|
+
m = MethodSpecs::Methods.instance_method(:one_opt_with_stabby)
|
181
|
+
m.parameters.should == [[:opt,:a]]
|
182
|
+
end
|
183
|
+
|
184
|
+
# define_method variants
|
185
|
+
it "returns [] for a define_method method with explicit no-args || specification" do
|
186
|
+
m = MethodSpecs::Methods.instance_method(:zero_defined_method)
|
187
|
+
m.parameters.should == []
|
188
|
+
end
|
189
|
+
|
190
|
+
it "returns [[:rest, :x]] for a define_method method with rest arg 'x' only" do
|
191
|
+
m = MethodSpecs::Methods.instance_method(:zero_with_splat_defined_method)
|
192
|
+
m.parameters.should == [[:rest, :x]]
|
193
|
+
end
|
194
|
+
|
195
|
+
it "returns [[:req, :x]] for a define_method method expecting one required argument 'x'" do
|
196
|
+
m = MethodSpecs::Methods.instance_method(:one_req_defined_method)
|
197
|
+
m.parameters.should == [[:req, :x]]
|
198
|
+
end
|
199
|
+
|
200
|
+
it "returns [[:req, :x], [:req, :y]] for a define_method method expecting two required arguments 'x' and 'y'" do
|
201
|
+
m = MethodSpecs::Methods.instance_method(:two_req_defined_method)
|
202
|
+
m.parameters.should == [[:req, :x], [:req, :y]]
|
203
|
+
end
|
204
|
+
|
205
|
+
it "returns [] for a define_method method with no args specification" do
|
206
|
+
m = MethodSpecs::Methods.instance_method(:no_args_defined_method)
|
207
|
+
m.parameters.should == []
|
208
|
+
end
|
209
|
+
|
210
|
+
it "returns [[:req]] for a define_method method with a grouping as its only argument" do
|
211
|
+
m = MethodSpecs::Methods.instance_method(:two_grouped_defined_method)
|
212
|
+
m.parameters.should == [[:req]]
|
213
|
+
end
|
214
|
+
|
215
|
+
it "returns [[:opt, :x]] for a define_method method with an optional argument 'x'" do
|
216
|
+
m = MethodSpecs::Methods.instance_method(:one_optional_defined_method)
|
217
|
+
m.parameters.should == [[:opt, :x]]
|
218
|
+
end
|
219
|
+
|
220
|
+
it "returns [[:rest]] for a Method generated by respond_to_missing?" do
|
221
|
+
m = MethodSpecs::Methods.new
|
222
|
+
m.method(:handled_via_method_missing).parameters.should == [[:rest]]
|
223
|
+
end
|
224
|
+
|
225
|
+
it "adds nameless rest arg for \"star\" argument" do
|
226
|
+
m = MethodSpecs::Methods.new
|
227
|
+
m.method(:one_unnamed_splat).parameters.should == [[:rest]]
|
228
|
+
end
|
229
|
+
|
230
|
+
it "returns the args and block for a splat and block argument" do
|
231
|
+
m = MethodSpecs::Methods.new
|
232
|
+
m.method(:one_splat_one_block).parameters.should == [[:rest, :args], [:block, :block]]
|
233
|
+
end
|
234
|
+
|
235
|
+
it "returns [] for a Method generated by attr_reader" do
|
236
|
+
m = MethodSpecs::Methods.new
|
237
|
+
m.method(:reader).parameters.should == []
|
238
|
+
end
|
239
|
+
|
240
|
+
it "return [[:req]] for a Method generated by attr_writer" do
|
241
|
+
m = MethodSpecs::Methods.new
|
242
|
+
m.method(:writer=).parameters.should == [[:req]]
|
243
|
+
end
|
244
|
+
|
245
|
+
it "returns [[:rest]] for core methods with variable-length argument lists" do
|
246
|
+
# delete! takes rest args
|
247
|
+
"foo".method(:delete!).parameters.should == [[:rest]]
|
248
|
+
end
|
249
|
+
|
250
|
+
it "returns [[:rest]] or [[:opt]] for core methods with optional arguments" do
|
251
|
+
# pop takes 1 optional argument
|
252
|
+
[
|
253
|
+
[[:rest]],
|
254
|
+
[[:opt]]
|
255
|
+
].should include([].method(:pop).parameters)
|
256
|
+
end
|
257
|
+
|
258
|
+
it "returns [[:req]] for each parameter for core methods with fixed-length argument lists" do
|
259
|
+
'foo'.method('cs__patched_string_+'.to_sym).parameters.should == [[:req]] # REASON: ADDING PATCH CHANGES THIS
|
260
|
+
end
|
261
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
use_realpath = File.respond_to?(:realpath)
|
2
|
+
root = File.dirname(__FILE__)
|
3
|
+
dir = 'fixtures/code'
|
4
|
+
CODE_LOADING_DIR ||= use_realpath ? File.realpath(dir, root) : File.expand_path(dir, root)
|
5
|
+
require 'json'
|
6
|
+
require 'contrast-agent'
|
7
|
+
Contrast::Agent::Patching::Policy::Patcher.patch_methods
|
8
|
+
|
9
|
+
# Enable Thread.report_on_exception by default to catch thread errors earlier
|
10
|
+
if Thread.respond_to? :report_on_exception=
|
11
|
+
Thread.report_on_exception = true
|
12
|
+
else
|
13
|
+
class Thread
|
14
|
+
def report_on_exception=(value)
|
15
|
+
raise 'shim Thread#report_on_exception used with true' if value
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
# Running directly with ruby some_spec.rb
|
21
|
+
unless ENV['MSPEC_RUNNER']
|
22
|
+
mspec_lib = File.expand_path('../../mspec/lib', __FILE__)
|
23
|
+
$LOAD_PATH << mspec_lib if File.directory?(mspec_lib)
|
24
|
+
|
25
|
+
begin
|
26
|
+
require 'mspec'
|
27
|
+
require 'mspec/commands/mspec-run'
|
28
|
+
rescue LoadError
|
29
|
+
puts 'Please add -Ipath/to/mspec/lib or clone mspec as a sibling to run the specs.'
|
30
|
+
exit 1
|
31
|
+
end
|
32
|
+
|
33
|
+
ARGV.unshift $0
|
34
|
+
MSpecRun.main
|
35
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
Please do not remove this file. It is used for the resource_loader_spec tests.
|
data/ruby-agent.gemspec
ADDED
@@ -0,0 +1,129 @@
|
|
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
|
+
require_relative './lib/contrast/agent/version' # rubocop:disable Kernel/RequireRelative
|
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)
|
19
|
+
|
20
|
+
lib = File.expand_path('lib', __dir__)
|
21
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
22
|
+
|
23
|
+
# Add the team as authors of the Agent
|
24
|
+
def self.add_authors spec
|
25
|
+
spec.authors = %w[
|
26
|
+
galen.palmer@contrastsecurity.com
|
27
|
+
harold.mcginnis@contrastsecurity.com
|
28
|
+
donald.propst@contrastsecurity.com
|
29
|
+
alex.macdonald@contrastsecurity.com
|
30
|
+
mark.petersen@contrastsecurity.com
|
31
|
+
]
|
32
|
+
end
|
33
|
+
|
34
|
+
# Add those dependencies required to develop or test the Agent
|
35
|
+
def self.add_dev_dependencies spec
|
36
|
+
spec.add_development_dependency 'bundler'
|
37
|
+
spec.add_development_dependency 'climate_control' # mock ENV
|
38
|
+
spec.add_development_dependency 'execjs'
|
39
|
+
spec.add_development_dependency 'factory_bot'
|
40
|
+
spec.add_development_dependency 'fake_ftp'
|
41
|
+
spec.add_development_dependency 'openssl'
|
42
|
+
spec.add_development_dependency 'parser', '~> 2.6'
|
43
|
+
spec.add_development_dependency 'pry'
|
44
|
+
spec.add_development_dependency 'rails', '>= 3'
|
45
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
46
|
+
spec.add_development_dependency 'rake-compiler', '~> 0'
|
47
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
48
|
+
spec.add_development_dependency 'rspec-benchmark'
|
49
|
+
spec.add_development_dependency 'rspec_junit_formatter', '0.3.0'
|
50
|
+
spec.add_development_dependency 'rubocop', '0.80.0'
|
51
|
+
spec.add_development_dependency 'rubocop-performance', '1.5.2'
|
52
|
+
spec.add_development_dependency 'rubocop-rspec', '1.38.1'
|
53
|
+
spec.add_development_dependency 'simplecov', '~> 0.18'
|
54
|
+
spec.add_development_dependency 'sinatra', '>= 2'
|
55
|
+
spec.add_development_dependency 'sqlite3', '1.3.9'
|
56
|
+
spec.add_development_dependency 'therubyracer'
|
57
|
+
spec.add_development_dependency 'tilt'
|
58
|
+
spec.add_development_dependency 'yarjuf', '~> 2.0'
|
59
|
+
end
|
60
|
+
|
61
|
+
# Add those dependencies required to run the Agent in customer applications.
|
62
|
+
#
|
63
|
+
# Note: If you add a runtime dependency to the Agent, you'll need to update the
|
64
|
+
# dependencies.csv in this directory to indicate that and create a
|
65
|
+
# corresponding update to the fake gem server data in TeamServer.
|
66
|
+
def self.add_dependencies spec
|
67
|
+
spec.add_dependency 'google-protobuf', '~> 3.9.0'
|
68
|
+
spec.add_dependency 'parser', '~> 2.6'
|
69
|
+
spec.add_dependency 'rack', '>= 1.0', '< 3.0'
|
70
|
+
end
|
71
|
+
|
72
|
+
# Enumerate the files required to build the Agent.
|
73
|
+
def self.add_files spec
|
74
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
75
|
+
# Directories used for testing:
|
76
|
+
f.match(%r{^(spec|test)/}) ||
|
77
|
+
# Directories used in pipelines
|
78
|
+
f.match(%r{^(bin|bitbucket_scripts|vendor)/}) ||
|
79
|
+
# Configuration and other files that don't belong to one directory
|
80
|
+
f.match(/(Dockerfile)/) ||
|
81
|
+
f.match(/(.*\.csv)/) ||
|
82
|
+
f.match(/(.*\.md)/) ||
|
83
|
+
f.match(/(.*\.sh)/) ||
|
84
|
+
f.match(/(.*\.xml)/) ||
|
85
|
+
f.match(/(.*\.ya?ml)/)
|
86
|
+
end
|
87
|
+
|
88
|
+
spec.files << 'lib/contrast/api/dtm_pb.rb'
|
89
|
+
spec.files << 'lib/contrast/api/settings_pb.rb'
|
90
|
+
spec.files += Dir['service_executables/**/*']
|
91
|
+
spec.files += Dir['funchook/**/*']
|
92
|
+
spec.files += Dir['shared_libraries/**/*']
|
93
|
+
end
|
94
|
+
|
95
|
+
def self.add_metadata spec
|
96
|
+
spec.metadata['changelog_uri'] = 'https://docs.contrastsecurity.com/release.html'
|
97
|
+
spec.metadata['support_uri'] = 'https://support.contrastsecurity.com'
|
98
|
+
spec.metadata['trouble_shooting_uri'] = 'https://support.contrastsecurity.com/hc/en-us/search?utf8=%E2%9C%93&query=Ruby'
|
99
|
+
spec.metadata['wiki_uri'] = 'https://docs.contrastsecurity.com/'
|
100
|
+
end
|
101
|
+
|
102
|
+
Gem::Specification.new do |spec|
|
103
|
+
spec.name = 'contrast-agent'
|
104
|
+
spec.version = Contrast::Agent::VERSION
|
105
|
+
|
106
|
+
spec.email = %w[
|
107
|
+
ruby@contrastsecurity.com
|
108
|
+
]
|
109
|
+
|
110
|
+
spec.summary = 'Contrast Security\'s agent for rack-based applications.'
|
111
|
+
spec.description = 'This gem instantiates a Rack middleware for rack-based ' \
|
112
|
+
'web applications in order to provide Interactive Application Security ' \
|
113
|
+
'Testing and Protection.'
|
114
|
+
spec.homepage = 'https://www.contrastsecurity.com'
|
115
|
+
spec.license = 'CONTRAST SECURITY (see license file)'
|
116
|
+
spec.required_ruby_version = ['>= 2.4.0', '< 2.8.0']
|
117
|
+
|
118
|
+
spec.bindir = 'exe'
|
119
|
+
spec.executables = ['contrast_service']
|
120
|
+
# Keep cs__common first, it handles funchook.h right now.
|
121
|
+
spec.extensions = Dir['ext/cs__common/extconf.rb', 'ext/**/extconf.rb']
|
122
|
+
spec.require_paths = ['lib']
|
123
|
+
|
124
|
+
add_authors(spec)
|
125
|
+
add_files(spec)
|
126
|
+
add_dev_dependencies(spec)
|
127
|
+
add_dependencies(spec)
|
128
|
+
add_metadata(spec)
|
129
|
+
end
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
2.5.3
|
Binary file
|
Binary file
|
metadata
ADDED
@@ -0,0 +1,945 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: contrast-agent
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.8.4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- galen.palmer@contrastsecurity.com
|
8
|
+
- harold.mcginnis@contrastsecurity.com
|
9
|
+
- donald.propst@contrastsecurity.com
|
10
|
+
- alex.macdonald@contrastsecurity.com
|
11
|
+
- mark.petersen@contrastsecurity.com
|
12
|
+
autorequire:
|
13
|
+
bindir: exe
|
14
|
+
cert_chain: []
|
15
|
+
date: 2020-04-16 00:00:00.000000000 Z
|
16
|
+
dependencies:
|
17
|
+
- !ruby/object:Gem::Dependency
|
18
|
+
name: bundler
|
19
|
+
requirement: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '0'
|
24
|
+
type: :development
|
25
|
+
prerelease: false
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
requirements:
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: '0'
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: climate_control
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ">="
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: '0'
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: execjs
|
47
|
+
requirement: !ruby/object:Gem::Requirement
|
48
|
+
requirements:
|
49
|
+
- - ">="
|
50
|
+
- !ruby/object:Gem::Version
|
51
|
+
version: '0'
|
52
|
+
type: :development
|
53
|
+
prerelease: false
|
54
|
+
version_requirements: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '0'
|
59
|
+
- !ruby/object:Gem::Dependency
|
60
|
+
name: factory_bot
|
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'
|
73
|
+
- !ruby/object:Gem::Dependency
|
74
|
+
name: fake_ftp
|
75
|
+
requirement: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
type: :development
|
81
|
+
prerelease: false
|
82
|
+
version_requirements: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
- !ruby/object:Gem::Dependency
|
88
|
+
name: openssl
|
89
|
+
requirement: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
type: :development
|
95
|
+
prerelease: false
|
96
|
+
version_requirements: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
- !ruby/object:Gem::Dependency
|
102
|
+
name: parser
|
103
|
+
requirement: !ruby/object:Gem::Requirement
|
104
|
+
requirements:
|
105
|
+
- - "~>"
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: '2.6'
|
108
|
+
type: :development
|
109
|
+
prerelease: false
|
110
|
+
version_requirements: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - "~>"
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '2.6'
|
115
|
+
- !ruby/object:Gem::Dependency
|
116
|
+
name: pry
|
117
|
+
requirement: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
type: :development
|
123
|
+
prerelease: false
|
124
|
+
version_requirements: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
129
|
+
- !ruby/object:Gem::Dependency
|
130
|
+
name: rails
|
131
|
+
requirement: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: '3'
|
136
|
+
type: :development
|
137
|
+
prerelease: false
|
138
|
+
version_requirements: !ruby/object:Gem::Requirement
|
139
|
+
requirements:
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '3'
|
143
|
+
- !ruby/object:Gem::Dependency
|
144
|
+
name: rake
|
145
|
+
requirement: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - "~>"
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '10.0'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
requirements:
|
154
|
+
- - "~>"
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '10.0'
|
157
|
+
- !ruby/object:Gem::Dependency
|
158
|
+
name: rake-compiler
|
159
|
+
requirement: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - "~>"
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
164
|
+
type: :development
|
165
|
+
prerelease: false
|
166
|
+
version_requirements: !ruby/object:Gem::Requirement
|
167
|
+
requirements:
|
168
|
+
- - "~>"
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: '0'
|
171
|
+
- !ruby/object:Gem::Dependency
|
172
|
+
name: rspec
|
173
|
+
requirement: !ruby/object:Gem::Requirement
|
174
|
+
requirements:
|
175
|
+
- - "~>"
|
176
|
+
- !ruby/object:Gem::Version
|
177
|
+
version: '3.0'
|
178
|
+
type: :development
|
179
|
+
prerelease: false
|
180
|
+
version_requirements: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - "~>"
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '3.0'
|
185
|
+
- !ruby/object:Gem::Dependency
|
186
|
+
name: rspec-benchmark
|
187
|
+
requirement: !ruby/object:Gem::Requirement
|
188
|
+
requirements:
|
189
|
+
- - ">="
|
190
|
+
- !ruby/object:Gem::Version
|
191
|
+
version: '0'
|
192
|
+
type: :development
|
193
|
+
prerelease: false
|
194
|
+
version_requirements: !ruby/object:Gem::Requirement
|
195
|
+
requirements:
|
196
|
+
- - ">="
|
197
|
+
- !ruby/object:Gem::Version
|
198
|
+
version: '0'
|
199
|
+
- !ruby/object:Gem::Dependency
|
200
|
+
name: rspec_junit_formatter
|
201
|
+
requirement: !ruby/object:Gem::Requirement
|
202
|
+
requirements:
|
203
|
+
- - '='
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: 0.3.0
|
206
|
+
type: :development
|
207
|
+
prerelease: false
|
208
|
+
version_requirements: !ruby/object:Gem::Requirement
|
209
|
+
requirements:
|
210
|
+
- - '='
|
211
|
+
- !ruby/object:Gem::Version
|
212
|
+
version: 0.3.0
|
213
|
+
- !ruby/object:Gem::Dependency
|
214
|
+
name: rubocop
|
215
|
+
requirement: !ruby/object:Gem::Requirement
|
216
|
+
requirements:
|
217
|
+
- - '='
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
version: 0.80.0
|
220
|
+
type: :development
|
221
|
+
prerelease: false
|
222
|
+
version_requirements: !ruby/object:Gem::Requirement
|
223
|
+
requirements:
|
224
|
+
- - '='
|
225
|
+
- !ruby/object:Gem::Version
|
226
|
+
version: 0.80.0
|
227
|
+
- !ruby/object:Gem::Dependency
|
228
|
+
name: rubocop-performance
|
229
|
+
requirement: !ruby/object:Gem::Requirement
|
230
|
+
requirements:
|
231
|
+
- - '='
|
232
|
+
- !ruby/object:Gem::Version
|
233
|
+
version: 1.5.2
|
234
|
+
type: :development
|
235
|
+
prerelease: false
|
236
|
+
version_requirements: !ruby/object:Gem::Requirement
|
237
|
+
requirements:
|
238
|
+
- - '='
|
239
|
+
- !ruby/object:Gem::Version
|
240
|
+
version: 1.5.2
|
241
|
+
- !ruby/object:Gem::Dependency
|
242
|
+
name: rubocop-rspec
|
243
|
+
requirement: !ruby/object:Gem::Requirement
|
244
|
+
requirements:
|
245
|
+
- - '='
|
246
|
+
- !ruby/object:Gem::Version
|
247
|
+
version: 1.38.1
|
248
|
+
type: :development
|
249
|
+
prerelease: false
|
250
|
+
version_requirements: !ruby/object:Gem::Requirement
|
251
|
+
requirements:
|
252
|
+
- - '='
|
253
|
+
- !ruby/object:Gem::Version
|
254
|
+
version: 1.38.1
|
255
|
+
- !ruby/object:Gem::Dependency
|
256
|
+
name: simplecov
|
257
|
+
requirement: !ruby/object:Gem::Requirement
|
258
|
+
requirements:
|
259
|
+
- - "~>"
|
260
|
+
- !ruby/object:Gem::Version
|
261
|
+
version: '0.18'
|
262
|
+
type: :development
|
263
|
+
prerelease: false
|
264
|
+
version_requirements: !ruby/object:Gem::Requirement
|
265
|
+
requirements:
|
266
|
+
- - "~>"
|
267
|
+
- !ruby/object:Gem::Version
|
268
|
+
version: '0.18'
|
269
|
+
- !ruby/object:Gem::Dependency
|
270
|
+
name: sinatra
|
271
|
+
requirement: !ruby/object:Gem::Requirement
|
272
|
+
requirements:
|
273
|
+
- - ">="
|
274
|
+
- !ruby/object:Gem::Version
|
275
|
+
version: '2'
|
276
|
+
type: :development
|
277
|
+
prerelease: false
|
278
|
+
version_requirements: !ruby/object:Gem::Requirement
|
279
|
+
requirements:
|
280
|
+
- - ">="
|
281
|
+
- !ruby/object:Gem::Version
|
282
|
+
version: '2'
|
283
|
+
- !ruby/object:Gem::Dependency
|
284
|
+
name: sqlite3
|
285
|
+
requirement: !ruby/object:Gem::Requirement
|
286
|
+
requirements:
|
287
|
+
- - '='
|
288
|
+
- !ruby/object:Gem::Version
|
289
|
+
version: 1.3.9
|
290
|
+
type: :development
|
291
|
+
prerelease: false
|
292
|
+
version_requirements: !ruby/object:Gem::Requirement
|
293
|
+
requirements:
|
294
|
+
- - '='
|
295
|
+
- !ruby/object:Gem::Version
|
296
|
+
version: 1.3.9
|
297
|
+
- !ruby/object:Gem::Dependency
|
298
|
+
name: therubyracer
|
299
|
+
requirement: !ruby/object:Gem::Requirement
|
300
|
+
requirements:
|
301
|
+
- - ">="
|
302
|
+
- !ruby/object:Gem::Version
|
303
|
+
version: '0'
|
304
|
+
type: :development
|
305
|
+
prerelease: false
|
306
|
+
version_requirements: !ruby/object:Gem::Requirement
|
307
|
+
requirements:
|
308
|
+
- - ">="
|
309
|
+
- !ruby/object:Gem::Version
|
310
|
+
version: '0'
|
311
|
+
- !ruby/object:Gem::Dependency
|
312
|
+
name: tilt
|
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'
|
325
|
+
- !ruby/object:Gem::Dependency
|
326
|
+
name: yarjuf
|
327
|
+
requirement: !ruby/object:Gem::Requirement
|
328
|
+
requirements:
|
329
|
+
- - "~>"
|
330
|
+
- !ruby/object:Gem::Version
|
331
|
+
version: '2.0'
|
332
|
+
type: :development
|
333
|
+
prerelease: false
|
334
|
+
version_requirements: !ruby/object:Gem::Requirement
|
335
|
+
requirements:
|
336
|
+
- - "~>"
|
337
|
+
- !ruby/object:Gem::Version
|
338
|
+
version: '2.0'
|
339
|
+
- !ruby/object:Gem::Dependency
|
340
|
+
name: google-protobuf
|
341
|
+
requirement: !ruby/object:Gem::Requirement
|
342
|
+
requirements:
|
343
|
+
- - "~>"
|
344
|
+
- !ruby/object:Gem::Version
|
345
|
+
version: 3.9.0
|
346
|
+
type: :runtime
|
347
|
+
prerelease: false
|
348
|
+
version_requirements: !ruby/object:Gem::Requirement
|
349
|
+
requirements:
|
350
|
+
- - "~>"
|
351
|
+
- !ruby/object:Gem::Version
|
352
|
+
version: 3.9.0
|
353
|
+
- !ruby/object:Gem::Dependency
|
354
|
+
name: parser
|
355
|
+
requirement: !ruby/object:Gem::Requirement
|
356
|
+
requirements:
|
357
|
+
- - "~>"
|
358
|
+
- !ruby/object:Gem::Version
|
359
|
+
version: '2.6'
|
360
|
+
type: :runtime
|
361
|
+
prerelease: false
|
362
|
+
version_requirements: !ruby/object:Gem::Requirement
|
363
|
+
requirements:
|
364
|
+
- - "~>"
|
365
|
+
- !ruby/object:Gem::Version
|
366
|
+
version: '2.6'
|
367
|
+
- !ruby/object:Gem::Dependency
|
368
|
+
name: rack
|
369
|
+
requirement: !ruby/object:Gem::Requirement
|
370
|
+
requirements:
|
371
|
+
- - ">="
|
372
|
+
- !ruby/object:Gem::Version
|
373
|
+
version: '1.0'
|
374
|
+
- - "<"
|
375
|
+
- !ruby/object:Gem::Version
|
376
|
+
version: '3.0'
|
377
|
+
type: :runtime
|
378
|
+
prerelease: false
|
379
|
+
version_requirements: !ruby/object:Gem::Requirement
|
380
|
+
requirements:
|
381
|
+
- - ">="
|
382
|
+
- !ruby/object:Gem::Version
|
383
|
+
version: '1.0'
|
384
|
+
- - "<"
|
385
|
+
- !ruby/object:Gem::Version
|
386
|
+
version: '3.0'
|
387
|
+
description: This gem instantiates a Rack middleware for rack-based web applications
|
388
|
+
in order to provide Interactive Application Security Testing and Protection.
|
389
|
+
email:
|
390
|
+
- ruby@contrastsecurity.com
|
391
|
+
executables:
|
392
|
+
- contrast_service
|
393
|
+
extensions:
|
394
|
+
- ext/cs__common/extconf.rb
|
395
|
+
- ext/cs__scope/extconf.rb
|
396
|
+
- ext/cs__assess_module/extconf.rb
|
397
|
+
- ext/cs__assess_active_record_named/extconf.rb
|
398
|
+
- ext/cs__assess_kernel/extconf.rb
|
399
|
+
- ext/cs__assess_marshal_module/extconf.rb
|
400
|
+
- ext/cs__assess_fiber_track/extconf.rb
|
401
|
+
- ext/cs__assess_regexp/extconf.rb
|
402
|
+
- ext/cs__assess_basic_object/extconf.rb
|
403
|
+
- ext/cs__contrast_patch/extconf.rb
|
404
|
+
- ext/cs__assess_string_interpolation26/extconf.rb
|
405
|
+
- ext/cs__assess_regexp_track/extconf.rb
|
406
|
+
- ext/cs__protect_kernel/extconf.rb
|
407
|
+
- ext/cs__assess_string/extconf.rb
|
408
|
+
- ext/cs__assess_array/extconf.rb
|
409
|
+
- ext/cs__assess_hash/extconf.rb
|
410
|
+
extra_rdoc_files: []
|
411
|
+
files:
|
412
|
+
- ".clang-format"
|
413
|
+
- ".dockerignore"
|
414
|
+
- ".gitignore"
|
415
|
+
- ".gitmodules"
|
416
|
+
- ".rspec"
|
417
|
+
- ".simplecov"
|
418
|
+
- Gemfile
|
419
|
+
- LICENSE.txt
|
420
|
+
- Rakefile
|
421
|
+
- exe/contrast_service
|
422
|
+
- ext/build_funchook.rb
|
423
|
+
- ext/cs__assess_active_record_named/cs__active_record_named.c
|
424
|
+
- ext/cs__assess_active_record_named/cs__active_record_named.h
|
425
|
+
- ext/cs__assess_active_record_named/extconf.rb
|
426
|
+
- ext/cs__assess_array/cs__assess_array.c
|
427
|
+
- ext/cs__assess_array/cs__assess_array.h
|
428
|
+
- ext/cs__assess_array/extconf.rb
|
429
|
+
- ext/cs__assess_basic_object/cs__assess_basic_object.c
|
430
|
+
- ext/cs__assess_basic_object/cs__assess_basic_object.h
|
431
|
+
- ext/cs__assess_basic_object/extconf.rb
|
432
|
+
- ext/cs__assess_fiber_track/cs__assess_fiber_track.c
|
433
|
+
- ext/cs__assess_fiber_track/cs__assess_fiber_track.h
|
434
|
+
- ext/cs__assess_fiber_track/extconf.rb
|
435
|
+
- ext/cs__assess_hash/cs__assess_hash.c
|
436
|
+
- ext/cs__assess_hash/cs__assess_hash.h
|
437
|
+
- ext/cs__assess_hash/extconf.rb
|
438
|
+
- ext/cs__assess_kernel/cs__assess_kernel.c
|
439
|
+
- ext/cs__assess_kernel/cs__assess_kernel.h
|
440
|
+
- ext/cs__assess_kernel/extconf.rb
|
441
|
+
- ext/cs__assess_marshal_module/cs__assess_marshal_module.c
|
442
|
+
- ext/cs__assess_marshal_module/cs__assess_marshal_module.h
|
443
|
+
- ext/cs__assess_marshal_module/extconf.rb
|
444
|
+
- ext/cs__assess_module/cs__assess_module.c
|
445
|
+
- ext/cs__assess_module/cs__assess_module.h
|
446
|
+
- ext/cs__assess_module/extconf.rb
|
447
|
+
- ext/cs__assess_regexp/cs__assess_regexp.c
|
448
|
+
- ext/cs__assess_regexp/cs__assess_regexp.h
|
449
|
+
- ext/cs__assess_regexp/extconf.rb
|
450
|
+
- ext/cs__assess_regexp_track/cs__assess_regexp_track.c
|
451
|
+
- ext/cs__assess_regexp_track/cs__assess_regexp_track.h
|
452
|
+
- ext/cs__assess_regexp_track/extconf.rb
|
453
|
+
- ext/cs__assess_string/cs__assess_string.c
|
454
|
+
- ext/cs__assess_string/cs__assess_string.h
|
455
|
+
- ext/cs__assess_string/extconf.rb
|
456
|
+
- ext/cs__assess_string_interpolation26/cs__assess_string_interpolation26.c
|
457
|
+
- ext/cs__assess_string_interpolation26/cs__assess_string_interpolation26.h
|
458
|
+
- ext/cs__assess_string_interpolation26/extconf.rb
|
459
|
+
- ext/cs__common/cs__common.c
|
460
|
+
- ext/cs__common/cs__common.h
|
461
|
+
- ext/cs__common/extconf.rb
|
462
|
+
- ext/cs__contrast_patch/cs__contrast_patch.c
|
463
|
+
- ext/cs__contrast_patch/cs__contrast_patch.h
|
464
|
+
- ext/cs__contrast_patch/extconf.rb
|
465
|
+
- ext/cs__protect_kernel/cs__protect_kernel.c
|
466
|
+
- ext/cs__protect_kernel/cs__protect_kernel.h
|
467
|
+
- ext/cs__protect_kernel/extconf.rb
|
468
|
+
- ext/cs__scope/cs__scope.c
|
469
|
+
- ext/cs__scope/cs__scope.h
|
470
|
+
- ext/cs__scope/extconf.rb
|
471
|
+
- ext/extconf_common.rb
|
472
|
+
- funchook/LICENSE
|
473
|
+
- funchook/Makefile
|
474
|
+
- funchook/Makefile.in
|
475
|
+
- funchook/README.md
|
476
|
+
- funchook/appveyor.yml
|
477
|
+
- funchook/autogen.sh
|
478
|
+
- funchook/autom4te.cache/output.0
|
479
|
+
- funchook/autom4te.cache/requests
|
480
|
+
- funchook/autom4te.cache/traces.0
|
481
|
+
- funchook/config.guess
|
482
|
+
- funchook/config.log
|
483
|
+
- funchook/config.status
|
484
|
+
- funchook/config.sub
|
485
|
+
- funchook/configure
|
486
|
+
- funchook/configure.ac
|
487
|
+
- funchook/distorm/COPYING
|
488
|
+
- funchook/distorm/MANIFEST
|
489
|
+
- funchook/distorm/MANIFEST.in
|
490
|
+
- funchook/distorm/README.md
|
491
|
+
- funchook/distorm/disOps/disOps.py
|
492
|
+
- funchook/distorm/disOps/x86db.py
|
493
|
+
- funchook/distorm/disOps/x86header.py
|
494
|
+
- funchook/distorm/disOps/x86sets.py
|
495
|
+
- funchook/distorm/examples/cs/TestdiStorm/Program.cs
|
496
|
+
- funchook/distorm/examples/cs/TestdiStorm/Properties/AssemblyInfo.cs
|
497
|
+
- funchook/distorm/examples/cs/TestdiStorm/TestdiStorm.csproj
|
498
|
+
- funchook/distorm/examples/cs/distorm-net.sln
|
499
|
+
- funchook/distorm/examples/cs/distorm-net/CodeInfo.cs
|
500
|
+
- funchook/distorm/examples/cs/distorm-net/DecodedInst.cs
|
501
|
+
- funchook/distorm/examples/cs/distorm-net/DecodedResult.cs
|
502
|
+
- funchook/distorm/examples/cs/distorm-net/DecomposedInst.cs
|
503
|
+
- funchook/distorm/examples/cs/distorm-net/DecomposedResult.cs
|
504
|
+
- funchook/distorm/examples/cs/distorm-net/Opcodes.cs
|
505
|
+
- funchook/distorm/examples/cs/distorm-net/Opcodes.tt
|
506
|
+
- funchook/distorm/examples/cs/distorm-net/Operand.cs
|
507
|
+
- funchook/distorm/examples/cs/distorm-net/Properties/AssemblyInfo.cs
|
508
|
+
- funchook/distorm/examples/cs/distorm-net/diStorm3.cs
|
509
|
+
- funchook/distorm/examples/cs/distorm-net/distorm-net.csproj
|
510
|
+
- funchook/distorm/examples/cs/readme
|
511
|
+
- funchook/distorm/examples/ddk/README
|
512
|
+
- funchook/distorm/examples/ddk/distorm.ini
|
513
|
+
- funchook/distorm/examples/ddk/dummy.c
|
514
|
+
- funchook/distorm/examples/ddk/main.c
|
515
|
+
- funchook/distorm/examples/ddk/makefile
|
516
|
+
- funchook/distorm/examples/ddk/sources
|
517
|
+
- funchook/distorm/examples/java/Makefile
|
518
|
+
- funchook/distorm/examples/java/distorm/src/Main.java
|
519
|
+
- funchook/distorm/examples/java/distorm/src/diStorm3/CodeInfo.java
|
520
|
+
- funchook/distorm/examples/java/distorm/src/diStorm3/DecodedInst.java
|
521
|
+
- funchook/distorm/examples/java/distorm/src/diStorm3/DecodedResult.java
|
522
|
+
- funchook/distorm/examples/java/distorm/src/diStorm3/DecomposedInst.java
|
523
|
+
- funchook/distorm/examples/java/distorm/src/diStorm3/DecomposedResult.java
|
524
|
+
- funchook/distorm/examples/java/distorm/src/diStorm3/OpcodeEnum.java
|
525
|
+
- funchook/distorm/examples/java/distorm/src/diStorm3/Opcodes.java
|
526
|
+
- funchook/distorm/examples/java/distorm/src/diStorm3/Operand.java
|
527
|
+
- funchook/distorm/examples/java/distorm/src/diStorm3/distorm3.java
|
528
|
+
- funchook/distorm/examples/java/jdistorm.c
|
529
|
+
- funchook/distorm/examples/java/jdistorm.h
|
530
|
+
- funchook/distorm/examples/java/jdistorm.sln
|
531
|
+
- funchook/distorm/examples/java/jdistorm.vcproj
|
532
|
+
- funchook/distorm/examples/linux/Makefile
|
533
|
+
- funchook/distorm/examples/linux/main.c
|
534
|
+
- funchook/distorm/examples/tests/Makefile
|
535
|
+
- funchook/distorm/examples/tests/main.cpp
|
536
|
+
- funchook/distorm/examples/tests/main.py
|
537
|
+
- funchook/distorm/examples/tests/test_distorm3.py
|
538
|
+
- funchook/distorm/examples/tests/tests.sln
|
539
|
+
- funchook/distorm/examples/tests/tests.vcxproj
|
540
|
+
- funchook/distorm/examples/tests/tests.vcxproj.filters
|
541
|
+
- funchook/distorm/examples/win32/disasm.sln
|
542
|
+
- funchook/distorm/examples/win32/disasm.vcxproj
|
543
|
+
- funchook/distorm/examples/win32/disasm.vcxproj.filters
|
544
|
+
- funchook/distorm/examples/win32/main.cpp
|
545
|
+
- funchook/distorm/include/distorm.h
|
546
|
+
- funchook/distorm/include/mnemonics.h
|
547
|
+
- funchook/distorm/make/linux/Makefile
|
548
|
+
- funchook/distorm/make/mac/Makefile
|
549
|
+
- funchook/distorm/make/win32/cdistorm.vcxproj
|
550
|
+
- funchook/distorm/make/win32/cdistorm.vcxproj.filters
|
551
|
+
- funchook/distorm/make/win32/distorm.sln
|
552
|
+
- funchook/distorm/make/win32/resource.h
|
553
|
+
- funchook/distorm/make/win32/resource.rc
|
554
|
+
- funchook/distorm/python/distorm3/__init__.py
|
555
|
+
- funchook/distorm/python/distorm3/sample.py
|
556
|
+
- funchook/distorm/setup.cfg
|
557
|
+
- funchook/distorm/setup.py
|
558
|
+
- funchook/distorm/src/config.h
|
559
|
+
- funchook/distorm/src/decoder.c
|
560
|
+
- funchook/distorm/src/decoder.h
|
561
|
+
- funchook/distorm/src/distorm.c
|
562
|
+
- funchook/distorm/src/instructions.c
|
563
|
+
- funchook/distorm/src/instructions.h
|
564
|
+
- funchook/distorm/src/insts.c
|
565
|
+
- funchook/distorm/src/insts.h
|
566
|
+
- funchook/distorm/src/mnemonics.c
|
567
|
+
- funchook/distorm/src/operands.c
|
568
|
+
- funchook/distorm/src/operands.h
|
569
|
+
- funchook/distorm/src/prefix.c
|
570
|
+
- funchook/distorm/src/prefix.h
|
571
|
+
- funchook/distorm/src/textdefs.c
|
572
|
+
- funchook/distorm/src/textdefs.h
|
573
|
+
- funchook/distorm/src/wstring.c
|
574
|
+
- funchook/distorm/src/wstring.h
|
575
|
+
- funchook/distorm/src/x86defs.h
|
576
|
+
- funchook/include/funchook.h
|
577
|
+
- funchook/install-sh
|
578
|
+
- funchook/src/Makefile
|
579
|
+
- funchook/src/Makefile.in
|
580
|
+
- funchook/src/__strerror.h
|
581
|
+
- funchook/src/config.h
|
582
|
+
- funchook/src/config.h.in
|
583
|
+
- funchook/src/decoder.o
|
584
|
+
- funchook/src/distorm.o
|
585
|
+
- funchook/src/funchook.c
|
586
|
+
- funchook/src/funchook.o
|
587
|
+
- funchook/src/funchook_internal.h
|
588
|
+
- funchook/src/funchook_io.c
|
589
|
+
- funchook/src/funchook_io.h
|
590
|
+
- funchook/src/funchook_io.o
|
591
|
+
- funchook/src/funchook_syscall.S
|
592
|
+
- funchook/src/funchook_syscall.o
|
593
|
+
- funchook/src/funchook_unix.c
|
594
|
+
- funchook/src/funchook_unix.o
|
595
|
+
- funchook/src/funchook_windows.c
|
596
|
+
- funchook/src/funchook_x86.c
|
597
|
+
- funchook/src/funchook_x86.o
|
598
|
+
- funchook/src/instructions.o
|
599
|
+
- funchook/src/insts.o
|
600
|
+
- funchook/src/libfunchook.so
|
601
|
+
- funchook/src/mnemonics.o
|
602
|
+
- funchook/src/operands.o
|
603
|
+
- funchook/src/os_func.c
|
604
|
+
- funchook/src/os_func.h
|
605
|
+
- funchook/src/os_func.o
|
606
|
+
- funchook/src/os_func_unix.c
|
607
|
+
- funchook/src/os_func_unix.o
|
608
|
+
- funchook/src/os_func_windows.c
|
609
|
+
- funchook/src/prefix.o
|
610
|
+
- funchook/src/printf_base.c
|
611
|
+
- funchook/src/printf_base.h
|
612
|
+
- funchook/src/printf_base.o
|
613
|
+
- funchook/src/textdefs.o
|
614
|
+
- funchook/src/wstring.o
|
615
|
+
- funchook/test/Makefile
|
616
|
+
- funchook/test/Makefile.in
|
617
|
+
- funchook/test/funchook_test
|
618
|
+
- funchook/test/libfunchook_test.c
|
619
|
+
- funchook/test/libfunchook_test.so
|
620
|
+
- funchook/test/libfunchook_test2.c
|
621
|
+
- funchook/test/suffix.list
|
622
|
+
- funchook/test/test_main.c
|
623
|
+
- funchook/test/test_main.o
|
624
|
+
- funchook/test/x86_64_test.S
|
625
|
+
- funchook/test/x86_64_test.o
|
626
|
+
- funchook/test/x86_test.S
|
627
|
+
- funchook/win32/config.h
|
628
|
+
- funchook/win32/funchook.sln
|
629
|
+
- funchook/win32/funchook.vcxproj
|
630
|
+
- funchook/win32/funchook.vcxproj.filters
|
631
|
+
- funchook/win32/funchook_test.vcxproj
|
632
|
+
- funchook/win32/funchook_test.vcxproj.filters
|
633
|
+
- funchook/win32/funchook_test_dll.vcxproj
|
634
|
+
- funchook/win32/funchook_test_dll.vcxproj.filters
|
635
|
+
- funchook/win32/funchook_test_exe.def
|
636
|
+
- lib/contrast-agent.rb
|
637
|
+
- lib/contrast.rb
|
638
|
+
- lib/contrast/agent.rb
|
639
|
+
- lib/contrast/agent/assess.rb
|
640
|
+
- lib/contrast/agent/assess/adjusted_span.rb
|
641
|
+
- lib/contrast/agent/assess/class_reverter.rb
|
642
|
+
- lib/contrast/agent/assess/contrast_event.rb
|
643
|
+
- lib/contrast/agent/assess/frozen_properties.rb
|
644
|
+
- lib/contrast/agent/assess/insulator.rb
|
645
|
+
- lib/contrast/agent/assess/policy/dynamic_source_factory.rb
|
646
|
+
- lib/contrast/agent/assess/policy/patcher.rb
|
647
|
+
- lib/contrast/agent/assess/policy/policy.rb
|
648
|
+
- lib/contrast/agent/assess/policy/policy_node.rb
|
649
|
+
- lib/contrast/agent/assess/policy/policy_scanner.rb
|
650
|
+
- lib/contrast/agent/assess/policy/preshift.rb
|
651
|
+
- lib/contrast/agent/assess/policy/propagation_method.rb
|
652
|
+
- lib/contrast/agent/assess/policy/propagation_node.rb
|
653
|
+
- lib/contrast/agent/assess/policy/propagator.rb
|
654
|
+
- lib/contrast/agent/assess/policy/propagator/append.rb
|
655
|
+
- lib/contrast/agent/assess/policy/propagator/base.rb
|
656
|
+
- lib/contrast/agent/assess/policy/propagator/center.rb
|
657
|
+
- lib/contrast/agent/assess/policy/propagator/custom.rb
|
658
|
+
- lib/contrast/agent/assess/policy/propagator/database_write.rb
|
659
|
+
- lib/contrast/agent/assess/policy/propagator/insert.rb
|
660
|
+
- lib/contrast/agent/assess/policy/propagator/keep.rb
|
661
|
+
- lib/contrast/agent/assess/policy/propagator/next.rb
|
662
|
+
- lib/contrast/agent/assess/policy/propagator/prepend.rb
|
663
|
+
- lib/contrast/agent/assess/policy/propagator/remove.rb
|
664
|
+
- lib/contrast/agent/assess/policy/propagator/replace.rb
|
665
|
+
- lib/contrast/agent/assess/policy/propagator/reverse.rb
|
666
|
+
- lib/contrast/agent/assess/policy/propagator/select.rb
|
667
|
+
- lib/contrast/agent/assess/policy/propagator/splat.rb
|
668
|
+
- lib/contrast/agent/assess/policy/propagator/split.rb
|
669
|
+
- lib/contrast/agent/assess/policy/propagator/substitution.rb
|
670
|
+
- lib/contrast/agent/assess/policy/propagator/trim.rb
|
671
|
+
- lib/contrast/agent/assess/policy/rewriter_patch.rb
|
672
|
+
- lib/contrast/agent/assess/policy/source_method.rb
|
673
|
+
- lib/contrast/agent/assess/policy/source_node.rb
|
674
|
+
- lib/contrast/agent/assess/policy/trigger_method.rb
|
675
|
+
- lib/contrast/agent/assess/policy/trigger_node.rb
|
676
|
+
- lib/contrast/agent/assess/policy/trigger_validation/ssrf_validator.rb
|
677
|
+
- lib/contrast/agent/assess/policy/trigger_validation/trigger_validation.rb
|
678
|
+
- lib/contrast/agent/assess/policy/trigger_validation/xss_validator.rb
|
679
|
+
- lib/contrast/agent/assess/properties.rb
|
680
|
+
- lib/contrast/agent/assess/rule.rb
|
681
|
+
- lib/contrast/agent/assess/rule/base.rb
|
682
|
+
- lib/contrast/agent/assess/rule/csrf.rb
|
683
|
+
- lib/contrast/agent/assess/rule/csrf/csrf_action.rb
|
684
|
+
- lib/contrast/agent/assess/rule/csrf/csrf_applicator.rb
|
685
|
+
- lib/contrast/agent/assess/rule/csrf/csrf_watcher.rb
|
686
|
+
- lib/contrast/agent/assess/rule/provider.rb
|
687
|
+
- lib/contrast/agent/assess/rule/provider/hardcoded_key.rb
|
688
|
+
- lib/contrast/agent/assess/rule/provider/hardcoded_password.rb
|
689
|
+
- lib/contrast/agent/assess/rule/provider/hardcoded_value_rule.rb
|
690
|
+
- lib/contrast/agent/assess/rule/redos.rb
|
691
|
+
- lib/contrast/agent/assess/rule/response_scanning_rule.rb
|
692
|
+
- lib/contrast/agent/assess/rule/response_watcher.rb
|
693
|
+
- lib/contrast/agent/assess/rule/watcher.rb
|
694
|
+
- lib/contrast/agent/assess/tag.rb
|
695
|
+
- lib/contrast/agent/at_exit_hook.rb
|
696
|
+
- lib/contrast/agent/class_reopener.rb
|
697
|
+
- lib/contrast/agent/deadzone/policy/deadzone_node.rb
|
698
|
+
- lib/contrast/agent/deadzone/policy/policy.rb
|
699
|
+
- lib/contrast/agent/disable_reaction.rb
|
700
|
+
- lib/contrast/agent/exclusion_matcher.rb
|
701
|
+
- lib/contrast/agent/feature_state.rb
|
702
|
+
- lib/contrast/agent/inventory/policy/policy.rb
|
703
|
+
- lib/contrast/agent/inventory/policy/trigger_node.rb
|
704
|
+
- lib/contrast/agent/logger_manager.rb
|
705
|
+
- lib/contrast/agent/middleware.rb
|
706
|
+
- lib/contrast/agent/module_data.rb
|
707
|
+
- lib/contrast/agent/patching/policy/after_load_patch.rb
|
708
|
+
- lib/contrast/agent/patching/policy/after_load_patcher.rb
|
709
|
+
- lib/contrast/agent/patching/policy/method_policy.rb
|
710
|
+
- lib/contrast/agent/patching/policy/module_policy.rb
|
711
|
+
- lib/contrast/agent/patching/policy/patch.rb
|
712
|
+
- lib/contrast/agent/patching/policy/patch_status.rb
|
713
|
+
- lib/contrast/agent/patching/policy/patcher.rb
|
714
|
+
- lib/contrast/agent/patching/policy/policy.rb
|
715
|
+
- lib/contrast/agent/patching/policy/policy_node.rb
|
716
|
+
- lib/contrast/agent/patching/policy/policy_unpatcher.rb
|
717
|
+
- lib/contrast/agent/patching/policy/trigger_node.rb
|
718
|
+
- lib/contrast/agent/protect/policy/policy.rb
|
719
|
+
- lib/contrast/agent/protect/policy/trigger_node.rb
|
720
|
+
- lib/contrast/agent/protect/rule.rb
|
721
|
+
- lib/contrast/agent/protect/rule/base.rb
|
722
|
+
- lib/contrast/agent/protect/rule/base_service.rb
|
723
|
+
- lib/contrast/agent/protect/rule/cmd_injection.rb
|
724
|
+
- lib/contrast/agent/protect/rule/csrf.rb
|
725
|
+
- lib/contrast/agent/protect/rule/csrf/csrf_evaluator.rb
|
726
|
+
- lib/contrast/agent/protect/rule/csrf/csrf_token_injector.rb
|
727
|
+
- lib/contrast/agent/protect/rule/default_scanner.rb
|
728
|
+
- lib/contrast/agent/protect/rule/deserialization.rb
|
729
|
+
- lib/contrast/agent/protect/rule/http_method_tampering.rb
|
730
|
+
- lib/contrast/agent/protect/rule/no_sqli.rb
|
731
|
+
- lib/contrast/agent/protect/rule/no_sqli/mongo_no_sql_scanner.rb
|
732
|
+
- lib/contrast/agent/protect/rule/path_traversal.rb
|
733
|
+
- lib/contrast/agent/protect/rule/sqli.rb
|
734
|
+
- lib/contrast/agent/protect/rule/sqli/default_sql_scanner.rb
|
735
|
+
- lib/contrast/agent/protect/rule/sqli/mysql_sql_scanner.rb
|
736
|
+
- lib/contrast/agent/protect/rule/sqli/postgres_sql_scanner.rb
|
737
|
+
- lib/contrast/agent/protect/rule/sqli/sqlite_sql_scanner.rb
|
738
|
+
- lib/contrast/agent/protect/rule/unsafe_file_upload.rb
|
739
|
+
- lib/contrast/agent/protect/rule/xss.rb
|
740
|
+
- lib/contrast/agent/protect/rule/xxe.rb
|
741
|
+
- lib/contrast/agent/protect/rule/xxe/entity_wrapper.rb
|
742
|
+
- lib/contrast/agent/railtie.rb
|
743
|
+
- lib/contrast/agent/reaction_processor.rb
|
744
|
+
- lib/contrast/agent/request.rb
|
745
|
+
- lib/contrast/agent/request_context.rb
|
746
|
+
- lib/contrast/agent/require_state.rb
|
747
|
+
- lib/contrast/agent/response.rb
|
748
|
+
- lib/contrast/agent/rewriter.rb
|
749
|
+
- lib/contrast/agent/scope.rb
|
750
|
+
- lib/contrast/agent/service_heartbeat.rb
|
751
|
+
- lib/contrast/agent/settings_state.rb
|
752
|
+
- lib/contrast/agent/socket_client.rb
|
753
|
+
- lib/contrast/agent/thread.rb
|
754
|
+
- lib/contrast/agent/tracepoint_hook.rb
|
755
|
+
- lib/contrast/agent/version.rb
|
756
|
+
- lib/contrast/api.rb
|
757
|
+
- lib/contrast/api/.gitkeep
|
758
|
+
- lib/contrast/api/connection_status.rb
|
759
|
+
- lib/contrast/api/dtm_pb.rb
|
760
|
+
- lib/contrast/api/settings_pb.rb
|
761
|
+
- lib/contrast/api/socket.rb
|
762
|
+
- lib/contrast/api/speedracer.rb
|
763
|
+
- lib/contrast/api/tcp_socket.rb
|
764
|
+
- lib/contrast/api/unix_socket.rb
|
765
|
+
- lib/contrast/common_agent_configuration.rb
|
766
|
+
- lib/contrast/components/agent.rb
|
767
|
+
- lib/contrast/components/app_context.rb
|
768
|
+
- lib/contrast/components/assess.rb
|
769
|
+
- lib/contrast/components/config.rb
|
770
|
+
- lib/contrast/components/contrast_service.rb
|
771
|
+
- lib/contrast/components/heap_dump.rb
|
772
|
+
- lib/contrast/components/interface.rb
|
773
|
+
- lib/contrast/components/inventory.rb
|
774
|
+
- lib/contrast/components/logger.rb
|
775
|
+
- lib/contrast/components/protect.rb
|
776
|
+
- lib/contrast/components/sampling.rb
|
777
|
+
- lib/contrast/components/scope.rb
|
778
|
+
- lib/contrast/components/settings.rb
|
779
|
+
- lib/contrast/config.rb
|
780
|
+
- lib/contrast/config/agent_configuration.rb
|
781
|
+
- lib/contrast/config/application_configuration.rb
|
782
|
+
- lib/contrast/config/assess_configuration.rb
|
783
|
+
- lib/contrast/config/assess_rules_configuration.rb
|
784
|
+
- lib/contrast/config/base_configuration.rb
|
785
|
+
- lib/contrast/config/default_value.rb
|
786
|
+
- lib/contrast/config/exception_configuration.rb
|
787
|
+
- lib/contrast/config/heap_dump_configuration.rb
|
788
|
+
- lib/contrast/config/inventory_configuration.rb
|
789
|
+
- lib/contrast/config/logger_configuration.rb
|
790
|
+
- lib/contrast/config/protect_configuration.rb
|
791
|
+
- lib/contrast/config/protect_rule_configuration.rb
|
792
|
+
- lib/contrast/config/protect_rules_configuration.rb
|
793
|
+
- lib/contrast/config/root_configuration.rb
|
794
|
+
- lib/contrast/config/ruby_configuration.rb
|
795
|
+
- lib/contrast/config/sampling_configuration.rb
|
796
|
+
- lib/contrast/config/server_configuration.rb
|
797
|
+
- lib/contrast/config/service_configuration.rb
|
798
|
+
- lib/contrast/configuration.rb
|
799
|
+
- lib/contrast/core_extensions/assess.rb
|
800
|
+
- lib/contrast/core_extensions/assess/array.rb
|
801
|
+
- lib/contrast/core_extensions/assess/assess_extension.rb
|
802
|
+
- lib/contrast/core_extensions/assess/basic_object.rb
|
803
|
+
- lib/contrast/core_extensions/assess/erb.rb
|
804
|
+
- lib/contrast/core_extensions/assess/exec_trigger.rb
|
805
|
+
- lib/contrast/core_extensions/assess/fiber.rb
|
806
|
+
- lib/contrast/core_extensions/assess/hash.rb
|
807
|
+
- lib/contrast/core_extensions/assess/kernel.rb
|
808
|
+
- lib/contrast/core_extensions/assess/module.rb
|
809
|
+
- lib/contrast/core_extensions/assess/regexp.rb
|
810
|
+
- lib/contrast/core_extensions/assess/string.rb
|
811
|
+
- lib/contrast/core_extensions/assess/tilt_template_trigger.rb
|
812
|
+
- lib/contrast/core_extensions/delegator.rb
|
813
|
+
- lib/contrast/core_extensions/eval_trigger.rb
|
814
|
+
- lib/contrast/core_extensions/inventory.rb
|
815
|
+
- lib/contrast/core_extensions/inventory/datastores.rb
|
816
|
+
- lib/contrast/core_extensions/module.rb
|
817
|
+
- lib/contrast/core_extensions/object.rb
|
818
|
+
- lib/contrast/core_extensions/protect.rb
|
819
|
+
- lib/contrast/core_extensions/protect/applies_command_injection_rule.rb
|
820
|
+
- lib/contrast/core_extensions/protect/applies_deserialization_rule.rb
|
821
|
+
- lib/contrast/core_extensions/protect/applies_no_sqli_rule.rb
|
822
|
+
- lib/contrast/core_extensions/protect/applies_path_traversal_rule.rb
|
823
|
+
- lib/contrast/core_extensions/protect/applies_sqli_rule.rb
|
824
|
+
- lib/contrast/core_extensions/protect/applies_xxe_rule.rb
|
825
|
+
- lib/contrast/core_extensions/protect/kernel.rb
|
826
|
+
- lib/contrast/core_extensions/protect/psych.rb
|
827
|
+
- lib/contrast/core_extensions/thread.rb
|
828
|
+
- lib/contrast/internal_exception.rb
|
829
|
+
- lib/contrast/rails_extensions/assess/action_controller_inheritance.rb
|
830
|
+
- lib/contrast/rails_extensions/assess/active_record.rb
|
831
|
+
- lib/contrast/rails_extensions/assess/active_record_named.rb
|
832
|
+
- lib/contrast/rails_extensions/assess/configuration.rb
|
833
|
+
- lib/contrast/rails_extensions/buffer.rb
|
834
|
+
- lib/contrast/rails_extensions/rack.rb
|
835
|
+
- lib/contrast/security_exception.rb
|
836
|
+
- lib/contrast/sinatra_extensions/assess/cookie.rb
|
837
|
+
- lib/contrast/sinatra_extensions/inventory/sinatra_base.rb
|
838
|
+
- lib/contrast/tasks/service.rb
|
839
|
+
- lib/contrast/utils/assess/sampling_util.rb
|
840
|
+
- lib/contrast/utils/assess/tracking_util.rb
|
841
|
+
- lib/contrast/utils/boolean_util.rb
|
842
|
+
- lib/contrast/utils/cache.rb
|
843
|
+
- lib/contrast/utils/class_util.rb
|
844
|
+
- lib/contrast/utils/comment_range.rb
|
845
|
+
- lib/contrast/utils/data_store_util.rb
|
846
|
+
- lib/contrast/utils/duck_utils.rb
|
847
|
+
- lib/contrast/utils/env_configuration_item.rb
|
848
|
+
- lib/contrast/utils/environment_util.rb
|
849
|
+
- lib/contrast/utils/freeze_util.rb
|
850
|
+
- lib/contrast/utils/gemfile_reader.rb
|
851
|
+
- lib/contrast/utils/hash_digest.rb
|
852
|
+
- lib/contrast/utils/heap_dump_util.rb
|
853
|
+
- lib/contrast/utils/invalid_configuration_util.rb
|
854
|
+
- lib/contrast/utils/inventory_util.rb
|
855
|
+
- lib/contrast/utils/io_util.rb
|
856
|
+
- lib/contrast/utils/object_share.rb
|
857
|
+
- lib/contrast/utils/operating_environment.rb
|
858
|
+
- lib/contrast/utils/os.rb
|
859
|
+
- lib/contrast/utils/path_util.rb
|
860
|
+
- lib/contrast/utils/performs_logging.rb
|
861
|
+
- lib/contrast/utils/preflight_util.rb
|
862
|
+
- lib/contrast/utils/prevent_serialization.rb
|
863
|
+
- lib/contrast/utils/rack_assess_session_cookie.rb
|
864
|
+
- lib/contrast/utils/rails_assess_configuration.rb
|
865
|
+
- lib/contrast/utils/random_util.rb
|
866
|
+
- lib/contrast/utils/resource_loader.rb
|
867
|
+
- lib/contrast/utils/ruby_ast_rewriter.rb
|
868
|
+
- lib/contrast/utils/scope_util.rb
|
869
|
+
- lib/contrast/utils/service_response_util.rb
|
870
|
+
- lib/contrast/utils/service_sender_util.rb
|
871
|
+
- lib/contrast/utils/sha256_builder.rb
|
872
|
+
- lib/contrast/utils/sinatra_helper.rb
|
873
|
+
- lib/contrast/utils/stack_trace_utils.rb
|
874
|
+
- lib/contrast/utils/string_utils.rb
|
875
|
+
- lib/contrast/utils/tag_util.rb
|
876
|
+
- lib/contrast/utils/thread_tracker.rb
|
877
|
+
- lib/contrast/utils/timer.rb
|
878
|
+
- resources/assess/policy.json
|
879
|
+
- resources/csrf/inject.js
|
880
|
+
- resources/deadzone/policy.json
|
881
|
+
- resources/factory-bot-spec/spec_helper.rb
|
882
|
+
- resources/inventory/policy.json
|
883
|
+
- resources/protect/policy.json
|
884
|
+
- resources/rubocops/kernel/catch_cop.rb
|
885
|
+
- resources/rubocops/kernel/require_cop.rb
|
886
|
+
- resources/rubocops/kernel/require_relative_cop.rb
|
887
|
+
- resources/rubocops/module/autoload_cop.rb
|
888
|
+
- resources/rubocops/module/const_defined_cop.rb
|
889
|
+
- resources/rubocops/module/const_get_cop.rb
|
890
|
+
- resources/rubocops/module/const_set_cop.rb
|
891
|
+
- resources/rubocops/module/constants_cop.rb
|
892
|
+
- resources/rubocops/module/name_cop.rb
|
893
|
+
- resources/rubocops/object/class_cop.rb
|
894
|
+
- resources/rubocops/object/freeze_cop.rb
|
895
|
+
- resources/rubocops/object/frozen_cop.rb
|
896
|
+
- resources/rubocops/object/is_a_cop.rb
|
897
|
+
- resources/rubocops/object/method_cop.rb
|
898
|
+
- resources/rubocops/object/respond_to_cop.rb
|
899
|
+
- resources/rubocops/object/singleton_class_cop.rb
|
900
|
+
- resources/rubocops/regexp/spelling_cop.rb
|
901
|
+
- resources/rubocops/thread/new_cop.rb
|
902
|
+
- resources/ruby-spec/ancestors_spec.rb
|
903
|
+
- resources/ruby-spec/modulo_spec.rb
|
904
|
+
- resources/ruby-spec/parameters_spec.rb
|
905
|
+
- resources/ruby-spec/ruby_spec_spec_helper.rb
|
906
|
+
- resources/test_marker.txt
|
907
|
+
- ruby-agent.gemspec
|
908
|
+
- service_executables/.gitkeep
|
909
|
+
- service_executables/VERSION
|
910
|
+
- service_executables/linux/contrast-service
|
911
|
+
- service_executables/mac/contrast-service
|
912
|
+
- shared_libraries/.gitkeep
|
913
|
+
- shared_libraries/funchook.h
|
914
|
+
- shared_libraries/libfunchook.so
|
915
|
+
homepage: https://www.contrastsecurity.com
|
916
|
+
licenses:
|
917
|
+
- CONTRAST SECURITY (see license file)
|
918
|
+
metadata:
|
919
|
+
changelog_uri: https://docs.contrastsecurity.com/release.html
|
920
|
+
support_uri: https://support.contrastsecurity.com
|
921
|
+
trouble_shooting_uri: https://support.contrastsecurity.com/hc/en-us/search?utf8=%E2%9C%93&query=Ruby
|
922
|
+
wiki_uri: https://docs.contrastsecurity.com/
|
923
|
+
post_install_message:
|
924
|
+
rdoc_options: []
|
925
|
+
require_paths:
|
926
|
+
- lib
|
927
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
928
|
+
requirements:
|
929
|
+
- - ">="
|
930
|
+
- !ruby/object:Gem::Version
|
931
|
+
version: 2.4.0
|
932
|
+
- - "<"
|
933
|
+
- !ruby/object:Gem::Version
|
934
|
+
version: 2.8.0
|
935
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
936
|
+
requirements:
|
937
|
+
- - ">="
|
938
|
+
- !ruby/object:Gem::Version
|
939
|
+
version: '0'
|
940
|
+
requirements: []
|
941
|
+
rubygems_version: 3.0.3
|
942
|
+
signing_key:
|
943
|
+
specification_version: 4
|
944
|
+
summary: Contrast Security's agent for rack-based applications.
|
945
|
+
test_files: []
|