Class: Nexpose::External::VulnerabilityCheck

Inherits:
Object
  • Object
show all
Defined in:
lib/nexpose/external.rb

Overview

Vulnerability check object for importing vulnerabilities into Nexpose.

Defined Under Namespace

Modules: Status

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(vuln_id, status = Status::EXPLOITED, proof = nil, key = nil) ⇒ VulnerabilityCheck

Returns a new instance of VulnerabilityCheck.



171
172
173
# File 'lib/nexpose/external.rb', line 171

def initialize(vuln_id, status = Status::EXPLOITED, proof = nil, key = nil)
  @vuln_id, @status, @proof, @key = vuln_id, status, proof, key
end

Instance Attribute Details

#keyObject

Unique identifier of a vulnerability instance, typically used for spider vulns or when multiple instances of a vuln exist on the same service.



167
168
169
# File 'lib/nexpose/external.rb', line 167

def key
  @key
end

#proofObject

Explanation of what proves that an asset or service is vulnerable.



169
170
171
# File 'lib/nexpose/external.rb', line 169

def proof
  @proof
end

#statusObject

Status of the vulnerability. @see VulnerabilityCheck::Status



164
165
166
# File 'lib/nexpose/external.rb', line 164

def status
  @status
end

#vuln_idObject

Unique identifier of a vulnerability in Nexpose.



162
163
164
# File 'lib/nexpose/external.rb', line 162

def vuln_id
  @vuln_id
end

Instance Method Details

#to_hObject



175
176
177
178
179
180
# File 'lib/nexpose/external.rb', line 175

def to_h
  { vuln_id: vuln_id,
    status: status,
    key: key,
    proof: proof }
end