Sha256: 0f80ea67cc597abdea85a000e733467868ae257f457bb8c9000f996de4594b07
Contents?: true
Size: 1.04 KB
Versions: 20
Compression:
Stored size: 1.04 KB
Contents
# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true require 'contrast/components/logger' module Contrast module Agent module Protect # This class will store all exploits or definite attack but # require us to wait for response class ExploitableCollection include Contrast::Components::Logger::InstanceMethods def initialize @_collection = [] end def collection @_collection ||= [] end # Push the Result we need to store until response is available # # @param attack_result [Contrast::Agent::Reporting::AttackResult] def push attack_result @_collection << attack_result end # Attach attack results to the context # # @param context [Contrast::Agent::RequestContext] def report_recorded_exploits context context.activity.results.concat(@_collection) end end end end end
Version data entries
20 entries across 20 versions & 1 rubygems