class Nexpose::ScanSummary::Vulnerabilities::Status

Value class for tracking vulnerability status counts.

Severities will only be mapped if they are provided in the response, which currently only happens for vuln-exploit, vuln-version, and vuln-potential.

Attributes

count[R]
severities[R]

Public Class Methods

new(severity = nil, count = 0) click to toggle source
# File lib/nexpose/scan.rb, line 709
def initialize(severity = nil, count = 0)
  if severity
    @severities = {}
    @count      = 0
    add_severity(severity.to_i, count)
  else
    @severities = nil
    @count      = count
  end
end

Public Instance Methods

add_severity(severity, count) click to toggle source

For vuln-exploit, vuln-version, and vuln-potential, map the count at a severity level, but also maintain an overall count.

# File lib/nexpose/scan.rb, line 722
def add_severity(severity, count)
  @count += count
  @severities[severity] = count
end