Class: Nexpose::XML::VulnerabilityDetail
- Inherits:
-
VulnerabilitySummary
- Object
- Vulnerability
- VulnerabilitySummary
- Nexpose::XML::VulnerabilityDetail
- Defined in:
- lib/nexpose/vuln.rb
Overview
Details for a vulnerability.
Instance Attribute Summary collapse
-
#description ⇒ Object
The HTML Description of this vulnerability.
-
#references ⇒ Object
External References for this vulnerability.
-
#solution ⇒ Object
The HTML Solution for this vulnerability.
Attributes inherited from VulnerabilitySummary
#added, #credentials, #cvss_score, #cvss_vector, #modified, #pci_severity, #published, #safe
Attributes inherited from Vulnerability
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id, title, severity) ⇒ VulnerabilityDetail
constructor
A new instance of VulnerabilityDetail.
Methods inherited from VulnerabilitySummary
Constructor Details
#initialize(id, title, severity) ⇒ VulnerabilityDetail
Returns a new instance of VulnerabilityDetail.
196 197 198 199 |
# File 'lib/nexpose/vuln.rb', line 196 def initialize(id, title, severity) @id, @title, @severity = id, title, severity @references = [] end |
Instance Attribute Details
#description ⇒ Object
The HTML Description of this vulnerability.
189 190 191 |
# File 'lib/nexpose/vuln.rb', line 189 def description @description end |
#references ⇒ Object
External References for this vulnerability. Array containing (Reference)
192 193 194 |
# File 'lib/nexpose/vuln.rb', line 192 def references @references end |
#solution ⇒ Object
The HTML Solution for this vulnerability.
194 195 196 |
# File 'lib/nexpose/vuln.rb', line 194 def solution @solution end |
Class Method Details
.parse(xml) ⇒ Object
201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/nexpose/vuln.rb', line 201 def self.parse(xml) vuln = parse_attributes(xml) vuln.description = REXML::XPath.first(xml, 'description').text vuln.solution = REXML::XPath.first(xml, 'solution').text xml.elements.each('references/reference') do |ref| vuln.references << Reference.new(ref.attributes['source'], ref.text) end vuln end |