Class: Nexpose::VulnerabilityDefinition
- Defined in:
- lib/nexpose/vuln_def.rb
Overview
Vulnerability definition object. Represents a known vulnerability on a given Nexpose console.
Instance Attribute Summary collapse
-
#cves ⇒ Object
readonly
The CVEs for the vulnerability.
-
#cvss_exploit_score ⇒ Object
readonly
Base score for the exploitability of a vulnerability that is used to compute the overall CVSS score.
-
#cvss_impact_score ⇒ Object
readonly
Base score for the impact of a vulnerability that is used to compute the overall CVSS score.
-
#cvss_score ⇒ Object
readonly
CVSS score of the vulnerability.
-
#cvss_vector ⇒ Object
readonly
Full CVSS vector in CVSS Version 2.0 notation.
-
#date_added ⇒ Object
readonly
Date the vulnerability was first checked by Nexpose.
-
#date_published ⇒ Object
readonly
Date the vulnerability was publicized by the third-party, vendor, or another authoring source.
-
#denial_of_service ⇒ Object
readonly
Whether the vulnerability is classified as a denial-of-service vuln.
-
#description ⇒ Object
readonly
Vulnerability description, usually formated in HTML.
-
#id ⇒ Object
readonly
Unique identifier of a vulnerability definition.
-
#pci_severity_score ⇒ Object
readonly
PCI severity score of the vulnerability, measured on a scale of 1 to 5.
-
#pci_status ⇒ Object
readonly
Whether the presence of the vulnerability can cause PCI failure.
-
#riskscore ⇒ Object
readonly
Risk score associated with vulnerability.
-
#severity ⇒ Object
readonly
Severity category.
-
#severity_score ⇒ Object
readonly
Severity score, in the range of 0.0 to 10.0.
-
#title ⇒ Object
readonly
Vulnerability title.
Class Method Summary collapse
-
.load(nsc, id) ⇒ VulnerabilityDefinition
Load a vulnerability definition from the provided console.
Methods inherited from APIObject
Instance Attribute Details
#cves ⇒ Object (readonly)
The CVEs for the vulnerability.
84 85 86 |
# File 'lib/nexpose/vuln_def.rb', line 84 def cves @cves end |
#cvss_exploit_score ⇒ Object (readonly)
Base score for the exploitability of a vulnerability that is used to compute the overall CVSS score.
109 110 111 |
# File 'lib/nexpose/vuln_def.rb', line 109 def cvss_exploit_score @cvss_exploit_score end |
#cvss_impact_score ⇒ Object (readonly)
Base score for the impact of a vulnerability that is used to compute the overall CVSS score.
112 113 114 |
# File 'lib/nexpose/vuln_def.rb', line 112 def cvss_impact_score @cvss_impact_score end |
#cvss_score ⇒ Object (readonly)
CVSS score of the vulnerability. Value between 0.0 and 10.0.
104 105 106 |
# File 'lib/nexpose/vuln_def.rb', line 104 def cvss_score @cvss_score end |
#cvss_vector ⇒ Object (readonly)
Full CVSS vector in CVSS Version 2.0 notation.
106 107 108 |
# File 'lib/nexpose/vuln_def.rb', line 106 def cvss_vector @cvss_vector end |
#date_added ⇒ Object (readonly)
Date the vulnerability was first checked by Nexpose.
89 90 91 |
# File 'lib/nexpose/vuln_def.rb', line 89 def date_added @date_added end |
#date_published ⇒ Object (readonly)
Date the vulnerability was publicized by the third-party, vendor, or another authoring source.
87 88 89 |
# File 'lib/nexpose/vuln_def.rb', line 87 def date_published @date_published end |
#denial_of_service ⇒ Object (readonly)
Whether the vulnerability is classified as a denial-of-service vuln.
115 116 117 |
# File 'lib/nexpose/vuln_def.rb', line 115 def denial_of_service @denial_of_service end |
#description ⇒ Object (readonly)
Vulnerability description, usually formated in HTML.
82 83 84 |
# File 'lib/nexpose/vuln_def.rb', line 82 def description @description end |
#id ⇒ Object (readonly)
Unique identifier of a vulnerability definition.
78 79 80 |
# File 'lib/nexpose/vuln_def.rb', line 78 def id @id end |
#pci_severity_score ⇒ Object (readonly)
PCI severity score of the vulnerability, measured on a scale of 1 to 5.
101 102 103 |
# File 'lib/nexpose/vuln_def.rb', line 101 def pci_severity_score @pci_severity_score end |
#pci_status ⇒ Object (readonly)
Whether the presence of the vulnerability can cause PCI failure. One of: Pass, Fail.
99 100 101 |
# File 'lib/nexpose/vuln_def.rb', line 99 def pci_status @pci_status end |
#riskscore ⇒ Object (readonly)
Risk score associated with vulnerability.
95 96 97 |
# File 'lib/nexpose/vuln_def.rb', line 95 def riskscore @riskscore end |
#severity ⇒ Object (readonly)
Severity category. One of: Critical, Severe, Moderate.
91 92 93 |
# File 'lib/nexpose/vuln_def.rb', line 91 def severity @severity end |
#severity_score ⇒ Object (readonly)
Severity score, in the range of 0.0 to 10.0.
93 94 95 |
# File 'lib/nexpose/vuln_def.rb', line 93 def severity_score @severity_score end |
#title ⇒ Object (readonly)
Vulnerability title.
80 81 82 |
# File 'lib/nexpose/vuln_def.rb', line 80 def title @title end |
Class Method Details
.load(nsc, id) ⇒ VulnerabilityDefinition
Load a vulnerability definition from the provided console.
123 124 125 126 127 128 |
# File 'lib/nexpose/vuln_def.rb', line 123 def self.load(nsc, id) uri = "/api/2.0/vulnerability_definitions/#{id}" resp = AJAX.get(nsc, uri, AJAX::CONTENT_TYPE::JSON) hash = JSON.parse(resp, symbolize_names: true) new.object_from_hash(nsc, hash) end |