Class: Contrast::Agent::Reporting::Details::XssDetails

Inherits:
ProtectRuleDetails show all
Defined in:
lib/contrast/agent/reporting/details/xss_details.rb

Overview

XssDetails IA result details info.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeXssDetails

Returns a new instance of XssDetails.



18
19
20
21
# File 'lib/contrast/agent/reporting/details/xss_details.rb', line 18

def initialize
  @matches = []
  super
end

Instance Attribute Details

#inputString

Returns:



14
15
16
# File 'lib/contrast/agent/reporting/details/xss_details.rb', line 14

def input
  @input
end

#matches<Array<Contrast::Agent::Reporting::XssMatch>]

Returns <Array<Contrast::Agent::Reporting::XssMatch>].

Returns:

  • (<Array<Contrast::Agent::Reporting::XssMatch>])

    <Array<Contrast::Agent::Reporting::XssMatch>]



16
17
18
# File 'lib/contrast/agent/reporting/details/xss_details.rb', line 16

def matches
  @matches
end

Instance Method Details

#to_controlled_hashObject



23
24
25
26
27
28
# File 'lib/contrast/agent/reporting/details/xss_details.rb', line 23

def to_controlled_hash
  {
      input: input,
      matches: matches&.map(&:to_controlled_hash)
  }
end