> 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/c/checkmarx-dast.md).

# Checkmarx Dast

Checkmarx DAST is a dynamic security scanner that tests a running application from the outside. OctoXLabs reads the DAST scan environments of your Checkmarx One tenant and adds them to the service inventory.

## Use cases

* **Inventory the applications under DAST testing.** Review all scan environments that Checkmarx DAST reports in the Services inventory.

```
Adapters = checkmarx-dast
```

* **Find environments whose latest scan did not finish.** Review the deployment status of each environment in the Services inventory. The status comes from the last scan of the chosen Scan Status.

## Before you begin

### Network

| Source              | Destination                               | Port                            | Protocol                           |
| ------------------- | ----------------------------------------- | ------------------------------- | ---------------------------------- |
| OctoXLabs connector | Checkmarx One region host (Url parameter) | 443 by default (Port parameter) | HTTPS (HTTP when Is Secure is off) |

Regional hosts listed in the baseline:

| Region                    | Host                     |
| ------------------------- | ------------------------ |
| US                        | ast.checkmarx.net        |
| US2                       | us.ast.checkmarx.net     |
| EU                        | eu.ast.checkmarx.net     |
| EU2                       | eu-2.ast.checkmarx.net   |
| DEU                       | deu.ast.checkmarx.net    |
| Australia and New Zealand | anz.ast.checkmarx.net    |
| India                     | ind.ast.checkmarx.net    |
| India 2                   | ind-2.ast.checkmarx.net  |
| Singapore                 | sng.ast.checkmarx.net    |
| UAE                       | mea.ast.checkmarx.net    |
| Israel                    | gov-il.ast.checkmarx.net |

Enter the host without `https://`. The connector builds the address as scheme, host, port and the path `/api/dast`. If a proxy is set, requests go through it as `http://<value>`.

### Required permissions

| Scope or role                | Permission                 | Needed for                                   |
| ---------------------------- | -------------------------- | -------------------------------------------- |
| ast-scanner (composite role) | Run scans and view results | Reading DAST environments, scans and results |
| default-roles (IAM role)     | Default access             | Authentication                               |

The API key inherits the roles of the user who creates it. These two roles are the minimum for an end-to-end flow of scanning a project and viewing results.

## Create credentials in Checkmarx DAST

{% stepper %}
{% step %}

### Open API keys

Log in to the Checkmarx One web portal. Select **Settings > Identity and Access Management**, then click **API Keys**.
{% endstep %}

{% step %}

### Create the key

Click **Create Key**. Optionally add a descriptive note, set an expiration period between 30 and 365 days (locked if an administrator enforced a default), and add notification emails for the expiration alert.
{% endstep %}

{% step %}

### Create and copy

Click **Create**. A window shows the key. Copy it and store it securely. After you close the window you cannot see the key again. **Show details** gives a curl command for requesting an access token.
{% endstep %}

{% step %}

### Check the account roles

Make sure the account that creates the key has the roles listed above, because the key inherits them.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter      | Required | Type    | Default  | Description                                                                                           |
| -------------- | -------- | ------- | -------- | ----------------------------------------------------------------------------------------------------- |
| Url            | Yes      | String  | None     | Checkmarx One host for your region, without a scheme.                                                 |
| Json Web Token | Yes      | String  | None     | API key or token sent as a Bearer token. Stored as a sensitive value.                                 |
| Per Page       | No       | Integer | 10       | Records per request. Advanced option.                                                                 |
| Port           | No       | Integer | 443      | Port number. Advanced option.                                                                         |
| Scan Status    | No       | String  | Finished | Status filter for the latest scan of each environment. Advanced option.                               |
| Is Secure      | No       | Boolean | True     | Use HTTPS. Advanced option.                                                                           |
| Timeout        | No       | Integer | 30       | Seconds to wait for an API response. Advanced option.                                                 |
| Proxy          | No       | String  | None     | Proxy address. Advanced option.                                                                       |
| Thread Count   | No       | Integer | 32       | Parallel threads for API requests. Minimum 1, maximum 32. Advanced option.                            |
| Sleep Time     | No       | Integer | 0        | Seconds of delay between thread batches. Raise it if you hit rate limits. Minimum 0. Advanced option. |

## Troubleshooting

| Error message                                                                                           | Cause                                                  | Fix                                                                              |
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ | -------------------------------------------------------------------------------- |
| Failed to environment IDs. Potential issue with the response type. Please contact the development team. | An environment in the response has no `environmentId`. | Contact support with the connector log.                                          |
| Status Code: `, followed by URL, Method and the response body`                                          | The API answered with an error status.                 | Check the key, its roles, the region host and the rate limit (raise Sleep Time). |

## Change history

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