> 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/adapters/s/secfusion-api.md).

# SecFusion API

SecFusion consolidates vulnerability data. This adapter reads it through the SecFusion API, with one token for the asset endpoint and one for the vulnerability endpoint. For the database variant, see SecFusion.

## Use cases

* List assets that the SecFusion API reports.

```
Adapters = sec-fusion-api
```

* Find SecFusion assets with a high CVSS v3 finding.

```
Adapters = sec-fusion-api AND Vulnerabilities.Cvss3Base >= 7
```

## Before you begin

### Network

| Source              | Destination                                | Port | Protocol |
| ------------------- | ------------------------------------------ | ---- | -------- |
| OctoXLabs connector | SecFusion API server (host name you enter) | 443  | HTTPS    |

### Required permissions

| Scope or role         | Permission | Needed for                    |
| --------------------- | ---------- | ----------------------------- |
| Asset token           | Read       | `GetAssets` endpoint          |
| Vulnerabilities token | Read       | `GetVulnerabilities` endpoint |

Create a separate connection for each company you have in SecFusion.

## Create credentials in SecFusion API

{% stepper %}
{% step %}

### Open the SecFusion Web Console

Sign in to the SecFusion Web Console.
{% endstep %}

{% step %}

### Create the asset token

Create an API token for the GetAsset endpoint.
{% endstep %}

{% step %}

### Create the vulnerabilities token

Create an API token for the GetVuln endpoint.
{% endstep %}

{% step %}

### One connection per company

Repeat the setup in OctoXLabs for each company.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter             | Required | Type    | Default | Description                                                    |
| --------------------- | -------- | ------- | ------- | -------------------------------------------------------------- |
| Hostname              | Yes      | String  | None    | Host name of the SecFusion API server.                         |
| Asset Token           | Yes      | String  | None    | Token for the GetAsset endpoint. Stored as `asset_token`.      |
| Vulnerabilities Token | Yes      | String  | None    | Token for the GetVuln endpoint. Stored as `vuln_token`.        |
| Is Secure?            | No       | Boolean | True    | Declared in the serializer. The code always builds https URLs. |
| Timeout               | No       | Integer | 30      | Seconds to wait for API responses.                             |

## Troubleshooting

| Error message | Cause                                                                                                                                      | Fix                                                                                                                          |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| Status Code:  | The API answered with a status other than the one the connector expects. The message also lists the URL, the method and the response body. | Read the status code and the response body in the message, then check the credentials, the permissions and the network path. |

## Change history
