Class: Nexpose::Filter
- Inherits:
-
Object
- Object
- Nexpose::Filter
- Includes:
- Sanitize
- Defined in:
- lib/nexpose/report.rb
Overview
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.
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
The ID of the specific site, group, asset, or scan.
-
#type ⇒ Object
readonly
One of: site|group|device|scan|vuln-categories|vuln-severity|vuln-status|cyberscope-component|cyberscope-bureau|cyberscope-enclave|tag.
Class Method Summary collapse
Instance Method Summary collapse
- #==(object) ⇒ Object
-
#initialize(type, id) ⇒ Filter
constructor
A new instance of Filter.
- #to_xml ⇒ Object
Methods included from Sanitize
Constructor Details
#initialize(type, id) ⇒ Filter
Returns a new instance of Filter.
430 431 432 433 |
# File 'lib/nexpose/report.rb', line 430 def initialize(type, id) @type = type @id = id end |
Instance Attribute Details
#id ⇒ Object (readonly)
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.
426 427 428 |
# File 'lib/nexpose/report.rb', line 426 def id @id end |
#type ⇒ Object (readonly)
One of: site|group|device|scan|vuln-categories|vuln-severity|vuln-status|cyberscope-component|cyberscope-bureau|cyberscope-enclave|tag
428 429 430 |
# File 'lib/nexpose/report.rb', line 428 def type @type end |
Class Method Details
Instance Method Details
#==(object) ⇒ Object
439 440 441 442 443 444 |
# File 'lib/nexpose/report.rb', line 439 def ==(object) object.equal?(self) || (object.instance_of?(self.class) && object.type == @type && object.id == @id) end |
#to_xml ⇒ Object
435 436 437 |
# File 'lib/nexpose/report.rb', line 435 def to_xml %(<filter id="#{replace_entities(@id)}" type="#{@type}" />) end |