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.



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

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.



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

def key
  @key
end

#proofObject

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



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

def proof
  @proof
end

#statusObject

Status of the vulnerability. @see VulnerabilityCheck::Status



160
161
162
# File 'lib/nexpose/external.rb', line 160

def status
  @status
end

#vuln_idObject

Unique identifier of a vulnerability in Nexpose.



158
159
160
# File 'lib/nexpose/external.rb', line 158

def vuln_id
  @vuln_id
end

Instance Method Details

#to_hObject



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

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