class Nexpose::Filter
Object that represents a report filter which determines which sites, asset groups, and/or assets that a report is run against.
The configuration must include at least one of asset, site, group (asset group) or scan filter to define the scope of report. The vuln-status filter can be used only with raw report formats: csv or raw_xml. If the vuln-status filter is not included in the configuration, all the vulnerability test results (including invulnerable instances) are exported by default in csv and raw_xml reports.
Attributes
The ID of the specific site, group, asset, or scan. For scan, this can also be “last” for the most recently run scan. For vuln-status, the ID can have one of the following values:
-
vulnerable-exploited (The check was positive. An exploit verified the vulnerability.)
-
vulnerable-version (The check was positive. The version of the scanned service or software is associated with known vulnerabilities.)
-
potential (The check for a potential vulnerability was positive.)
These values are supported for CSV and XML
formats.
One of: site|group|device|scan|vuln-categories|vuln-severity|vuln-status|cyberscope-component|cyberscope-bureau|cyberscope-enclave|tag
Public Class Methods
# File lib/nexpose/report.rb, line 439 def initialize(type, id) @type = type @id = id end
# File lib/nexpose/report.rb, line 452 def self.parse(xml) filters = [] xml.res.elements.each('//Filters/filter') do |filter| filters << Filter.new(filter.attributes['type'], filter.attributes['id']) end filters end
Public Instance Methods
# File lib/nexpose/report.rb, line 448 def ==(other) other.equal?(self) || (other.instance_of?(self.class) && other.type == @type && other.id == @id) end
# File lib/nexpose/report.rb, line 444 def to_xml %(<filter id="#{replace_entities(@id)}" type="#{@type}" />) end