Class: Contrast::Agent::Protect::ExploitableCollection
- Includes:
- Components::Logger::InstanceMethods
- Defined in:
- lib/contrast/agent/protect/exploitable_collection.rb
Overview
This class will store all exploits or definite attack but require us to wait for response
Instance Method Summary collapse
- #collection ⇒ Object
-
#initialize ⇒ ExploitableCollection
constructor
A new instance of ExploitableCollection.
-
#push(attack_result) ⇒ Object
Push the Result we need to store until response is available.
-
#report_recorded_exploits(context) ⇒ Object
Attach attack results to the context.
Methods included from Components::Logger::InstanceMethods
Constructor Details
#initialize ⇒ ExploitableCollection
Returns a new instance of ExploitableCollection.
14 15 16 |
# File 'lib/contrast/agent/protect/exploitable_collection.rb', line 14 def initialize @_collection = [] end |
Instance Method Details
#collection ⇒ Object
18 19 20 |
# File 'lib/contrast/agent/protect/exploitable_collection.rb', line 18 def collection @_collection ||= [] end |
#push(attack_result) ⇒ Object
Push the Result we need to store until response is available
25 26 27 |
# File 'lib/contrast/agent/protect/exploitable_collection.rb', line 25 def push attack_result @_collection << attack_result end |
#report_recorded_exploits(context) ⇒ Object
Attach attack results to the context
32 33 34 |
# File 'lib/contrast/agent/protect/exploitable_collection.rb', line 32 def report_recorded_exploits context context.activity.results.concat(@_collection) end |