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.



173
174
175
176
177
178
# File 'lib/nexpose/external.rb', line 173

def initialize(vuln_id, status = Status::EXPLOITED, proof = nil, key = nil)
  @vuln_id = vuln_id
  @status  = status
  @proof   = proof
  @key     = 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.



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

def key
  @key
end

#proofObject

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



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

def proof
  @proof
end

#statusObject

Status of the vulnerability. @see VulnerabilityCheck::Status



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

def status
  @status
end

#vuln_idObject

Unique identifier of a vulnerability in Nexpose.



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

def vuln_id
  @vuln_id
end

Instance Method Details

#to_hObject



180
181
182
183
184
185
# File 'lib/nexpose/external.rb', line 180

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