> 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/add-ip-addresses-to-tag-value-on-tenable.md).

# Add IP Addresses to Tag Value on Tenable

Creates or updates a Tenable tag value whose asset filter lists the matched assets. Instead of assigning the tag to assets one by one, the job writes a rule: an asset gets the tag when it matches any of the filter values built from your devices.

### 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`.
* Connection defaults (Domain, Access Key, Secret Key, Timeout, Verify SSL) can be saved once under **Action Center** > **Settings**. See [Action Center Settings](broken://pages/742bb94503961e05b5eaa95572a142f73cd7ecb2).
* Asset type: device only. Required columns: `Hostname`, `IpAddresses`.

### Settings

The job node shows these fields.

| Setting             | Type           | Required | Default                     | Description                                                                                               |
| ------------------- | -------------- | -------- | --------------------------- | --------------------------------------------------------------------------------------------------------- |
| Domain              | URL            | No       | <https://cloud.tenable.com> | Base URL of Tenable. Example: `https://cloud.tenable.com`.                                                |
| Access Key          | Sensitive text | Yes      | None                        | Generated in the Tenable console under Settings - My Account - API Keys. Masked after saving.             |
| Secret Key          | Sensitive text | Yes      | None                        | The secret key of the same key pair. Masked after saving.                                                 |
| Timeout             | Number         | No       | 30                          | Request timeout in seconds.                                                                               |
| Verify SSL          | Boolean        | No       | On                          | Verify the TLS certificate of the Tenable host.                                                           |
| Retry on Rate Limit | Boolean        | No       | On                          | Retry a request once when Tenable answers 429, waiting for the `retry-after` header (at most 60 seconds). |
| Maximum Assets      | Number         | No       | 5000                        | Upper bound on how many assets a single request body may carry. Extra assets are logged and skipped.      |
| Tag Category        | Text           | Yes      | None                        | Created if it does not exist. Example: `OctoXLabs`.                                                       |
| Tag Value           | Text           | Yes      | None                        | Example: `High CVSS`.                                                                                     |
| Description         | Text           | No       | None                        | Optional description of the tag value.                                                                    |
| Filter Field        | Text           | No       | ipv4                        | Asset filter field name. Validated against `GET /tags/assets/filters` on connection test.                 |
| Filter Operator     | Text           | No       | eq                          | Operator for the filter field, also validated on connection test.                                         |

### How it works

* Before anything else the job checks **Filter Field** and **Filter Operator** against the filters Tenable lists. An unknown field or operator fails the job, because Tenable would otherwise accept a filter that matches nothing.
* The job picks the column from the filter field: if the field name contains `ip` it uses `IpAddresses`, otherwise `Hostname`. It takes the values of the matched devices (cut to **Maximum Assets**), skips devices without a value, and removes duplicates.
* It sends one request, `POST /tags/values`, with the category, the value, the description when set, and one filter per value combined with OR.
* No filter value could be built: the job logs it and writes nothing.
* A failed request fails the job.
* The job passes the matched assets it received on to the next node unchanged.

### Example

Keep a tag value in sync with the IP addresses your condition finds.

| Setting         | Value                       |
| --------------- | --------------------------- |
| Domain          | `https://cloud.tenable.com` |
| Access Key      | `YOUR_ACCESS_KEY`           |
| Secret Key      | `YOUR_SECRET_KEY`           |
| Tag Category    | `OctoXLabs`                 |
| Tag Value       | `High CVSS`                 |
| Filter Field    | `ipv4`                      |
| Filter Operator | `eq`                        |

### 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>Add Tag to Assets on Tenable</strong></td><td>Add a Tenable tag to the matched assets.</td><td><a href="broken://pages/863813ba5f9904fdaf7a2ccb524c39fa74d96a97">Broken link</a></td></tr></tbody></table>

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