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.
198 199 200 201 202 203 |
# File 'lib/nexpose/vuln.rb', line 198 def initialize(id, title, severity) @id = id @title = title @severity = severity @references = [] end |
Instance Attribute Details
#description ⇒ Object
The HTML Description of this vulnerability.
191 192 193 |
# File 'lib/nexpose/vuln.rb', line 191 def description @description end |
#references ⇒ Object
External References for this vulnerability. Array containing (Reference)
194 195 196 |
# File 'lib/nexpose/vuln.rb', line 194 def references @references end |
#solution ⇒ Object
The HTML Solution for this vulnerability.
196 197 198 |
# File 'lib/nexpose/vuln.rb', line 196 def solution @solution end |
Class Method Details
.parse(xml) ⇒ Object
205 206 207 208 209 210 211 212 213 |
# File 'lib/nexpose/vuln.rb', line 205 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 |