WAS

The following methods allow for interaction into the Tenable Vulnerability Management WAS API endpoints.

Methods available on tio.was:

class WasAPI(api: APISession)[source]

This class contains methods related to WAS.

download_scan_report(scan_uuid: str) Dict[source]

Downloads the individual target scan results.

Parameters:

scan_uuid (str) – UUID of the scan whose report to download.

export(**kwargs) WasIterator[source]

Export Web Application Scan Results based on filters applied.

Parameters:
  • single_filter (tuple) – A single filter to apply to the scan configuration search. This is a tuple with three elements - field, operator, and value in that order.

  • and_filter (list) – An array of filters that must all be satisfied. This is a list of tuples with three elements - field, operator, and value in that order.

  • or_filter (list) – An array of filters where at least one must be satisfied. This is a list of tuples with three elements - field, operator, and value in that order.

Returns:

WasIterator

Examples

Passing AND filter to the API

>>> was_iterator = tio.was.export(
...     and_filter=[
...         ("scans_started_at", "gte", "2023/03/24"),
...         ("scans_status", "contains", ["completed"])
...     ]
... )
...
... for finding in was_iterator:
...     print(finding)