> 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/b/bright-security.md).

# Bright Security

Bright Security (Bright, formerly NeuraLegion) runs dynamic application security tests. OctoXLabs reads the code sources that are linked to your Bright projects and stores them as source code assets.

## Use cases

* List the repositories that Bright projects point to.

```
Adapters = bright-security AND RepositoryName = *
```

* List the default branch of each linked repository.

```
Adapters = bright-security AND DefaultBranch = *
```

## Before you begin

### Network

| Source              | Destination       | Port | Protocol |
| ------------------- | ----------------- | ---- | -------- |
| OctoXLabs connector | app.brightsec.com | 443  | HTTPS    |

### Required permissions

| Scope or role | Permission                                   | Needed for   |
| ------------- | -------------------------------------------- | ------------ |
| projects:read | Read                                         | Projects     |
| issues:read   | Read                                         | Scan issues  |
| org:read      | Read                                         | Organization |
| groups:read   | Read (only if your organization uses groups) | Groups       |

## Create credentials in Bright Security

{% stepper %}
{% step %}

### Open API Keys

Log in to Bright, open **Settings** and select the **API Keys** tab.
{% endstep %}

{% step %}

### Start a key

Click **+ Create API key** and enter a descriptive name, for example `octoxlabs-discovery`.
{% endstep %}

{% step %}

### Set scopes

Select the scopes above and set the **Action types** to **read**.
{% endstep %}

{% step %}

### Optional expiry

Optionally set an expiration date. The key stops working on that date and the discovery then fails, so renew it in time.
{% endstep %}

{% step %}

### Create and copy

Click **Create** and copy the key. It is shown only once.
{% endstep %}

{% step %}

### Prefer an Organization key

Bright has Organization, Project and Personal keys. An Organization key is recommended: it covers every project and is not tied to a person. A Personal key inherits the rights of its owner and a Project key sees one project. With those, results can be silently incomplete.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter    | Required | Type    | Default | Description                                                    |
| ------------ | -------- | ------- | ------- | -------------------------------------------------------------- |
| Api Key      | Yes      | String  |         | Sent as `Authorization: Api-Key <key>`.                        |
| Per Page     | No       | Integer | 100     | Records per request. Min 1.                                    |
| Proxy        | No       | String  |         | Proxy as `host:port`.                                          |
| Timeout      | No       | Integer | 30      | Seconds to wait for API responses.                             |
| Thread Count | No       | Integer | 32      | Parallel threads. Min 1, max 32.                               |
| Sleep Time   | No       | Integer |         | Delay in seconds between thread batches. Empty means no delay. |

## Troubleshooting

| Error message                       | Cause                                                                                                                                  | Fix                                                                                                  |
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Skipping source codes for project : | The code sources of one project could not be read. The adapter skips that project.                                                     | Check that the key can read the project.                                                             |
| Status Code: `, URL, Method`        | The API answered with an unexpected HTTP status. The shared request code raises it and logs the status, URL, method and response body. | Check the URL, the credentials and the permissions listed above, then run the connection test again. |

## Change history

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