contrast-agent 3.12.2 → 3.15.0

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