> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/action-center/tenable/create-tenable-scan.md).

# Create Tenable Scan

Creates a new scan in Tenable from a scan template, sets the hostnames of the matched devices as its targets, and launches it right away. In the console this job is listed under Tenable, in the Scan Management group, with the description "Creates Tenable scan with last discovery data."

### Before you begin

* An API key pair for Tenable Vulnerability Management: an **Access Key** and a **Secret Key**, generated in the Tenable console under Settings - My Account - API Keys. The default **Domain** is `https://cloud.tenable.com`.
* Asset type: device only. The job has no required columns, but it only uses the `Hostname` value of each device. Devices without a hostname are left out of the target list.
* The exact name of a Tenable scan template, for example `Basic Network Scan`.
* This job has its own settings tab under **Action Center** > **Settings**. It does not use the shared Tenable connection fields (it has no Timeout, Verify SSL or Retry on Rate Limit), and its URL, Access Key and Secret Key fields are plain text fields. See [Action Center Settings](broken://pages/742bb94503961e05b5eaa95572a142f73cd7ecb2).

### Settings

| Setting          | Type | Required | Default                     | Description                                                                                      |
| ---------------- | ---- | -------- | --------------------------- | ------------------------------------------------------------------------------------------------ |
| URL              | Text | No       | <https://cloud.tenable.com> | Base URL of Tenable. The form hint reads `Ex: https://ip_or_domain:port.com`.                    |
| Access Key       | Text | Yes      | None                        | API access key. Not masked.                                                                      |
| Secret Key       | Text | Yes      | None                        | API secret key. Not masked.                                                                      |
| Scan Template    | Text | Yes      | None                        | Name of the Tenable scan template. Examples: `Basic Network Scan`, `Policy Compliance Auditing`. |
| Scan Name        | Text | Yes      | None                        | Name of the scan you want.                                                                       |
| Scan Description | Text | Yes      | None                        | Description of the scan you want.                                                                |

### How it works

* The job lists the scan templates (`GET <URL>/editor/scan/templates`) and picks the one whose name equals **Scan Template** exactly. If no template matches, the job fails with "Scan template not found".
* It joins the hostnames of the matched devices with commas and creates the scan with `POST <URL>/scans`, using the template, **Scan Name**, **Scan Description** and the hostnames as targets.
* It then launches the new scan with `POST <URL>/scans/<scan id>/launch`.
* All requests use a fixed 30 second timeout and do not verify the TLS certificate of the server.
* The job does not check the result of the create or launch calls. Check the scan in Tenable to confirm it started.
* The job passes the matched assets it received on to the next node unchanged.

### Example

Create and launch a network scan of the devices your condition found.

| Setting          | Value                       |
| ---------------- | --------------------------- |
| URL              | `https://cloud.tenable.com` |
| Access Key       | `YOUR_ACCESS_KEY`           |
| Secret Key       | `YOUR_SECRET_KEY`           |
| Scan Template    | `Basic Network Scan`        |
| Scan Name        | `OctoXLabs scan`            |
| Scan Description | `Scan of matched devices`   |

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>About Action Center</strong></td><td>Workflows, triggers, conditions and job nodes.</td><td><a href="broken://pages/ed78ac5bacec4909acb71c776dd17d62cfa78748">Broken link</a></td></tr><tr><td><strong>Action Center Settings</strong></td><td>Save connection defaults for Tenable jobs.</td><td><a href="broken://pages/742bb94503961e05b5eaa95572a142f73cd7ecb2">Broken link</a></td></tr><tr><td><strong>Launch Scan on Matched Assets on Tenable</strong></td><td>Launch an existing scan against the matched assets instead of its saved targets.</td><td><a href="broken://pages/e935a356168db2402abef004dce68ce83cf63a3e">Broken link</a></td></tr></tbody></table>

{% hint style="info" %}
Available starting from version 6.0.0.
{% endhint %}
