Class: Nexpose::VulnerabilitySummary
- Inherits:
-
Vulnerability
- Object
- Vulnerability
- Nexpose::VulnerabilitySummary
- Defined in:
- lib/nexpose/vuln.rb
Overview
Summary of a vulnerability.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#added ⇒ Object
When this vulnerability was first included in the application.
-
#credentials ⇒ Object
A vulnerability is considered “credentialed” when all of its checks require credentials or if the check depends on previous authentication during a scan.
-
#cvss_score ⇒ Object
The computation of the Common Vulnerability Scoring System indicating compliance with PCI standards on a scale from 0 to 10.0.
-
#cvss_vector ⇒ Object
How the vulnerability is exploited according to PCI standards.
-
#modified ⇒ Object
The last date the vulnerability was modified.
-
#pci_severity ⇒ Object
PCI severity value for the vulnerability on a scale of 1 to 5.
-
#published ⇒ Object
The date when the information about the vulnerability was first released.
-
#safe ⇒ Object
Whether all checks for the vulnerability are safe.
Attributes inherited from Vulnerability
Class Method Summary collapse
Methods inherited from Vulnerability
Constructor Details
This class inherits a constructor from Nexpose::Vulnerability
Instance Attribute Details
#added ⇒ Object
When this vulnerability was first included in the application.
84 85 86 |
# File 'lib/nexpose/vuln.rb', line 84 def added @added end |
#credentials ⇒ Object
A vulnerability is considered “credentialed” when all of its checks require credentials or if the check depends on previous authentication during a scan.
81 82 83 |
# File 'lib/nexpose/vuln.rb', line 81 def credentials @credentials end |
#cvss_score ⇒ Object
The computation of the Common Vulnerability Scoring System indicating compliance with PCI standards on a scale from 0 to 10.0.
97 98 99 |
# File 'lib/nexpose/vuln.rb', line 97 def cvss_score @cvss_score end |
#cvss_vector ⇒ Object
How the vulnerability is exploited according to PCI standards.
93 94 95 |
# File 'lib/nexpose/vuln.rb', line 93 def cvss_vector @cvss_vector end |
#modified ⇒ Object
The last date the vulnerability was modified.
87 88 89 |
# File 'lib/nexpose/vuln.rb', line 87 def modified @modified end |
#pci_severity ⇒ Object
PCI severity value for the vulnerability on a scale of 1 to 5.
72 73 74 |
# File 'lib/nexpose/vuln.rb', line 72 def pci_severity @pci_severity end |
#published ⇒ Object
The date when the information about the vulnerability was first released.
90 91 92 |
# File 'lib/nexpose/vuln.rb', line 90 def published @published end |
#safe ⇒ Object
Whether all checks for the vulnerability are safe. Unsafe checks may cause denial of service or otherwise disrupt system performance.
76 77 78 |
# File 'lib/nexpose/vuln.rb', line 76 def safe @safe end |
Class Method Details
.parse(xml) ⇒ Object
117 118 119 |
# File 'lib/nexpose/vuln.rb', line 117 def self.parse(xml) parse_attributes(xml) end |
.parse_attributes(xml) ⇒ Object
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/nexpose/vuln.rb', line 99 def self.parse_attributes(xml) vuln = new(xml.attributes['id'], xml.attributes['title'], xml.attributes['severity'].to_i) vuln.pci_severity = xml.attributes['pciSeverity'].to_i vuln.safe = xml.attributes['safe'] == 'true' # or xml.attributes['safe'] == '1' vuln.added = Date::parse(xml.attributes['added']) vuln.modified = Date::parse(xml.attributes['modified']) vuln.credentials = xml.attributes['requiresCredentials'] == 'true' # These three fields are optional in the XSD. vuln.published = Date::parse(xml.attributes['published']) if xml.attributes['published'] vuln.cvss_vector = xml.attributes['cvssVector'] if xml.attributes['cvssVector'] vuln.cvss_score = xml.attributes['cvssScore'].to_f if xml.attributes['cvssScore'] vuln end |