Class: Nexpose::VulnFinding
- Inherits:
-
Object
- Object
- Nexpose::VulnFinding
- Defined in:
- lib/nexpose/vuln.rb
Overview
Vulnerability finding information pulled from AJAX requests. Data uses a numeric, console-specific vuln ID, which may need to be cross-referenced to the String ID to be used elsewhere.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#console_id ⇒ Object
readonly
Unique, console-specific identifier of the vulnerability.
-
#cvss_score ⇒ Object
readonly
Returns the value of attribute cvss_score.
-
#cvss_vector ⇒ Object
readonly
Returns the value of attribute cvss_vector.
-
#exploit ⇒ Object
readonly
Main published exploit module against this vulnerability, if any.
-
#id ⇒ Object
readonly
Unique identifier of the vulnerability.
-
#instances ⇒ Object
readonly
Number of instances of this vulnerabilty finding on an asset.
-
#malware ⇒ Object
readonly
Whether known malware kits exploit this vulnerability.
-
#published ⇒ Object
readonly
Date this vulnerability was published.
-
#risk ⇒ Object
readonly
Returns the value of attribute risk.
-
#severity ⇒ Object
readonly
Returns the value of attribute severity.
-
#title ⇒ Object
readonly
Vulnerability title.
-
#verified ⇒ Object
readonly
Date that a vuln was verified, if validation has been carried out.
Instance Method Summary collapse
-
#initialize(json) ⇒ VulnFinding
constructor
A new instance of VulnFinding.
Constructor Details
#initialize(json) ⇒ VulnFinding
Returns a new instance of VulnFinding.
253 254 255 256 257 258 259 260 261 262 263 264 265 266 |
# File 'lib/nexpose/vuln.rb', line 253 def initialize(json) @id = json['nexVulnID'] @console_id = json['vulnID'] @title = json['title'] @cvss_vector = json['cvssBase'] @cvss_score = json['cvssScore'] @risk = json['riskScore'] @published = Time.at(json['publishedDate'] / 1000) @severity = json['severity'] @instances = json['vulnInstanceCount'] @exploit = json['mainExploit'] @malware = json['malwareCount'] @verified = DateTime.iso8601(json['verifiedDate'].slice(0, 15)).to_time if json['verifiedDate'] end |
Instance Attribute Details
#console_id ⇒ Object (readonly)
Unique, console-specific identifier of the vulnerability.
235 236 237 |
# File 'lib/nexpose/vuln.rb', line 235 def console_id @console_id end |
#cvss_score ⇒ Object (readonly)
Returns the value of attribute cvss_score.
238 239 240 |
# File 'lib/nexpose/vuln.rb', line 238 def cvss_score @cvss_score end |
#cvss_vector ⇒ Object (readonly)
Returns the value of attribute cvss_vector.
239 240 241 |
# File 'lib/nexpose/vuln.rb', line 239 def cvss_vector @cvss_vector end |
#exploit ⇒ Object (readonly)
Main published exploit module against this vulnerability, if any.
247 248 249 |
# File 'lib/nexpose/vuln.rb', line 247 def exploit @exploit end |
#id ⇒ Object (readonly)
Unique identifier of the vulnerability.
233 234 235 |
# File 'lib/nexpose/vuln.rb', line 233 def id @id end |
#instances ⇒ Object (readonly)
Number of instances of this vulnerabilty finding on an asset.
245 246 247 |
# File 'lib/nexpose/vuln.rb', line 245 def instances @instances end |
#malware ⇒ Object (readonly)
Whether known malware kits exploit this vulnerability.
249 250 251 |
# File 'lib/nexpose/vuln.rb', line 249 def malware @malware end |
#published ⇒ Object (readonly)
Date this vulnerability was published.
242 243 244 |
# File 'lib/nexpose/vuln.rb', line 242 def published @published end |
#risk ⇒ Object (readonly)
Returns the value of attribute risk.
240 241 242 |
# File 'lib/nexpose/vuln.rb', line 240 def risk @risk end |
#severity ⇒ Object (readonly)
Returns the value of attribute severity.
243 244 245 |
# File 'lib/nexpose/vuln.rb', line 243 def severity @severity end |
#title ⇒ Object (readonly)
Vulnerability title.
237 238 239 |
# File 'lib/nexpose/vuln.rb', line 237 def title @title end |
#verified ⇒ Object (readonly)
Date that a vuln was verified, if validation has been carried out.
251 252 253 |
# File 'lib/nexpose/vuln.rb', line 251 def verified @verified end |