Remediation Scans

The following methods allow for interaction into the Tenable Vulnerability Management Remediation scan create API endpoints. Remediation scan list API endpoints.

Methods available on tio.remediation_scans:

class RemediationScansAPI(api: restfly.session.APISession)[source]
create_remediation_scan(**kwargs)[source]

Create a new remediation scan.

scans: create_remediation_scan # noqa: E501

Parameters
  • uuid (str, optional) – UUID of Remediation scan template

  • name (str) – The name of the remediation scan to create.

  • description (str, optional) – The name of the scan to create.

  • policy (int, optional) – The id or title of the scan policy to use (if not using one of the pre-defined templates). Specifying a a policy id will override the the template parameter.

  • scanner_id (str, optional) – The unique id of the scanner to use. Use the GET /scanners endpoint to find the scanner ID. You can use the special value AUTO-ROUTED to assign scan targets to scanner groups based on the groups’ configured scan routes.

  • target_network_uuid (str, optional) – For remediation scans, enter a valid target network UUID from a previous scan you wish to remediate.

  • scan_time_window (int, optional) – The time frame, in minutes, during which agents must transmit scan results to Tenable Vulnerability Management in order to be included in dashboards and reports. If your request omits this parameter, the default value is 180 minutes. For non-agent scans, this attribute is null.

  • text_targets (str, optional) – The List of targets to scan

  • targets (list, optional) – If defined, then a list of targets can be specified and will be formatted to an appropriate text_target attribute. A list of targets to scan

  • target_groups (list[int]) – For remediation scans, enter a valid target group ID from a previous scan you wish to remediate.

  • file_targets (string, optional) – The name of a file containing the list of targets to scan.

  • tag_targets (list[str], optional) – The list of asset tag identifiers that the scan uses to determine which assets it evaluates

  • agent_group_id (list[str], optional) – An array of agent group UUIDs to scan.

  • emails (list[str], optional) – A comma-separated list of accounts that receive the email summary report.

  • acls (list[dict], optional) – A list of dictionaries containing permissions to apply to the scan.

  • credentials (dict, optional) – A list of credentials to use.

  • enabled_plugins (list, optional) – A list of plugins IDs to add to a remediation scan.

  • **kw (dict, optional) – The various parameters that can be passed to the scan creation API. Examples would be name, email, scanner_id, etc. For more detailed information, please refer to the API documentation linked above. Further, any keyword arguments passed that are not explicitly documented will be automatically appended to the settings document. There is no need to pass settings directly.

Returns

The scan resource record of the newly created remediation scan.

Return type

dict

Examples

Create remediation scan:

>>> scan = tio.remediationscans.create_remediation_scan(
...     uuid='76d67790-2969-411e-a9d0-667f05e8d49e',
...     name='Create Remediation Scan',
...     description='Remediation scan created',
...     scanner_id='10167769',
...     scan_time_window=10,
...     targets=['127.0.0.1:3000'],
...     template='advanced')

For further information on credentials, what settings to use, etc, refer to this doc on the developer portal.

list_remediation_scan(limit=50, offset=0, sortval='scan_creation_date:desc')[source]

Retrieve the list of Remediation scans.

scans: list_remediation_scan

Parameters
  • limit (int, optional) – This value needs to be between 0 and 200

  • offset (int, optional) – This value needs to be > 0

  • sort (str, optional) – scan_creation_date:desc/scan_creation_date:asc Returns the remediation scan list with the ascending or descending order with offset and limit

Returns

An iterator that handles the page management of the requested records.

Return type

RemediationScansIteratorV2

Examples

>>> for remediation_scan in tio.scans.list():
...     pprint(remediation_scan)

For further information on credentials, what settings to use, etc, refer to this doc # noqa: E501 on the developer portal.