Class: Nexpose::XML::VulnCheck

Inherits:
Vulnerability show all
Defined in:
lib/nexpose/vuln.rb

Overview

Vulnerability Check information.

Instance Attribute Summary collapse

Attributes inherited from Vulnerability

#id, #severity, #title

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ VulnCheck

Returns a new instance of VulnCheck.



130
131
132
133
134
135
136
137
# File 'lib/nexpose/vuln.rb', line 130

def initialize(json)
  @id         = json['Vuln ID']
  @check_id   = json['Vuln Check ID']
  @title      = json['Vulnerability']
  @severity   = json['Severity'].to_i
  @check_type = json['Check Type']
  @categories = json['Category'].split(/, */)
end

Instance Attribute Details

#categoriesArray[String] (readonly)

Returns Categories that this check is a member of. Note that this is note the same as the categories from #list_vuln_categories.

Returns:

  • (Array[String])

    Categories that this check is a member of. Note that this is note the same as the categories from #list_vuln_categories.



126
127
128
# File 'lib/nexpose/vuln.rb', line 126

def categories
  @categories
end

#check_idObject (readonly)

Returns the value of attribute check_id.



123
124
125
# File 'lib/nexpose/vuln.rb', line 123

def check_id
  @check_id
end

#check_typeString (readonly)

Returns Check type. @see #list_vuln_types.

Returns:

  • (String)

    Check type. @see #list_vuln_types



128
129
130
# File 'lib/nexpose/vuln.rb', line 128

def check_type
  @check_type
end