contrast-agent 6.8.0 → 6.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (154) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/lib/contrast/agent/assess/policy/trigger_method.rb +1 -1
  4. data/lib/contrast/agent/assess/property/evented.rb +11 -11
  5. data/lib/contrast/agent/assess/rule/response/body_rule.rb +1 -1
  6. data/lib/contrast/agent/assess.rb +0 -1
  7. data/lib/contrast/agent/excluder.rb +1 -1
  8. data/lib/contrast/agent/middleware.rb +12 -4
  9. data/lib/contrast/agent/protect/input_analyzer/input_analyzer.rb +76 -83
  10. data/lib/contrast/agent/protect/input_analyzer/worth_watching_analyzer.rb +121 -0
  11. data/lib/contrast/agent/protect/policy/applies_command_injection_rule.rb +2 -0
  12. data/lib/contrast/agent/protect/policy/applies_no_sqli_rule.rb +6 -3
  13. data/lib/contrast/agent/protect/policy/applies_path_traversal_rule.rb +3 -0
  14. data/lib/contrast/agent/protect/policy/applies_sqli_rule.rb +3 -0
  15. data/lib/contrast/agent/protect/policy/rule_applicator.rb +12 -0
  16. data/lib/contrast/agent/protect/rule/base.rb +21 -7
  17. data/lib/contrast/agent/protect/rule/base_service.rb +6 -0
  18. data/lib/contrast/agent/protect/rule/bot_blocker/bot_blocker_input_classification.rb +1 -1
  19. data/lib/contrast/agent/protect/rule/bot_blocker.rb +9 -1
  20. data/lib/contrast/agent/protect/rule/cmd_injection.rb +8 -7
  21. data/lib/contrast/agent/protect/rule/cmdi/cmdi_base_rule.rb +8 -0
  22. data/lib/contrast/agent/protect/rule/cmdi/cmdi_chained_command.rb +0 -5
  23. data/lib/contrast/agent/protect/rule/cmdi/cmdi_dangerous_path.rb +0 -5
  24. data/lib/contrast/agent/protect/rule/deserialization.rb +2 -2
  25. data/lib/contrast/agent/protect/rule/no_sqli.rb +24 -2
  26. data/lib/contrast/agent/protect/rule/path_traversal/path_traversal_input_classification.rb +1 -1
  27. data/lib/contrast/agent/protect/rule/path_traversal.rb +12 -3
  28. data/lib/contrast/agent/protect/rule/sqli/sqli_input_classification.rb +0 -1
  29. data/lib/contrast/agent/protect/rule/sqli.rb +10 -13
  30. data/lib/contrast/agent/protect/rule/unsafe_file_upload/unsafe_file_upload_input_classification.rb +6 -2
  31. data/lib/contrast/agent/protect/rule/unsafe_file_upload.rb +20 -0
  32. data/lib/contrast/agent/protect/rule/xss/reflected_xss_input_classification.rb +1 -1
  33. data/lib/contrast/agent/protect/rule/xss.rb +9 -0
  34. data/lib/contrast/agent/protect/rule/xxe.rb +2 -2
  35. data/lib/contrast/agent/protect/rule.rb +0 -3
  36. data/lib/contrast/agent/reporting/attack_result/rasp_rule_sample.rb +1 -1
  37. data/lib/contrast/agent/reporting/attack_result/user_input.rb +0 -1
  38. data/lib/contrast/agent/reporting/details/details.rb +0 -1
  39. data/lib/contrast/agent/reporting/input_analysis/input_analysis.rb +12 -0
  40. data/lib/contrast/agent/reporting/report.rb +2 -0
  41. data/lib/contrast/agent/reporting/reporter.rb +42 -7
  42. data/lib/contrast/agent/reporting/reporting_events/application_activity.rb +5 -6
  43. data/lib/contrast/agent/reporting/reporting_events/application_defend_activity.rb +24 -7
  44. data/lib/contrast/agent/reporting/reporting_events/application_defend_attack_activity.rb +20 -5
  45. data/lib/contrast/agent/reporting/reporting_events/application_defend_attack_sample.rb +0 -1
  46. data/lib/contrast/agent/reporting/reporting_events/application_defend_attack_sample_activity.rb +5 -0
  47. data/lib/contrast/agent/reporting/reporting_events/application_defend_attacker_activity.rb +10 -1
  48. data/lib/contrast/agent/reporting/reporting_events/application_inventory.rb +2 -1
  49. data/lib/contrast/agent/reporting/reporting_events/application_inventory_activity.rb +6 -1
  50. data/lib/contrast/agent/reporting/reporting_events/application_reporting_event.rb +10 -0
  51. data/lib/contrast/agent/reporting/reporting_events/application_settings.rb +40 -0
  52. data/lib/contrast/agent/reporting/reporting_events/finding.rb +2 -2
  53. data/lib/contrast/agent/reporting/reporting_events/finding_event.rb +239 -93
  54. data/lib/contrast/agent/reporting/reporting_events/finding_event_signature.rb +10 -23
  55. data/lib/contrast/agent/reporting/reporting_events/finding_event_source.rb +10 -9
  56. data/lib/contrast/agent/reporting/reporting_events/observed_route.rb +12 -0
  57. data/lib/contrast/agent/reporting/reporting_events/server_reporting_event.rb +8 -0
  58. data/lib/contrast/agent/reporting/reporting_events/server_settings.rb +40 -0
  59. data/lib/contrast/agent/reporting/reporting_utilities/endpoints.rb +6 -0
  60. data/lib/contrast/agent/reporting/reporting_utilities/ng_response_extractor.rb +137 -0
  61. data/lib/contrast/agent/reporting/reporting_utilities/reporter_client.rb +52 -2
  62. data/lib/contrast/agent/reporting/reporting_utilities/reporter_client_utils.rb +8 -4
  63. data/lib/contrast/agent/reporting/reporting_utilities/response_extractor.rb +105 -58
  64. data/lib/contrast/agent/reporting/reporting_utilities/response_handler.rb +9 -7
  65. data/lib/contrast/agent/reporting/reporting_utilities/response_handler_utils.rb +143 -49
  66. data/lib/contrast/agent/reporting/reporting_workers/application_server_worker.rb +46 -0
  67. data/lib/contrast/agent/reporting/reporting_workers/reporter_heartbeat.rb +51 -0
  68. data/lib/contrast/agent/reporting/reporting_workers/reporting_workers.rb +14 -0
  69. data/lib/contrast/agent/reporting/reporting_workers/server_settings_worker.rb +46 -0
  70. data/lib/contrast/agent/reporting/settings/assess.rb +14 -1
  71. data/lib/contrast/agent/reporting/settings/assess_rule.rb +18 -0
  72. data/lib/contrast/agent/reporting/settings/assess_server_feature.rb +14 -2
  73. data/lib/contrast/agent/reporting/settings/helpers.rb +9 -0
  74. data/lib/contrast/agent/reporting/settings/protect.rb +17 -12
  75. data/lib/contrast/agent/reporting/settings/protect_rule.rb +18 -0
  76. data/lib/contrast/agent/reporting/settings/protect_server_feature.rb +40 -3
  77. data/lib/contrast/agent/reporting/settings/rule_definition.rb +3 -0
  78. data/lib/contrast/agent/reporting/settings/security_logger.rb +77 -0
  79. data/lib/contrast/agent/reporting/settings/sensitive_data_masking.rb +1 -1
  80. data/lib/contrast/agent/reporting/settings/server_features.rb +9 -0
  81. data/lib/contrast/agent/reporting/settings/syslog.rb +34 -5
  82. data/lib/contrast/agent/reporting/settings/virtual_patch.rb +56 -0
  83. data/lib/contrast/agent/reporting/settings/virtual_patch_condition.rb +47 -0
  84. data/lib/contrast/agent/request.rb +1 -0
  85. data/lib/contrast/agent/request_context_extend.rb +20 -0
  86. data/lib/contrast/agent/request_handler.rb +5 -10
  87. data/lib/contrast/agent/telemetry/base.rb +11 -10
  88. data/lib/contrast/agent/telemetry/events/exceptions/obfuscate.rb +108 -103
  89. data/lib/contrast/agent/telemetry/events/exceptions/telemetry_exception_event.rb +1 -1
  90. data/lib/contrast/agent/telemetry/events/startup_metrics_event.rb +1 -1
  91. data/lib/contrast/agent/thread_watcher.rb +46 -6
  92. data/lib/contrast/agent/version.rb +1 -1
  93. data/lib/contrast/agent.rb +18 -0
  94. data/lib/contrast/agent_lib/api/init.rb +1 -7
  95. data/lib/contrast/agent_lib/api/input_tracing.rb +2 -4
  96. data/lib/contrast/agent_lib/interface.rb +1 -16
  97. data/lib/contrast/agent_lib/interface_base.rb +52 -39
  98. data/lib/contrast/agent_lib/return_types/eval_result.rb +2 -2
  99. data/lib/contrast/api/communication/connection_status.rb +15 -0
  100. data/lib/contrast/components/agent.rb +34 -0
  101. data/lib/contrast/components/api.rb +23 -0
  102. data/lib/contrast/components/app_context.rb +23 -3
  103. data/lib/contrast/components/assess.rb +60 -8
  104. data/lib/contrast/components/assess_rules.rb +18 -0
  105. data/lib/contrast/components/base.rb +40 -0
  106. data/lib/contrast/components/config/sources.rb +95 -0
  107. data/lib/contrast/components/config.rb +18 -1
  108. data/lib/contrast/components/heap_dump.rb +10 -0
  109. data/lib/contrast/components/inventory.rb +15 -2
  110. data/lib/contrast/components/logger.rb +18 -0
  111. data/lib/contrast/components/polling.rb +39 -0
  112. data/lib/contrast/components/protect.rb +48 -1
  113. data/lib/contrast/components/ruby_component.rb +15 -0
  114. data/lib/contrast/components/sampling.rb +70 -13
  115. data/lib/contrast/components/security_logger.rb +13 -0
  116. data/lib/contrast/components/settings.rb +120 -10
  117. data/lib/contrast/config/certification_configuration.rb +14 -0
  118. data/lib/contrast/config/config.rb +46 -0
  119. data/lib/contrast/config/diagnostics.rb +114 -0
  120. data/lib/contrast/config/diagnostics_tools.rb +98 -0
  121. data/lib/contrast/config/effective_config.rb +65 -0
  122. data/lib/contrast/config/effective_config_value.rb +32 -0
  123. data/lib/contrast/config/exception_configuration.rb +12 -0
  124. data/lib/contrast/config/protect_rule_configuration.rb +2 -2
  125. data/lib/contrast/config/protect_rules_configuration.rb +7 -6
  126. data/lib/contrast/config/request_audit_configuration.rb +13 -0
  127. data/lib/contrast/config/server_configuration.rb +41 -2
  128. data/lib/contrast/configuration.rb +28 -2
  129. data/lib/contrast/extension/assess/array.rb +3 -3
  130. data/lib/contrast/extension/assess/erb.rb +1 -1
  131. data/lib/contrast/extension/assess/regexp.rb +2 -2
  132. data/lib/contrast/logger/aliased_logging.rb +48 -15
  133. data/lib/contrast/utils/assess/event_limit_utils.rb +31 -9
  134. data/lib/contrast/utils/assess/trigger_method_utils.rb +5 -4
  135. data/lib/contrast/utils/hash_digest.rb +2 -2
  136. data/lib/contrast/utils/input_classification_base.rb +21 -5
  137. data/lib/contrast/utils/reporting/application_activity_batch_utils.rb +81 -0
  138. data/lib/contrast/utils/routes_sent.rb +60 -0
  139. data/lib/contrast/utils/telemetry.rb +1 -1
  140. data/lib/contrast/utils/telemetry_client.rb +2 -3
  141. data/lib/contrast/utils/timer.rb +16 -0
  142. data/lib/contrast.rb +3 -1
  143. data/resources/protect/policy.json +8 -0
  144. data/ruby-agent.gemspec +6 -2
  145. metadata +43 -24
  146. data/lib/contrast/agent/assess/contrast_event.rb +0 -157
  147. data/lib/contrast/agent/assess/events/event_factory.rb +0 -34
  148. data/lib/contrast/agent/assess/events/source_event.rb +0 -46
  149. data/lib/contrast/agent/protect/rule/http_method_tampering/http_method_tampering_input_classification.rb +0 -96
  150. data/lib/contrast/agent/protect/rule/http_method_tampering.rb +0 -83
  151. data/lib/contrast/agent/reporting/details/http_method_tempering_details.rb +0 -27
  152. data/lib/contrast/agent/reporting/reporter_heartbeat.rb +0 -53
  153. data/lib/contrast/agent/reporting/reporting_events/server_activity.rb +0 -36
  154. data/lib/contrast/agent_lib/api/method_tempering.rb +0 -29
@@ -13,33 +13,50 @@ module Contrast
13
13
  # @return [Array<Contrast::Agent::Reporting::ApplicationDefendAttackerActivity>]
14
14
  attr_reader :attackers
15
15
 
16
+ # @return [Boolean]
17
+ attr_reader :existing_attacker_activity
18
+
16
19
  def initialize
17
20
  @attackers = []
21
+ @existing_attacker_activity = false
18
22
  @event_type = :application_defend_activity
19
23
  end
20
24
 
21
25
  def to_controlled_hash
26
+ validate
22
27
  {
23
28
  attackers: attackers.map(&:to_controlled_hash)
24
29
  }
25
30
  end
26
31
 
32
+ def validate
33
+ raise(ArgumentError, 'Attackers data must be populated') if existing_attacker_activity && attackers.empty?
34
+ end
35
+
27
36
  # @param attack_result [Contrast::Agent::Reporting::AttackResult]
28
37
  def attach_data attack_result
38
+ return unless attack_result&.cs__is_a?(Contrast::Agent::Reporting::AttackResult)
39
+
29
40
  attacker_activity = Contrast::Agent::Reporting::ApplicationDefendAttackerActivity.new
30
41
  attacker_activity.attach_data(attack_result)
31
- existing_attacker_activity = attackers.find do |existing|
32
- existing.source_forwarded_for == attacker_activity.source_forwarded_for &&
33
- existing.source_ip == attacker_activity.source_ip
34
- end
35
- rule = attack_result.rule_id
36
- if existing_attacker_activity
37
- attach_existing(existing_attacker_activity, attacker_activity, rule)
42
+
43
+ @existing_attacker_activity = true
44
+ if (existing_attacker_activity = find_existing_attacker_activity(attacker_activity))
45
+ attach_existing(existing_attacker_activity, attacker_activity, attack_result.rule_id)
38
46
  else
39
47
  attackers << attacker_activity
40
48
  end
41
49
  end
42
50
 
51
+ # Find an existing attacker if it matches on source details
52
+ # @param new_attacker_activity [Contrast::Agent::Reporting::ApplicationDefendAttackerActivity]
53
+ def find_existing_attacker_activity new_attacker_activity
54
+ attackers.find do |existing|
55
+ existing.source_forwarded_for == new_attacker_activity.source_forwarded_for &&
56
+ existing.source_ip == new_attacker_activity.source_ip
57
+ end
58
+ end
59
+
43
60
  # @param existing_attacker_activity [Contrast::Agent::Reporting::ApplicationDefendAttackerActivity]
44
61
  # @param attacker_activity [Contrast::Agent::Reporting::ApplicationDefendAttackerActivity]
45
62
  # @param rule [String]
@@ -9,6 +9,7 @@ module Contrast
9
9
  module Reporting
10
10
  # This is the new ApplicationDefendAttackActivity class which will include the attacks sent by the source.
11
11
  class ApplicationDefendAttackActivity
12
+ include Contrast::Components::Logger::InstanceMethods
12
13
  # @return [Contrast::Agent::Reporting::ApplicationDefendAttackSampleActivity]
13
14
  attr_accessor :blocked
14
15
  # @return [Contrast::Agent::Reporting::ApplicationDefendAttackSampleActivity]
@@ -27,15 +28,29 @@ module Contrast
27
28
  end
28
29
 
29
30
  def to_controlled_hash
31
+ blocked_hash = blocked&.to_controlled_hash || Contrast::Utils::ObjectShare::EMPTY_HASH
32
+ exploited_hash = exploited&.to_controlled_hash || Contrast::Utils::ObjectShare::EMPTY_HASH
33
+ ineffective_hash = ineffective&.to_controlled_hash || Contrast::Utils::ObjectShare::EMPTY_HASH
34
+ suspicious_hash = suspicious&.to_controlled_hash || Contrast::Utils::ObjectShare::EMPTY_HASH
35
+ validate(blocked_hash, exploited_hash, ineffective_hash, suspicious_hash)
36
+
30
37
  {
31
38
  startTime: @start_time,
32
- blocked: @blocked&.to_controlled_hash || Contrast::Utils::ObjectShare::EMPTY_HASH,
33
- exploited: @exploited&.to_controlled_hash || Contrast::Utils::ObjectShare::EMPTY_HASH,
34
- ineffective: @ineffective&.to_controlled_hash || Contrast::Utils::ObjectShare::EMPTY_HASH,
35
- suspicious: @suspicious&.to_controlled_hash || Contrast::Utils::ObjectShare::EMPTY_HASH
39
+ blocked: blocked_hash,
40
+ exploited: exploited_hash,
41
+ ineffective: ineffective_hash,
42
+ suspicious: suspicious_hash
36
43
  }
37
44
  end
38
45
 
46
+ def validate blocked_hash, exploited_hash, ineffective_hash, suspicious_hash
47
+ return unless [blocked_hash, exploited_hash, ineffective_hash, suspicious_hash].all?(&:empty?)
48
+
49
+ raise(ArgumentError, 'Start Time for is not presented') unless start_time
50
+
51
+ raise(ArgumentError, 'At least one of the samples must be populated')
52
+ end
53
+
39
54
  # @param attack_result [Contrast::Agent::Reporting::AttackResult]
40
55
  # @return [Contrast::Agent::Reporting::Defend::AttackSampleActivity]
41
56
  def attach_data attack_result
@@ -57,7 +72,7 @@ module Contrast
57
72
  end
58
73
 
59
74
  def start_time
60
- Contrast::Agent::REQUEST_TRACKER.current&.timer&.start_ms
75
+ Contrast::Agent::REQUEST_TRACKER.current&.timer&.start_ms || 0
61
76
  end
62
77
  end
63
78
  end
@@ -3,7 +3,6 @@
3
3
 
4
4
  require 'contrast/agent/protect/rule/cmd_injection'
5
5
  require 'contrast/agent/protect/rule/deserialization'
6
- require 'contrast/agent/protect/rule/http_method_tampering'
7
6
  require 'contrast/agent/protect/rule/no_sqli'
8
7
  require 'contrast/agent/reporting/attack_result/user_input'
9
8
  require 'contrast/agent/reporting/attack_result/response_type'
@@ -24,6 +24,7 @@ module Contrast
24
24
  end
25
25
 
26
26
  def to_controlled_hash
27
+ validate
27
28
  {
28
29
  attackTimeMap: time_map,
29
30
  samples: samples.map(&:to_controlled_hash),
@@ -32,6 +33,10 @@ module Contrast
32
33
  }
33
34
  end
34
35
 
36
+ def validate
37
+ raise(ArgumentError, 'Start Time is not presented') unless @start_time
38
+ end
39
+
35
40
  # @param attack_result [Contrast::Agent::Reporting::AttackResult]
36
41
  def attach_data attack_result
37
42
  attack_result.samples.each do |attack_sample|
@@ -11,6 +11,7 @@ module Contrast
11
11
  # This is the new AttackerActivity class which will includes the attacker information discovered during this
12
12
  # activity period.
13
13
  class ApplicationDefendAttackerActivity
14
+ include Contrast::Components::Logger::InstanceMethods
14
15
  # @return [Hash<String,Contrast::Agent::Reporting::ApplicationDefendAttackActivity>] map of rule-id to violated
15
16
  # samples for that rule
16
17
  attr_accessor :protection_rules
@@ -32,8 +33,11 @@ module Contrast
32
33
  end
33
34
 
34
35
  def to_controlled_hash
36
+ processed_rules = process_protection_rules
37
+ validate(processed_rules)
38
+
35
39
  {
36
- protectionRules: process_protection_rules,
40
+ protectionRules: processed_rules,
37
41
  source: {
38
42
  ip: source_ip,
39
43
  xForwardedFor: source_forwarded_for
@@ -41,6 +45,11 @@ module Contrast
41
45
  }
42
46
  end
43
47
 
48
+ def validate processed_rules
49
+ raise(ArgumentError, 'Protection Rules are not presented') if processed_rules.empty?
50
+ raise(ArgumentError, 'Source is not presented') unless source_ip
51
+ end
52
+
44
53
  # @param attack_result [Contrast::Agent::Reporting::AttackResult]
45
54
  def attach_data attack_result
46
55
  @protection_rules[attack_result.rule_id] = Contrast::Agent::Reporting::ApplicationDefendAttackActivity.new.
@@ -22,7 +22,7 @@ module Contrast
22
22
  @event_method = :POST
23
23
  @event_endpoint = Contrast::Agent::Reporting::Endpoints.application_inventory
24
24
  # The API spec limits us to 500 routes, so we'll enforce that here to not hold on to superfulous data.
25
- @routes = Contrast::Agent.framework_manager.find_route_discovery_data.take(500)
25
+ @routes = Contrast::Agent.framework_manager.find_route_discovery_data&.take(500)
26
26
  super
27
27
  end
28
28
 
@@ -33,6 +33,7 @@ module Contrast
33
33
  def to_controlled_hash
34
34
  {
35
35
  session_id: ::Contrast::ASSESS.session_id,
36
+ # documentation lists routes as deprecated from the agent_ng_endpoints.yml
36
37
  routes: routes.map(&:to_controlled_hash)
37
38
  }
38
39
  end
@@ -13,7 +13,7 @@ module Contrast
13
13
  # about the inventory of the application which was discovered during exercise of the application
14
14
  # during this activity period.
15
15
  class ApplicationInventoryActivity < Contrast::Agent::Reporting::ApplicationReportingEvent
16
- # return [Contrast::Agent::Reporting::ArchitectureComponent]
16
+ # return [Array<Contrast::Agent::Reporting::ArchitectureComponent>]
17
17
  attr_reader :components
18
18
  # @ return [Array<String>, nil] - User-Agent Header value
19
19
  attr_reader :browsers
@@ -46,6 +46,11 @@ module Contrast
46
46
  def duration
47
47
  Contrast::Utils::Timer.now_ms - (Contrast::Agent::REQUEST_TRACKER.current&.timer&.start_ms || 0)
48
48
  end
49
+
50
+ # Helper method to determine if InventoryActivity has no data
51
+ def empty?
52
+ @browsers.empty? && @components.empty?
53
+ end
49
54
  end
50
55
  end
51
56
  end
@@ -17,10 +17,20 @@ module Contrast
17
17
  # The timestamp field is a bit of a misnomer. It's really the time, in ms, since the settings for this
18
18
  # application have been updated. If I've never updated, then it's been 0ms since then.
19
19
  #
20
+ #
20
21
  # @return [Integer]
21
22
  def since_last_update
22
23
  (update_time = Contrast::SETTINGS.last_app_update_ms) ? Contrast::Utils::Timer.now_ms - update_time : 0
23
24
  end
25
+
26
+ # Human readable last time update for header set. Set to 0 if the agent is just starting and have not received
27
+ # the latest header from TS.
28
+ #
29
+ #
30
+ # @return [String]
31
+ def since_last_update_httpdate
32
+ Contrast::SETTINGS.app_settings_last_httpdate || Contrast::Utils::Timer.ms_to_httpdate(0)
33
+ end
24
34
  end
25
35
  end
26
36
  end
@@ -0,0 +1,40 @@
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/agent/reporting/reporting_events/application_reporting_event'
5
+ require 'contrast/agent/reporting/reporting_utilities/endpoints'
6
+ require 'contrast/utils/timer'
7
+
8
+ module Contrast
9
+ module Agent
10
+ module Reporting
11
+ # This class will initialize a GET request to be send to TS. The application settings endpoint is the way
12
+ # the Agent receives application sittings
13
+ class ApplicationSettings < Contrast::Agent::Reporting::ApplicationReportingEvent
14
+ def initialize
15
+ @event_method = :GET
16
+ @event_endpoint = Contrast::Agent::Reporting::Endpoints.application_settings
17
+ super
18
+ end
19
+
20
+ def file_name
21
+ 'application-settings'
22
+ end
23
+
24
+ # Attach the last server settings received timestamp to the request as it is required.
25
+ #
26
+ # If-Modified-Since: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT
27
+ # @param request [Net::HTTPRequest]
28
+ def attach_headers request
29
+ request['If-Modified-Since'] = since_last_update_httpdate
30
+ end
31
+
32
+ # @return [Hash]
33
+ # @raise [ArgumentError]
34
+ def to_controlled_hash
35
+ {}
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -88,8 +88,8 @@ module Contrast
88
88
  event_messages = Contrast::Agent::Reporting::FindingEvent.from_source(source)
89
89
  events.concat(event_messages) if event_messages&.any?
90
90
  event_data = Contrast::Agent::Assess::Events::EventData.new(trigger_node, source, object, ret, args)
91
- contrast_event = Contrast::Agent::Assess::ContrastEvent.new(event_data)
92
- events << Contrast::Agent::Reporting::FindingEvent.convert(contrast_event)
91
+ contrast_event = Contrast::Agent::Reporting::FindingEvent.new(event_data)
92
+ events << contrast_event
93
93
  return unless request
94
94
 
95
95
  @request = Contrast::Agent::Reporting::FindingRequest.convert(request)