> 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-one.md).

# Checkmarx One

Checkmarx One is a cloud application security platform that combines SAST, SCA and other scanners. OctoXLabs reads the platform users and the scanned projects and adds them to the user and source code inventories.

## Use cases

* **Find Checkmarx One users with no directory account.** List Checkmarx One users that are not found in Active Directory. How accounts are matched depends on your user merge settings.

```
Adapters = checkmarx-one AND NOT Adapters = active-directory
```

* **Review scanned repositories.** List the projects that Checkmarx One scans and check their default branch.

```
Adapters = checkmarx-one AND DefaultBranch = *
```

## 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`. 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 projects, 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. Reading users uses the access management API, which may need additional rights. Not verified.

## Create credentials in Checkmarx One

{% 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. The current user's email is included by default.
{% 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 | 20        | Records per request. Advanced option.                                                                                       |
| Port           | No       | Integer | 443       | Port number. Advanced option.                                                                                               |
| Scan Status    | No       | String  | Completed | Status filter for the latest scan of each project. Advanced option.                                                         |
| Engine         | No       | List    | sast      | Scan engines whose results are used. Allowed values: sast, sca, kics, apisec. Several values are accepted. 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 fetch project IDs. Potential issue with the response type. Please contact the development team. | A project in the response has no `id`. | 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.0.
{% endhint %}
