contrast-agent 6.7.0 → 6.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (280) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -2
  3. data/.simplecov +0 -1
  4. data/Rakefile +0 -1
  5. data/ext/cs__assess_array/cs__assess_array.c +41 -10
  6. data/ext/cs__assess_array/cs__assess_array.h +4 -1
  7. data/lib/contrast/agent/assess/policy/trigger_method.rb +3 -3
  8. data/lib/contrast/agent/assess/policy/trigger_validation/redos_validator.rb +1 -1
  9. data/lib/contrast/agent/assess/policy/trigger_validation/ssrf_validator.rb +1 -1
  10. data/lib/contrast/agent/assess/policy/trigger_validation/xss_validator.rb +1 -1
  11. data/lib/contrast/agent/assess/property/evented.rb +11 -11
  12. data/lib/contrast/agent/assess.rb +0 -1
  13. data/lib/contrast/agent/excluder.rb +53 -35
  14. data/lib/contrast/agent/exclusion_matcher.rb +21 -9
  15. data/lib/contrast/agent/middleware.rb +12 -6
  16. data/lib/contrast/agent/patching/policy/after_load_patcher.rb +6 -0
  17. data/lib/contrast/agent/protect/input_analyzer/input_analyzer.rb +146 -127
  18. data/lib/contrast/agent/protect/input_analyzer/worth_watching_analyzer.rb +116 -0
  19. data/lib/contrast/agent/protect/policy/applies_path_traversal_rule.rb +20 -0
  20. data/lib/contrast/agent/protect/policy/rule_applicator.rb +1 -1
  21. data/lib/contrast/agent/protect/rule/base.rb +47 -55
  22. data/lib/contrast/agent/protect/rule/base_service.rb +48 -24
  23. data/lib/contrast/agent/protect/rule/bot_blocker/bot_blocker_input_classification.rb +98 -0
  24. data/lib/contrast/agent/protect/rule/bot_blocker.rb +81 -0
  25. data/lib/contrast/agent/protect/rule/cmd_injection.rb +20 -2
  26. data/lib/contrast/agent/protect/rule/cmdi/cmdi_backdoors.rb +8 -5
  27. data/lib/contrast/agent/protect/rule/cmdi/cmdi_base_rule.rb +22 -22
  28. data/lib/contrast/agent/protect/rule/cmdi/cmdi_chained_command.rb +64 -0
  29. data/lib/contrast/agent/protect/rule/cmdi/cmdi_dangerous_path.rb +63 -0
  30. data/lib/contrast/agent/protect/rule/cmdi/cmdi_input_classification.rb +2 -58
  31. data/lib/contrast/agent/protect/rule/default_scanner.rb +1 -1
  32. data/lib/contrast/agent/protect/rule/deserialization.rb +3 -14
  33. data/lib/contrast/agent/protect/rule/http_method_tampering/http_method_tampering_input_classification.rb +2 -2
  34. data/lib/contrast/agent/protect/rule/http_method_tampering.rb +0 -11
  35. data/lib/contrast/agent/protect/rule/no_sqli/no_sqli_input_classification.rb +29 -34
  36. data/lib/contrast/agent/protect/rule/no_sqli.rb +25 -18
  37. data/lib/contrast/agent/protect/rule/path_traversal/path_traversal_input_classification.rb +61 -0
  38. data/lib/contrast/agent/protect/rule/path_traversal/path_traversal_semantic_security_bypass.rb +114 -0
  39. data/lib/contrast/agent/protect/rule/path_traversal.rb +40 -13
  40. data/lib/contrast/agent/protect/rule/sql_sample_builder.rb +33 -15
  41. data/lib/contrast/agent/protect/rule/sqli/sqli_base_rule.rb +0 -14
  42. data/lib/contrast/agent/protect/rule/sqli/sqli_input_classification.rb +2 -62
  43. data/lib/contrast/agent/protect/rule/sqli.rb +74 -3
  44. data/lib/contrast/agent/protect/rule/unsafe_file_upload/unsafe_file_upload_input_classification.rb +39 -63
  45. data/lib/contrast/agent/protect/rule/unsafe_file_upload.rb +6 -33
  46. data/lib/contrast/agent/protect/rule/xss/reflected_xss_input_classification.rb +58 -0
  47. data/lib/contrast/agent/protect/rule/xss.rb +15 -20
  48. data/lib/contrast/agent/protect/rule/xxe.rb +4 -24
  49. data/lib/contrast/agent/reporting/attack_result/rasp_rule_sample.rb +19 -40
  50. data/lib/contrast/agent/reporting/attack_result/response_type.rb +9 -9
  51. data/lib/contrast/agent/reporting/details/ip_denylist_details.rb +10 -2
  52. data/lib/contrast/agent/reporting/details/virtual_patch_details.rb +8 -2
  53. data/lib/contrast/agent/reporting/input_analysis/details/bot_blocker_details.rb +27 -0
  54. data/lib/contrast/agent/reporting/input_analysis/details/protect_rule_details.rb +15 -0
  55. data/lib/contrast/agent/reporting/input_analysis/input_analysis.rb +1 -2
  56. data/lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb +16 -2
  57. data/lib/contrast/agent/reporting/masker/masker.rb +2 -0
  58. data/lib/contrast/agent/reporting/report.rb +1 -0
  59. data/lib/contrast/agent/reporting/reporter.rb +35 -14
  60. data/lib/contrast/agent/reporting/reporter_heartbeat.rb +3 -9
  61. data/lib/contrast/agent/reporting/reporting_events/application_activity.rb +16 -13
  62. data/lib/contrast/agent/reporting/reporting_events/application_defend_activity.rb +12 -7
  63. data/lib/contrast/agent/reporting/reporting_events/application_defend_attack_activity.rb +3 -3
  64. data/lib/contrast/agent/reporting/reporting_events/application_defend_attack_sample.rb +1 -2
  65. data/lib/contrast/agent/reporting/reporting_events/application_inventory_activity.rb +6 -1
  66. data/lib/contrast/agent/reporting/reporting_events/application_update.rb +0 -2
  67. data/lib/contrast/agent/reporting/reporting_events/architecture_component.rb +0 -1
  68. data/lib/contrast/agent/reporting/reporting_events/finding.rb +6 -6
  69. data/lib/contrast/agent/reporting/reporting_events/finding_event.rb +239 -93
  70. data/lib/contrast/agent/reporting/reporting_events/finding_event_signature.rb +10 -23
  71. data/lib/contrast/agent/reporting/reporting_events/finding_event_source.rb +10 -9
  72. data/lib/contrast/agent/reporting/reporting_events/finding_request.rb +0 -5
  73. data/lib/contrast/agent/reporting/reporting_events/library_discovery.rb +0 -1
  74. data/lib/contrast/agent/reporting/reporting_events/observed_route.rb +12 -0
  75. data/lib/contrast/agent/reporting/reporting_events/poll.rb +1 -11
  76. data/lib/contrast/agent/reporting/reporting_events/route_discovery.rb +0 -1
  77. data/lib/contrast/agent/reporting/reporting_events/route_discovery_observation.rb +0 -1
  78. data/lib/contrast/agent/reporting/reporting_events/server_reporting_event.rb +8 -0
  79. data/lib/contrast/agent/reporting/reporting_events/server_settings.rb +40 -0
  80. data/lib/contrast/agent/reporting/reporting_utilities/audit.rb +2 -2
  81. data/lib/contrast/agent/reporting/reporting_utilities/endpoints.rb +6 -0
  82. data/lib/contrast/agent/reporting/reporting_utilities/reporter_client.rb +43 -1
  83. data/lib/contrast/agent/reporting/reporting_utilities/reporter_client_utils.rb +8 -4
  84. data/lib/contrast/agent/reporting/reporting_utilities/response.rb +1 -1
  85. data/lib/contrast/agent/reporting/reporting_utilities/response_extractor.rb +58 -4
  86. data/lib/contrast/agent/reporting/reporting_utilities/response_handler.rb +4 -6
  87. data/lib/contrast/agent/reporting/reporting_utilities/response_handler_utils.rb +77 -16
  88. data/lib/contrast/agent/reporting/server_settings_worker.rb +44 -0
  89. data/lib/contrast/agent/reporting/settings/assess_server_feature.rb +14 -2
  90. data/lib/contrast/agent/reporting/settings/code_exclusion.rb +6 -1
  91. data/lib/contrast/agent/reporting/settings/exclusion_base.rb +18 -0
  92. data/lib/contrast/agent/reporting/settings/exclusions.rb +2 -1
  93. data/lib/contrast/agent/reporting/settings/helpers.rb +7 -0
  94. data/lib/contrast/agent/reporting/settings/input_exclusion.rb +9 -3
  95. data/lib/contrast/agent/reporting/settings/protect.rb +15 -15
  96. data/lib/contrast/agent/reporting/settings/protect_server_feature.rb +39 -2
  97. data/lib/contrast/agent/reporting/settings/rule_definition.rb +3 -0
  98. data/lib/contrast/agent/reporting/settings/security_logger.rb +77 -0
  99. data/lib/contrast/agent/reporting/settings/server_features.rb +9 -0
  100. data/lib/contrast/agent/reporting/settings/syslog.rb +34 -5
  101. data/lib/contrast/agent/request.rb +3 -14
  102. data/lib/contrast/agent/request_context.rb +6 -9
  103. data/lib/contrast/agent/request_context_extend.rb +9 -148
  104. data/lib/contrast/agent/request_handler.rb +5 -10
  105. data/lib/contrast/agent/telemetry/events/exceptions/telemetry_exception_event.rb +1 -1
  106. data/lib/contrast/agent/thread_watcher.rb +37 -18
  107. data/lib/contrast/agent/version.rb +1 -1
  108. data/lib/contrast/agent.rb +6 -11
  109. data/lib/contrast/agent_lib/api/command_injection.rb +46 -0
  110. data/lib/contrast/agent_lib/api/init.rb +101 -0
  111. data/lib/contrast/agent_lib/api/input_tracing.rb +267 -0
  112. data/lib/contrast/agent_lib/api/method_tempering.rb +29 -0
  113. data/lib/contrast/agent_lib/api/panic.rb +87 -0
  114. data/lib/contrast/agent_lib/api/path_semantic_file_security_bypass.rb +40 -0
  115. data/lib/contrast/agent_lib/interface.rb +260 -0
  116. data/lib/contrast/agent_lib/interface_base.rb +118 -0
  117. data/lib/contrast/agent_lib/return_types/eval_result.rb +44 -0
  118. data/lib/contrast/agent_lib/test.rb +29 -0
  119. data/lib/contrast/api/communication/connection_status.rb +20 -5
  120. data/lib/contrast/components/agent.rb +34 -14
  121. data/lib/contrast/components/api.rb +23 -0
  122. data/lib/contrast/components/app_context.rb +23 -5
  123. data/lib/contrast/components/app_context_extend.rb +0 -25
  124. data/lib/contrast/components/assess.rb +34 -4
  125. data/lib/contrast/components/assess_rules.rb +18 -0
  126. data/lib/contrast/components/base.rb +40 -0
  127. data/lib/contrast/components/config/sources.rb +95 -0
  128. data/lib/contrast/components/config.rb +19 -19
  129. data/lib/contrast/components/heap_dump.rb +10 -0
  130. data/lib/contrast/components/inventory.rb +15 -2
  131. data/lib/contrast/components/logger.rb +18 -0
  132. data/lib/contrast/components/polling.rb +36 -0
  133. data/lib/contrast/components/protect.rb +52 -2
  134. data/lib/contrast/components/ruby_component.rb +16 -1
  135. data/lib/contrast/components/sampling.rb +70 -13
  136. data/lib/contrast/components/security_logger.rb +13 -0
  137. data/lib/contrast/components/settings.rb +105 -90
  138. data/lib/contrast/config/certification_configuration.rb +14 -0
  139. data/lib/contrast/config/config.rb +46 -0
  140. data/lib/contrast/config/diagnostics.rb +114 -0
  141. data/lib/contrast/config/diagnostics_tools.rb +98 -0
  142. data/lib/contrast/config/effective_config.rb +65 -0
  143. data/lib/contrast/config/effective_config_value.rb +32 -0
  144. data/lib/contrast/config/exception_configuration.rb +12 -0
  145. data/lib/contrast/config/protect_rule_configuration.rb +8 -8
  146. data/lib/contrast/config/protect_rules_configuration.rb +23 -60
  147. data/lib/contrast/config/request_audit_configuration.rb +13 -0
  148. data/lib/contrast/config/server_configuration.rb +41 -2
  149. data/lib/contrast/configuration.rb +29 -12
  150. data/lib/contrast/extension/assess/array.rb +9 -0
  151. data/lib/contrast/extension/assess/erb.rb +1 -1
  152. data/lib/contrast/extension/delegator.rb +2 -0
  153. data/lib/contrast/framework/manager.rb +3 -1
  154. data/lib/contrast/framework/rails/railtie.rb +0 -1
  155. data/lib/contrast/framework/rails/support.rb +0 -1
  156. data/lib/contrast/tasks/config.rb +1 -8
  157. data/lib/contrast/utils/assess/event_limit_utils.rb +31 -9
  158. data/lib/contrast/utils/assess/trigger_method_utils.rb +5 -4
  159. data/lib/contrast/utils/duck_utils.rb +1 -0
  160. data/lib/contrast/utils/hash_digest.rb +2 -2
  161. data/lib/contrast/utils/input_classification_base.rb +155 -0
  162. data/lib/contrast/utils/os.rb +0 -20
  163. data/lib/contrast/utils/reporting/application_activity_batch_utils.rb +81 -0
  164. data/lib/contrast/utils/response_utils.rb +0 -16
  165. data/lib/contrast/utils/routes_sent.rb +60 -0
  166. data/lib/contrast/utils/stack_trace_utils.rb +3 -15
  167. data/lib/contrast/utils/string_utils.rb +10 -7
  168. data/lib/contrast/utils/telemetry_client.rb +1 -2
  169. data/lib/contrast/utils/timer.rb +16 -0
  170. data/lib/contrast.rb +5 -4
  171. data/resources/protect/policy.json +1 -2
  172. data/ruby-agent.gemspec +7 -6
  173. metadata +69 -130
  174. data/exe/contrast_service +0 -23
  175. data/lib/contrast/agent/assess/contrast_event.rb +0 -157
  176. data/lib/contrast/agent/assess/events/event_factory.rb +0 -34
  177. data/lib/contrast/agent/assess/events/source_event.rb +0 -46
  178. data/lib/contrast/agent/protect/rule/cmdi/cmdi_worth_watching.rb +0 -64
  179. data/lib/contrast/agent/protect/rule/sqli/sqli_worth_watching.rb +0 -118
  180. data/lib/contrast/agent/protect/rule/unsafe_file_upload/unsafe_file_upload_matcher.rb +0 -45
  181. data/lib/contrast/agent/reaction_processor.rb +0 -47
  182. data/lib/contrast/agent/reporting/reporting_events/server_activity.rb +0 -36
  183. data/lib/contrast/agent/service_heartbeat.rb +0 -35
  184. data/lib/contrast/api/communication/messaging_queue.rb +0 -128
  185. data/lib/contrast/api/communication/response_processor.rb +0 -90
  186. data/lib/contrast/api/communication/service_lifecycle.rb +0 -77
  187. data/lib/contrast/api/communication/socket.rb +0 -44
  188. data/lib/contrast/api/communication/socket_client.rb +0 -130
  189. data/lib/contrast/api/communication/speedracer.rb +0 -138
  190. data/lib/contrast/api/communication/tcp_socket.rb +0 -32
  191. data/lib/contrast/api/communication/unix_socket.rb +0 -28
  192. data/lib/contrast/api/communication.rb +0 -20
  193. data/lib/contrast/api/decorators/address.rb +0 -59
  194. data/lib/contrast/api/decorators/agent_startup.rb +0 -56
  195. data/lib/contrast/api/decorators/application_settings.rb +0 -43
  196. data/lib/contrast/api/decorators/application_startup.rb +0 -56
  197. data/lib/contrast/api/decorators/bot_blocker.rb +0 -37
  198. data/lib/contrast/api/decorators/http_request.rb +0 -137
  199. data/lib/contrast/api/decorators/input_analysis.rb +0 -18
  200. data/lib/contrast/api/decorators/instrumentation_mode.rb +0 -35
  201. data/lib/contrast/api/decorators/ip_denylist.rb +0 -37
  202. data/lib/contrast/api/decorators/message.rb +0 -67
  203. data/lib/contrast/api/decorators/rasp_rule_sample.rb +0 -52
  204. data/lib/contrast/api/decorators/response_type.rb +0 -17
  205. data/lib/contrast/api/decorators/server_features.rb +0 -25
  206. data/lib/contrast/api/decorators/user_input.rb +0 -51
  207. data/lib/contrast/api/decorators/virtual_patch.rb +0 -34
  208. data/lib/contrast/api/decorators.rb +0 -22
  209. data/lib/contrast/api/dtm.pb.rb +0 -363
  210. data/lib/contrast/api/settings.pb.rb +0 -500
  211. data/lib/contrast/api.rb +0 -16
  212. data/lib/contrast/components/contrast_service.rb +0 -88
  213. data/lib/contrast/components/service.rb +0 -55
  214. data/lib/contrast/tasks/service.rb +0 -84
  215. data/lib/contrast/utils/input_classification.rb +0 -73
  216. data/lib/protobuf/code_generator.rb +0 -129
  217. data/lib/protobuf/decoder.rb +0 -28
  218. data/lib/protobuf/deprecation.rb +0 -117
  219. data/lib/protobuf/descriptors/google/protobuf/compiler/plugin.pb.rb +0 -79
  220. data/lib/protobuf/descriptors/google/protobuf/descriptor.pb.rb +0 -360
  221. data/lib/protobuf/descriptors.rb +0 -3
  222. data/lib/protobuf/encoder.rb +0 -11
  223. data/lib/protobuf/enum.rb +0 -365
  224. data/lib/protobuf/exceptions.rb +0 -9
  225. data/lib/protobuf/field/base_field.rb +0 -380
  226. data/lib/protobuf/field/base_field_object_definitions.rb +0 -504
  227. data/lib/protobuf/field/bool_field.rb +0 -64
  228. data/lib/protobuf/field/bytes_field.rb +0 -67
  229. data/lib/protobuf/field/double_field.rb +0 -25
  230. data/lib/protobuf/field/enum_field.rb +0 -56
  231. data/lib/protobuf/field/field_array.rb +0 -102
  232. data/lib/protobuf/field/field_hash.rb +0 -122
  233. data/lib/protobuf/field/fixed32_field.rb +0 -25
  234. data/lib/protobuf/field/fixed64_field.rb +0 -28
  235. data/lib/protobuf/field/float_field.rb +0 -43
  236. data/lib/protobuf/field/int32_field.rb +0 -21
  237. data/lib/protobuf/field/int64_field.rb +0 -34
  238. data/lib/protobuf/field/integer_field.rb +0 -23
  239. data/lib/protobuf/field/message_field.rb +0 -51
  240. data/lib/protobuf/field/sfixed32_field.rb +0 -27
  241. data/lib/protobuf/field/sfixed64_field.rb +0 -28
  242. data/lib/protobuf/field/signed_integer_field.rb +0 -29
  243. data/lib/protobuf/field/sint32_field.rb +0 -21
  244. data/lib/protobuf/field/sint64_field.rb +0 -21
  245. data/lib/protobuf/field/string_field.rb +0 -51
  246. data/lib/protobuf/field/uint32_field.rb +0 -21
  247. data/lib/protobuf/field/uint64_field.rb +0 -21
  248. data/lib/protobuf/field/varint_field.rb +0 -77
  249. data/lib/protobuf/field.rb +0 -74
  250. data/lib/protobuf/generators/base.rb +0 -85
  251. data/lib/protobuf/generators/enum_generator.rb +0 -39
  252. data/lib/protobuf/generators/extension_generator.rb +0 -27
  253. data/lib/protobuf/generators/field_generator.rb +0 -193
  254. data/lib/protobuf/generators/file_generator.rb +0 -262
  255. data/lib/protobuf/generators/group_generator.rb +0 -122
  256. data/lib/protobuf/generators/message_generator.rb +0 -104
  257. data/lib/protobuf/generators/option_generator.rb +0 -17
  258. data/lib/protobuf/generators/printable.rb +0 -160
  259. data/lib/protobuf/generators/service_generator.rb +0 -50
  260. data/lib/protobuf/lifecycle.rb +0 -33
  261. data/lib/protobuf/logging.rb +0 -39
  262. data/lib/protobuf/message/fields.rb +0 -233
  263. data/lib/protobuf/message/serialization.rb +0 -85
  264. data/lib/protobuf/message.rb +0 -241
  265. data/lib/protobuf/optionable.rb +0 -72
  266. data/lib/protobuf/tasks/compile.rake +0 -80
  267. data/lib/protobuf/tasks.rb +0 -1
  268. data/lib/protobuf/varint.rb +0 -20
  269. data/lib/protobuf/varint_pure.rb +0 -31
  270. data/lib/protobuf/version.rb +0 -3
  271. data/lib/protobuf/wire_type.rb +0 -10
  272. data/lib/protobuf.rb +0 -91
  273. data/proto/dynamic_discovery.proto +0 -46
  274. data/proto/google/protobuf/compiler/plugin.proto +0 -183
  275. data/proto/google/protobuf/descriptor.proto +0 -911
  276. data/proto/rpc.proto +0 -71
  277. data/service_executables/.gitkeep +0 -0
  278. data/service_executables/VERSION +0 -1
  279. data/service_executables/linux/contrast-service +0 -0
  280. data/service_executables/mac/contrast-service +0 -0
@@ -0,0 +1,60 @@
1
+ # Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
2
+ # frozen_string_literal: true
3
+
4
+ # require 'contrast/components/logger'
5
+ # require 'contrast/agent/telemetry/events/exceptions/telemetry_exception_event'
6
+
7
+ module Contrast
8
+ module Utils
9
+ # This is the RoutesSent class, which determines whether observed routes can be sent to TeamServer.
10
+ # Routes that have not been seen (according to the cache) can be sent, as well as any route that
11
+ # # has been seen but not within the time limit.
12
+ class RoutesSent
13
+ # include Contrast::Components::Logger::InstanceMethods
14
+ ROUTES_LIMIT = 500
15
+ TIME_LIMIT_IN_SECONDS = 3600
16
+
17
+ attr_accessor :cache
18
+
19
+ def initialize
20
+ @cache = {}
21
+ end
22
+
23
+ # Determine whether the provided route can be sent to TeamServer.
24
+ #
25
+ # @param [Contrast::Agent::Reporting::ObservedRoute] the route
26
+ # @return [boolean]
27
+ def sendable? route
28
+ route_hash = route.hash_id
29
+
30
+ # If hash doesn't exist in @cache...
31
+ # - Add hash to @cache (with Time.now)
32
+ # - Clear oldest entries (if more than ROUTES_LIMIT)
33
+ # - Return *true*
34
+ unless cache.key?(route_hash)
35
+ cache[route_hash] = Time.now
36
+ remove_oldest_entries!
37
+ return true
38
+ end
39
+
40
+ # If hash exists in @cache...
41
+ # - Return *true* if more than a minute since time recorded for hash
42
+ # - Return *false* if not than a minute since time recorded for hash
43
+ return false unless Time.now.to_i - cache.fetch(route_hash, 0).to_i > TIME_LIMIT_IN_SECONDS
44
+
45
+ cache[route_hash] = Time.now
46
+ true
47
+ end
48
+
49
+ private
50
+
51
+ def remove_oldest_entries!
52
+ return if cache.size < ROUTES_LIMIT
53
+
54
+ route_hashes = cache.sort_by { |_, v| -v.tv_nsec }.
55
+ to_h.keys.slice(0, ROUTES_LIMIT)
56
+ @cache = cache.slice(*route_hashes)
57
+ end
58
+ end
59
+ end
60
+ end
@@ -3,7 +3,6 @@
3
3
 
4
4
  require 'contrast/utils/object_share'
5
5
  require 'contrast/agent/reporting/reporting_events/application_defend_attack_sample_stack'
6
- require 'contrast/api'
7
6
 
8
7
  module Contrast
9
8
  module Utils
@@ -33,16 +32,7 @@ module Contrast
33
32
  end
34
33
 
35
34
  # Call and translate a caller_locations array to an array of
36
- # StackTraceElement for TeamServer to display, excluding any Contrast
37
- # code found.
38
- #
39
- # @return [Array<Contrast::Api::Dtm::StackTraceElement>]
40
- def build_protect_stack_array
41
- build_protect_stack(Contrast::Api::Dtm::StackTraceElement)
42
- end
43
-
44
- # Call and translate a caller_locations array to an array of
45
- # StackTraceElement for TeamServer to display, excluding any Contrast
35
+ # ApplicationDefendAttackSampleStack for TeamServer to display, excluding any Contrast
46
36
  # code found.
47
37
  #
48
38
  # @return [Array<Contrast::Agent::Reporting::ApplicationDefendAttackSampleStack>]
@@ -59,10 +49,8 @@ module Contrast
59
49
  end
60
50
  end
61
51
 
62
- # @param clazz [Class] Contrast::Api::Dtm::StackTraceElement or
63
- # Contrast::Agent::Reporting::ApplicationDefendAttackSampleStack
64
- # @return [Array<Contrast::Agent::Reporting::ApplicationDefendAttackSampleStack|
65
- # Contrast::Api::Dtm::StackTraceElement>]
52
+ # @param clazz [Class] Contrast::Agent::Reporting::ApplicationDefendAttackSampleStack
53
+ # @return [Array<Contrast::Agent::Reporting::ApplicationDefendAttackSampleStack>]
66
54
  def build_protect_stack clazz
67
55
  stack = caller(3, 21)
68
56
  return [] unless stack
@@ -22,13 +22,6 @@ module Contrast
22
22
  !str.nil? && !str.to_s.empty?
23
23
  end
24
24
 
25
- def protobuf_format data, truncate: true
26
- data = data&.to_s
27
- data = Contrast::Utils::StringUtils.force_utf8(data)
28
- data = Contrast::Utils::StringUtils.truncate(data) if truncate
29
- data
30
- end
31
-
32
25
  # Protobuf has a very strict typing. Nil is not a String and will throw
33
26
  # an exception if you try to set it. Use this to be safe.
34
27
  # Uses the object share to avoid creating several new strings per request
@@ -93,6 +86,16 @@ module Contrast
93
86
  @_normalized_keys[str] = cut
94
87
  end
95
88
  end
89
+
90
+ # transform string from snake_case to Capitalized Text
91
+ #
92
+ # @param str[String] string to transform
93
+ # @return [String]
94
+ def transform_string str
95
+ return unless str
96
+
97
+ str.split('-').map(&:capitalize).join(' ')
98
+ end
96
99
  end
97
100
  end
98
101
  end
@@ -97,8 +97,7 @@ module Contrast
97
97
  # @param event [Contrast::Agent::Telemetry::Event, Array<Contrast::Agent::Telemetry::TelemetryException::Event>]
98
98
  # @return [String] - JSON
99
99
  def get_event_json event
100
- hsh = [event.to_controlled_hash]
101
- hsh.to_json
100
+ Array(event.to_controlled_hash).to_json
102
101
  rescue Exception => e # rubocop:disable Lint/RescueException
103
102
  logger.error('Unable to convert TelemetryEvent to JSON string', e, hsh)
104
103
  raise(e)
@@ -22,6 +22,22 @@ module Contrast
22
22
  def self.now_ms
23
23
  (Time.now.to_f * 1000).to_i
24
24
  end
25
+
26
+ # Return current time in iso8601 format.
27
+ #
28
+ # @return[String]
29
+ def self.time_now
30
+ Time.now.utc.iso8601(7)
31
+ end
32
+
33
+ # Converts time given in ms format form TS to HttpDate.
34
+ # Returns time format for If-Modified-Since: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
35
+ # Note: The Time class treats GMT (Greenwich Mean Time) and UTC (Coordinated Universal Time) as equivalent.
36
+ #
37
+ # @param time [Integer] time in ms.
38
+ def self.ms_to_httpdate time
39
+ Time.at(time / 1000).httpdate unless time.nil?
40
+ end
25
41
  end
26
42
  end
27
43
  end
data/lib/contrast.rb CHANGED
@@ -55,18 +55,18 @@ end
55
55
 
56
56
  require 'contrast/components/assess'
57
57
  require 'contrast/components/config'
58
- require 'contrast/components/contrast_service'
59
58
  require 'contrast/components/logger'
60
59
  require 'contrast/components/protect'
61
60
  require 'contrast/components/sampling'
62
61
  require 'contrast/components/scope'
63
62
  require 'contrast/components/settings'
63
+ require 'contrast/utils/routes_sent'
64
64
  require 'contrast/utils/telemetry_hash'
65
65
  require 'contrast/utils/telemetry'
66
66
  require 'contrast/agent/telemetry/events/exceptions/telemetry_exception_event'
67
- require 'protobuf' # TODO: RUBY-1438
67
+ require 'contrast/agent_lib/interface'
68
68
 
69
- module Contrast
69
+ module Contrast # :nodoc:
70
70
  CONFIG = Contrast::Components::Config::Interface.new
71
71
  SCOPE = Contrast::Components::Scope::Interface.new
72
72
  API = CONFIG.api
@@ -76,12 +76,13 @@ module Contrast
76
76
  INVENTORY = CONFIG.inventory
77
77
  AGENT = CONFIG.agent
78
78
  LOGGER = AGENT.logger
79
- CONTRAST_SERVICE = Contrast::Components::ContrastService::Interface.new
79
+ AGENT_LIB = Contrast::AgentLib::Interface.new
80
80
  APP_CONTEXT = CONFIG.application
81
81
  end
82
82
 
83
83
  module Contrast
84
84
  TELEMETRY_EXCEPTIONS = (Contrast::Utils::TelemetryHash.new if Contrast::Utils::Telemetry.exceptions_enabled?)
85
+ ROUTES_SENT = Contrast::Utils::RoutesSent.new
85
86
  end
86
87
 
87
88
  # This needs to be required very early, after component interfaces, and before instrumentation attempts
@@ -251,8 +251,7 @@
251
251
  }
252
252
  }
253
253
  ]
254
- },
255
- {
254
+ }, {
256
255
  "name": "sql-injection",
257
256
  "applicator": "Contrast::Agent::Protect::Policy::AppliesSqliRule",
258
257
  "applicator_method": "apply_rule",
data/ruby-agent.gemspec CHANGED
@@ -101,7 +101,11 @@ end
101
101
 
102
102
  # Dependencies not mocked out during RSpec that we test real code of, beyond just frameworks.
103
103
  def self.add_tested_gems spec
104
- spec.add_development_dependency 'async'
104
+ if RUBY_VERSION < '3.0.0'
105
+ spec.add_development_dependency 'async', '~> 1.30.3'
106
+ else
107
+ spec.add_development_dependency 'async'
108
+ end
105
109
  spec.add_development_dependency 'execjs'
106
110
  spec.add_development_dependency 'rhino'
107
111
  spec.add_development_dependency 'sqlite3'
@@ -117,7 +121,8 @@ end
117
121
  def self.add_dependencies spec
118
122
  spec.add_dependency 'ougai', '>= 1.8', '< 3.0.0'
119
123
  spec.add_dependency 'rack', '~> 2.0'
120
- spec.add_dependency 'activesupport', '>= 3.2' # TODO: RUBY-1438 remove w/ protobuf code
124
+ spec.add_dependency 'contrast-agent-lib', '~> 0.1.0'
125
+ spec.add_dependency 'ffi', '~> 1.0'
121
126
  end
122
127
 
123
128
  # Enumerate the files required to build the Agent.
@@ -136,9 +141,6 @@ def self.add_files spec
136
141
  f.match(/(.*\.ya?ml)/)
137
142
  end
138
143
 
139
- spec.files << 'lib/contrast/api/dtm.pb.rb'
140
- spec.files << 'lib/contrast/api/settings.pb.rb'
141
- spec.files += Dir['service_executables/**/*']
142
144
  spec.files += Dir['funchook/**/*']
143
145
  spec.files += Dir['shared_libraries/**/*']
144
146
 
@@ -179,7 +181,6 @@ Gem::Specification.new do |spec|
179
181
  spec.required_ruby_version = ['>= 2.7.0', '< 3.2.0']
180
182
 
181
183
  spec.bindir = 'exe'
182
- spec.executables = ['contrast_service']
183
184
  # Keep cs__common first, it handles funchook.h right now.
184
185
  spec.extensions = Dir['ext/cs__common/extconf.rb', 'ext/**/extconf.rb']
185
186
  spec.require_paths = ['lib']
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: 6.7.0
4
+ version: 6.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - galen.palmer@contrastsecurity.com
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: exe
15
15
  cert_chain: []
16
- date: 2022-08-31 00:00:00.000000000 Z
16
+ date: 2022-10-07 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: bundler
@@ -305,16 +305,16 @@ dependencies:
305
305
  name: async
306
306
  requirement: !ruby/object:Gem::Requirement
307
307
  requirements:
308
- - - ">="
308
+ - - "~>"
309
309
  - !ruby/object:Gem::Version
310
- version: '0'
310
+ version: 1.30.3
311
311
  type: :development
312
312
  prerelease: false
313
313
  version_requirements: !ruby/object:Gem::Requirement
314
314
  requirements:
315
- - - ">="
315
+ - - "~>"
316
316
  - !ruby/object:Gem::Version
317
- version: '0'
317
+ version: 1.30.3
318
318
  - !ruby/object:Gem::Dependency
319
319
  name: execjs
320
320
  requirement: !ruby/object:Gem::Requirement
@@ -644,43 +644,56 @@ dependencies:
644
644
  - !ruby/object:Gem::Version
645
645
  version: '2.0'
646
646
  - !ruby/object:Gem::Dependency
647
- name: activesupport
647
+ name: contrast-agent-lib
648
648
  requirement: !ruby/object:Gem::Requirement
649
649
  requirements:
650
- - - ">="
650
+ - - "~>"
651
651
  - !ruby/object:Gem::Version
652
- version: '3.2'
652
+ version: 0.1.0
653
653
  type: :runtime
654
654
  prerelease: false
655
655
  version_requirements: !ruby/object:Gem::Requirement
656
656
  requirements:
657
- - - ">="
657
+ - - "~>"
658
+ - !ruby/object:Gem::Version
659
+ version: 0.1.0
660
+ - !ruby/object:Gem::Dependency
661
+ name: ffi
662
+ requirement: !ruby/object:Gem::Requirement
663
+ requirements:
664
+ - - "~>"
665
+ - !ruby/object:Gem::Version
666
+ version: '1.0'
667
+ type: :runtime
668
+ prerelease: false
669
+ version_requirements: !ruby/object:Gem::Requirement
670
+ requirements:
671
+ - - "~>"
658
672
  - !ruby/object:Gem::Version
659
- version: '3.2'
673
+ version: '1.0'
660
674
  description: This gem instantiates a Rack middleware for rack-based web applications
661
675
  in order to provide Interactive Application Security Testing and Protection.
662
676
  email:
663
677
  - ruby@contrastsecurity.com
664
- executables:
665
- - contrast_service
678
+ executables: []
666
679
  extensions:
667
680
  - ext/cs__common/extconf.rb
668
- - ext/cs__assess_hash/extconf.rb
669
- - ext/cs__assess_basic_object/extconf.rb
670
- - ext/cs__assess_string/extconf.rb
681
+ - ext/cs__assess_module/extconf.rb
682
+ - ext/cs__assess_marshal_module/extconf.rb
683
+ - ext/cs__assess_array/extconf.rb
684
+ - ext/cs__os_information/extconf.rb
685
+ - ext/cs__assess_string_interpolation/extconf.rb
671
686
  - ext/cs__assess_regexp/extconf.rb
687
+ - ext/cs__assess_string/extconf.rb
688
+ - ext/cs__assess_hash/extconf.rb
672
689
  - ext/cs__assess_yield_track/extconf.rb
673
- - ext/cs__assess_string_interpolation/extconf.rb
674
- - ext/cs__scope/extconf.rb
675
690
  - ext/cs__contrast_patch/extconf.rb
676
- - ext/cs__assess_module/extconf.rb
677
691
  - ext/cs__assess_kernel/extconf.rb
678
- - ext/cs__assess_marshal_module/extconf.rb
679
692
  - ext/cs__assess_test/extconf.rb
680
- - ext/cs__os_information/extconf.rb
681
- - ext/cs__assess_array/extconf.rb
682
- - ext/cs__tests/extconf.rb
693
+ - ext/cs__scope/extconf.rb
683
694
  - ext/cs__assess_fiber_track/extconf.rb
695
+ - ext/cs__tests/extconf.rb
696
+ - ext/cs__assess_basic_object/extconf.rb
684
697
  extra_rdoc_files: []
685
698
  files:
686
699
  - ".clang-format"
@@ -694,7 +707,6 @@ files:
694
707
  - Gemfile
695
708
  - LICENSE.txt
696
709
  - Rakefile
697
- - exe/contrast_service
698
710
  - ext/build_funchook.rb
699
711
  - ext/cs__assess_array/cs__assess_array.c
700
712
  - ext/cs__assess_array/cs__assess_array.h
@@ -883,11 +895,8 @@ files:
883
895
  - lib/contrast.rb
884
896
  - lib/contrast/agent.rb
885
897
  - lib/contrast/agent/assess.rb
886
- - lib/contrast/agent/assess/contrast_event.rb
887
898
  - lib/contrast/agent/assess/contrast_object.rb
888
899
  - lib/contrast/agent/assess/events/event_data.rb
889
- - lib/contrast/agent/assess/events/event_factory.rb
890
- - lib/contrast/agent/assess/events/source_event.rb
891
900
  - lib/contrast/agent/assess/finalizers/freeze.rb
892
901
  - lib/contrast/agent/assess/finalizers/hash.rb
893
902
  - lib/contrast/agent/assess/policy/dynamic_source_factory.rb
@@ -985,6 +994,7 @@ files:
985
994
  - lib/contrast/agent/patching/policy/trigger_node.rb
986
995
  - lib/contrast/agent/protect/exploitable_collection.rb
987
996
  - lib/contrast/agent/protect/input_analyzer/input_analyzer.rb
997
+ - lib/contrast/agent/protect/input_analyzer/worth_watching_analyzer.rb
988
998
  - lib/contrast/agent/protect/policy/applies_command_injection_rule.rb
989
999
  - lib/contrast/agent/protect/policy/applies_deserialization_rule.rb
990
1000
  - lib/contrast/agent/protect/policy/applies_no_sqli_rule.rb
@@ -997,11 +1007,14 @@ files:
997
1007
  - lib/contrast/agent/protect/rule.rb
998
1008
  - lib/contrast/agent/protect/rule/base.rb
999
1009
  - lib/contrast/agent/protect/rule/base_service.rb
1010
+ - lib/contrast/agent/protect/rule/bot_blocker.rb
1011
+ - lib/contrast/agent/protect/rule/bot_blocker/bot_blocker_input_classification.rb
1000
1012
  - lib/contrast/agent/protect/rule/cmd_injection.rb
1001
1013
  - lib/contrast/agent/protect/rule/cmdi/cmdi_backdoors.rb
1002
1014
  - lib/contrast/agent/protect/rule/cmdi/cmdi_base_rule.rb
1015
+ - lib/contrast/agent/protect/rule/cmdi/cmdi_chained_command.rb
1016
+ - lib/contrast/agent/protect/rule/cmdi/cmdi_dangerous_path.rb
1003
1017
  - lib/contrast/agent/protect/rule/cmdi/cmdi_input_classification.rb
1004
- - lib/contrast/agent/protect/rule/cmdi/cmdi_worth_watching.rb
1005
1018
  - lib/contrast/agent/protect/rule/default_scanner.rb
1006
1019
  - lib/contrast/agent/protect/rule/deserialization.rb
1007
1020
  - lib/contrast/agent/protect/rule/http_method_tampering.rb
@@ -1010,6 +1023,8 @@ files:
1010
1023
  - lib/contrast/agent/protect/rule/no_sqli/mongo_no_sql_scanner.rb
1011
1024
  - lib/contrast/agent/protect/rule/no_sqli/no_sqli_input_classification.rb
1012
1025
  - lib/contrast/agent/protect/rule/path_traversal.rb
1026
+ - lib/contrast/agent/protect/rule/path_traversal/path_traversal_input_classification.rb
1027
+ - lib/contrast/agent/protect/rule/path_traversal/path_traversal_semantic_security_bypass.rb
1013
1028
  - lib/contrast/agent/protect/rule/sql_sample_builder.rb
1014
1029
  - lib/contrast/agent/protect/rule/sqli.rb
1015
1030
  - lib/contrast/agent/protect/rule/sqli/default_sql_scanner.rb
@@ -1018,15 +1033,13 @@ files:
1018
1033
  - lib/contrast/agent/protect/rule/sqli/sqli_base_rule.rb
1019
1034
  - lib/contrast/agent/protect/rule/sqli/sqli_input_classification.rb
1020
1035
  - lib/contrast/agent/protect/rule/sqli/sqli_semantic/sqli_dangerous_functions.rb
1021
- - lib/contrast/agent/protect/rule/sqli/sqli_worth_watching.rb
1022
1036
  - lib/contrast/agent/protect/rule/sqli/sqlite_sql_scanner.rb
1023
1037
  - lib/contrast/agent/protect/rule/unsafe_file_upload.rb
1024
1038
  - lib/contrast/agent/protect/rule/unsafe_file_upload/unsafe_file_upload_input_classification.rb
1025
- - lib/contrast/agent/protect/rule/unsafe_file_upload/unsafe_file_upload_matcher.rb
1026
1039
  - lib/contrast/agent/protect/rule/xss.rb
1040
+ - lib/contrast/agent/protect/rule/xss/reflected_xss_input_classification.rb
1027
1041
  - lib/contrast/agent/protect/rule/xxe.rb
1028
1042
  - lib/contrast/agent/protect/rule/xxe/entity_wrapper.rb
1029
- - lib/contrast/agent/reaction_processor.rb
1030
1043
  - lib/contrast/agent/reporting/attack_result/attack_result.rb
1031
1044
  - lib/contrast/agent/reporting/attack_result/rasp_rule_sample.rb
1032
1045
  - lib/contrast/agent/reporting/attack_result/response_type.rb
@@ -1049,6 +1062,8 @@ files:
1049
1062
  - lib/contrast/agent/reporting/details/xxe_details.rb
1050
1063
  - lib/contrast/agent/reporting/details/xxe_match.rb
1051
1064
  - lib/contrast/agent/reporting/details/xxe_wrapper.rb
1065
+ - lib/contrast/agent/reporting/input_analysis/details/bot_blocker_details.rb
1066
+ - lib/contrast/agent/reporting/input_analysis/details/protect_rule_details.rb
1052
1067
  - lib/contrast/agent/reporting/input_analysis/input_analysis.rb
1053
1068
  - lib/contrast/agent/reporting/input_analysis/input_analysis_result.rb
1054
1069
  - lib/contrast/agent/reporting/input_analysis/input_type.rb
@@ -1096,8 +1111,8 @@ files:
1096
1111
  - lib/contrast/agent/reporting/reporting_events/route_coverage.rb
1097
1112
  - lib/contrast/agent/reporting/reporting_events/route_discovery.rb
1098
1113
  - lib/contrast/agent/reporting/reporting_events/route_discovery_observation.rb
1099
- - lib/contrast/agent/reporting/reporting_events/server_activity.rb
1100
1114
  - lib/contrast/agent/reporting/reporting_events/server_reporting_event.rb
1115
+ - lib/contrast/agent/reporting/reporting_events/server_settings.rb
1101
1116
  - lib/contrast/agent/reporting/reporting_utilities/audit.rb
1102
1117
  - lib/contrast/agent/reporting/reporting_utilities/build_preflight.rb
1103
1118
  - lib/contrast/agent/reporting/reporting_utilities/endpoints.rb
@@ -1110,6 +1125,7 @@ files:
1110
1125
  - lib/contrast/agent/reporting/reporting_utilities/response_handler.rb
1111
1126
  - lib/contrast/agent/reporting/reporting_utilities/response_handler_mode.rb
1112
1127
  - lib/contrast/agent/reporting/reporting_utilities/response_handler_utils.rb
1128
+ - lib/contrast/agent/reporting/server_settings_worker.rb
1113
1129
  - lib/contrast/agent/reporting/settings/application_settings.rb
1114
1130
  - lib/contrast/agent/reporting/settings/assess.rb
1115
1131
  - lib/contrast/agent/reporting/settings/assess_server_feature.rb
@@ -1128,6 +1144,7 @@ files:
1128
1144
  - lib/contrast/agent/reporting/settings/rule_definition.rb
1129
1145
  - lib/contrast/agent/reporting/settings/sampling.rb
1130
1146
  - lib/contrast/agent/reporting/settings/sanitizer.rb
1147
+ - lib/contrast/agent/reporting/settings/security_logger.rb
1131
1148
  - lib/contrast/agent/reporting/settings/sensitive_data_masking.rb
1132
1149
  - lib/contrast/agent/reporting/settings/sensitive_data_masking_rule.rb
1133
1150
  - lib/contrast/agent/reporting/settings/server_features.rb
@@ -1141,7 +1158,6 @@ files:
1141
1158
  - lib/contrast/agent/response.rb
1142
1159
  - lib/contrast/agent/rule_set.rb
1143
1160
  - lib/contrast/agent/scope.rb
1144
- - lib/contrast/agent/service_heartbeat.rb
1145
1161
  - lib/contrast/agent/static_analysis.rb
1146
1162
  - lib/contrast/agent/telemetry/base.rb
1147
1163
  - lib/contrast/agent/telemetry/events/event.rb
@@ -1159,36 +1175,18 @@ files:
1159
1175
  - lib/contrast/agent/tracepoint_hook.rb
1160
1176
  - lib/contrast/agent/version.rb
1161
1177
  - lib/contrast/agent/worker_thread.rb
1162
- - lib/contrast/api.rb
1178
+ - lib/contrast/agent_lib/api/command_injection.rb
1179
+ - lib/contrast/agent_lib/api/init.rb
1180
+ - lib/contrast/agent_lib/api/input_tracing.rb
1181
+ - lib/contrast/agent_lib/api/method_tempering.rb
1182
+ - lib/contrast/agent_lib/api/panic.rb
1183
+ - lib/contrast/agent_lib/api/path_semantic_file_security_bypass.rb
1184
+ - lib/contrast/agent_lib/interface.rb
1185
+ - lib/contrast/agent_lib/interface_base.rb
1186
+ - lib/contrast/agent_lib/return_types/eval_result.rb
1187
+ - lib/contrast/agent_lib/test.rb
1163
1188
  - lib/contrast/api/.gitkeep
1164
- - lib/contrast/api/communication.rb
1165
1189
  - lib/contrast/api/communication/connection_status.rb
1166
- - lib/contrast/api/communication/messaging_queue.rb
1167
- - lib/contrast/api/communication/response_processor.rb
1168
- - lib/contrast/api/communication/service_lifecycle.rb
1169
- - lib/contrast/api/communication/socket.rb
1170
- - lib/contrast/api/communication/socket_client.rb
1171
- - lib/contrast/api/communication/speedracer.rb
1172
- - lib/contrast/api/communication/tcp_socket.rb
1173
- - lib/contrast/api/communication/unix_socket.rb
1174
- - lib/contrast/api/decorators.rb
1175
- - lib/contrast/api/decorators/address.rb
1176
- - lib/contrast/api/decorators/agent_startup.rb
1177
- - lib/contrast/api/decorators/application_settings.rb
1178
- - lib/contrast/api/decorators/application_startup.rb
1179
- - lib/contrast/api/decorators/bot_blocker.rb
1180
- - lib/contrast/api/decorators/http_request.rb
1181
- - lib/contrast/api/decorators/input_analysis.rb
1182
- - lib/contrast/api/decorators/instrumentation_mode.rb
1183
- - lib/contrast/api/decorators/ip_denylist.rb
1184
- - lib/contrast/api/decorators/message.rb
1185
- - lib/contrast/api/decorators/rasp_rule_sample.rb
1186
- - lib/contrast/api/decorators/response_type.rb
1187
- - lib/contrast/api/decorators/server_features.rb
1188
- - lib/contrast/api/decorators/user_input.rb
1189
- - lib/contrast/api/decorators/virtual_patch.rb
1190
- - lib/contrast/api/dtm.pb.rb
1191
- - lib/contrast/api/settings.pb.rb
1192
1190
  - lib/contrast/components/agent.rb
1193
1191
  - lib/contrast/components/api.rb
1194
1192
  - lib/contrast/components/app_context.rb
@@ -1197,21 +1195,26 @@ files:
1197
1195
  - lib/contrast/components/assess_rules.rb
1198
1196
  - lib/contrast/components/base.rb
1199
1197
  - lib/contrast/components/config.rb
1200
- - lib/contrast/components/contrast_service.rb
1198
+ - lib/contrast/components/config/sources.rb
1201
1199
  - lib/contrast/components/heap_dump.rb
1202
1200
  - lib/contrast/components/inventory.rb
1203
1201
  - lib/contrast/components/logger.rb
1202
+ - lib/contrast/components/polling.rb
1204
1203
  - lib/contrast/components/protect.rb
1205
1204
  - lib/contrast/components/ruby_component.rb
1206
1205
  - lib/contrast/components/sampling.rb
1207
1206
  - lib/contrast/components/scope.rb
1208
1207
  - lib/contrast/components/security_logger.rb
1209
- - lib/contrast/components/service.rb
1210
1208
  - lib/contrast/components/settings.rb
1211
1209
  - lib/contrast/config.rb
1212
1210
  - lib/contrast/config/api_proxy_configuration.rb
1213
1211
  - lib/contrast/config/base_configuration.rb
1214
1212
  - lib/contrast/config/certification_configuration.rb
1213
+ - lib/contrast/config/config.rb
1214
+ - lib/contrast/config/diagnostics.rb
1215
+ - lib/contrast/config/diagnostics_tools.rb
1216
+ - lib/contrast/config/effective_config.rb
1217
+ - lib/contrast/config/effective_config_value.rb
1215
1218
  - lib/contrast/config/env_variables.rb
1216
1219
  - lib/contrast/config/exception_configuration.rb
1217
1220
  - lib/contrast/config/protect_rule_configuration.rb
@@ -1262,7 +1265,6 @@ files:
1262
1265
  - lib/contrast/logger/time.rb
1263
1266
  - lib/contrast/security_exception.rb
1264
1267
  - lib/contrast/tasks/config.rb
1265
- - lib/contrast/tasks/service.rb
1266
1268
  - lib/contrast/utils/assess/event_limit_utils.rb
1267
1269
  - lib/contrast/utils/assess/object_store.rb
1268
1270
  - lib/contrast/utils/assess/propagation_method_utils.rb
@@ -1280,7 +1282,7 @@ files:
1280
1282
  - lib/contrast/utils/hash_digest_extend.rb
1281
1283
  - lib/contrast/utils/head_dump_utils_extend.rb
1282
1284
  - lib/contrast/utils/heap_dump_util.rb
1283
- - lib/contrast/utils/input_classification.rb
1285
+ - lib/contrast/utils/input_classification_base.rb
1284
1286
  - lib/contrast/utils/invalid_configuration_util.rb
1285
1287
  - lib/contrast/utils/io_util.rb
1286
1288
  - lib/contrast/utils/job_servers_running.rb
@@ -1293,9 +1295,11 @@ files:
1293
1295
  - lib/contrast/utils/os.rb
1294
1296
  - lib/contrast/utils/patching/policy/patch_utils.rb
1295
1297
  - lib/contrast/utils/patching/policy/patcher_utils.rb
1298
+ - lib/contrast/utils/reporting/application_activity_batch_utils.rb
1296
1299
  - lib/contrast/utils/request_utils.rb
1297
1300
  - lib/contrast/utils/resource_loader.rb
1298
1301
  - lib/contrast/utils/response_utils.rb
1302
+ - lib/contrast/utils/routes_sent.rb
1299
1303
  - lib/contrast/utils/sha256_builder.rb
1300
1304
  - lib/contrast/utils/stack_trace_utils.rb
1301
1305
  - lib/contrast/utils/string_utils.rb
@@ -1306,77 +1310,12 @@ files:
1306
1310
  - lib/contrast/utils/telemetry_identifier.rb
1307
1311
  - lib/contrast/utils/thread_tracker.rb
1308
1312
  - lib/contrast/utils/timer.rb
1309
- - lib/protobuf.rb
1310
- - lib/protobuf/code_generator.rb
1311
- - lib/protobuf/decoder.rb
1312
- - lib/protobuf/deprecation.rb
1313
- - lib/protobuf/descriptors.rb
1314
- - lib/protobuf/descriptors/google/protobuf/compiler/plugin.pb.rb
1315
- - lib/protobuf/descriptors/google/protobuf/descriptor.pb.rb
1316
- - lib/protobuf/encoder.rb
1317
- - lib/protobuf/enum.rb
1318
- - lib/protobuf/exceptions.rb
1319
- - lib/protobuf/field.rb
1320
- - lib/protobuf/field/base_field.rb
1321
- - lib/protobuf/field/base_field_object_definitions.rb
1322
- - lib/protobuf/field/bool_field.rb
1323
- - lib/protobuf/field/bytes_field.rb
1324
- - lib/protobuf/field/double_field.rb
1325
- - lib/protobuf/field/enum_field.rb
1326
- - lib/protobuf/field/field_array.rb
1327
- - lib/protobuf/field/field_hash.rb
1328
- - lib/protobuf/field/fixed32_field.rb
1329
- - lib/protobuf/field/fixed64_field.rb
1330
- - lib/protobuf/field/float_field.rb
1331
- - lib/protobuf/field/int32_field.rb
1332
- - lib/protobuf/field/int64_field.rb
1333
- - lib/protobuf/field/integer_field.rb
1334
- - lib/protobuf/field/message_field.rb
1335
- - lib/protobuf/field/sfixed32_field.rb
1336
- - lib/protobuf/field/sfixed64_field.rb
1337
- - lib/protobuf/field/signed_integer_field.rb
1338
- - lib/protobuf/field/sint32_field.rb
1339
- - lib/protobuf/field/sint64_field.rb
1340
- - lib/protobuf/field/string_field.rb
1341
- - lib/protobuf/field/uint32_field.rb
1342
- - lib/protobuf/field/uint64_field.rb
1343
- - lib/protobuf/field/varint_field.rb
1344
- - lib/protobuf/generators/base.rb
1345
- - lib/protobuf/generators/enum_generator.rb
1346
- - lib/protobuf/generators/extension_generator.rb
1347
- - lib/protobuf/generators/field_generator.rb
1348
- - lib/protobuf/generators/file_generator.rb
1349
- - lib/protobuf/generators/group_generator.rb
1350
- - lib/protobuf/generators/message_generator.rb
1351
- - lib/protobuf/generators/option_generator.rb
1352
- - lib/protobuf/generators/printable.rb
1353
- - lib/protobuf/generators/service_generator.rb
1354
- - lib/protobuf/lifecycle.rb
1355
- - lib/protobuf/logging.rb
1356
- - lib/protobuf/message.rb
1357
- - lib/protobuf/message/fields.rb
1358
- - lib/protobuf/message/serialization.rb
1359
- - lib/protobuf/optionable.rb
1360
- - lib/protobuf/tasks.rb
1361
- - lib/protobuf/tasks/compile.rake
1362
- - lib/protobuf/varint.rb
1363
- - lib/protobuf/varint_pure.rb
1364
- - lib/protobuf/version.rb
1365
- - lib/protobuf/wire_type.rb
1366
- - proto/dynamic_discovery.proto
1367
- - proto/google/protobuf/compiler/plugin.proto
1368
- - proto/google/protobuf/descriptor.proto
1369
- - proto/rpc.proto
1370
1313
  - resources/assess/policy.json
1371
1314
  - resources/deadzone/policy.json
1372
1315
  - resources/inventory/policy.json
1373
1316
  - resources/protect/policy.json
1374
1317
  - resources/test_marker.txt
1375
1318
  - ruby-agent.gemspec
1376
- - service_executables/.gitkeep
1377
- - service_executables/VERSION
1378
- - service_executables/linux/contrast-service
1379
- - service_executables/mac/contrast-service
1380
1319
  - shared_libraries/.gitkeep
1381
1320
  - sonar-project.properties
1382
1321
  homepage: https://www.contrastsecurity.com