> 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/o/openvas-db.md).

# OpenVAS DB

OpenVAS is an open source vulnerability scanner. OctoXLabs connects to the OpenVAS PostgreSQL database and reads scan results per host to attach vulnerabilities to devices.

## Use cases

* List devices that have OpenVAS findings.

```
Adapters = openvas
```

* Find hosts seen by OpenVAS that no endpoint agent reports.

```
Adapters = openvas AND NOT Adapters = falcon-crowdstrike
```

## Before you begin

### Network

| Source              | Destination                 | Port                | Protocol   |
| ------------------- | --------------------------- | ------------------- | ---------- |
| OctoXLabs connector | OpenVAS PostgreSQL database | 5432 (configurable) | PostgreSQL |

### Required permissions

| Scope or role | Permission            | Needed for                  |
| ------------- | --------------------- | --------------------------- |
| Database user | Read, Select and List | Tables `results` and `nvts` |

## Create credentials in OpenVAS DB

{% stepper %}
{% step %}

### Create a read-only database user

Create a PostgreSQL user for OctoXLabs on the OpenVAS database. Grant it Read, Select and List privileges.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter     | Required | Type    | Default | Description                                               |
| ------------- | -------- | ------- | ------- | --------------------------------------------------------- |
| IP            | Yes      | String  |         | IP address of the OpenVAS host.                           |
| Port          | No       | Integer | 5432    | Database port.                                            |
| Domain        | No       | String  |         | Domain FQDN. If set, the login becomes `domain\username`. |
| Database      | Yes      | String  |         | Name of the database.                                     |
| Username      | Yes      | String  |         | Database user.                                            |
| Password      | Yes      | String  |         | Password of the user.                                     |
| Query Timeout | No       | Integer | 60      | Seconds before a query is stopped.                        |

## Troubleshooting

| Error message           | Cause                             | Fix                                                                                              |
| ----------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------ |
| Curser Failed Execute : | The query failed on the database. | Check that the user can read `results` and `nvts`, and raise Query Timeout if the query is slow. |

## Change history
