---
updatedAt: 2026-04-09T11:17:01.000Z
agentTools:
  projectIndex: https://docs.kondukto.io/llms.txt
---

# CodeThreat SAST

Invicti ASPM supports **CodeThreat** as a SAST (Static Application Security Testing) scanner. This guide explains how to activate and configure the CodeThreat integration.

CodeThreat is an AI-powered static application security testing tool that provides vulnerability detection and code analysis.

## Prerequisites

Before starting the integration, ensure you have the following information from your CodeThreat account:

| Field             | Description                                                         | Required |
| ----------------- | ------------------------------------------------------------------- | -------- |
| Token             | API token generated from your CodeThreat account                    | Yes      |
| Organization Name | Your organization name in CodeThreat                                | Yes      |
| URL               | Your CodeThreat instance URL (e.g., `https://cloud.codethreat.com`) | Yes      |
| Insecure          | Skip SSL certificate verification (not recommended for production)  | No       |

### How to Get a Token (on CodeThreat Side)

1. Log in to your **CodeThreat** instance.
2. Navigate to **Settings** or **Account** section.
3. Go to **API Tokens** or **Access Management**.
4. Click **Generate New Token**.
5. Copy the generated token and save it securely.

## Step 1: Navigate to Integrations

From the left sidebar menu, click on **Integrations**.

## Step 2: Select the SAST Tab

On the Integrations page, you will see the **Scanners** section with multiple tabs. Click on the **SAST** tab (it is selected by default).

<Image align="center" border={true} src="https://files.readme.io/74b4fa98605ce53b57308b54ac3b2e4ccaca0ae1d7a684658c8c7bf925df2aab-sast-tab_1.png" className="border" />

## Step 3: Find and Activate CodeThreat

Scroll through the list of SAST scanners to find **CodeThreat**.

* If CodeThreat is **not activated**, you will see an **"Activate"** button. Click it to enable the integration.
* If CodeThreat is **already activated**, you will see a toggle switch in the ON position and a **"Deactivate"** button, along with a gear icon for configuration.

  > **Note:** The scan method badge on the CodeThreat card shows **KDT**, which means scans are triggered through the Kondukto CLI tool (KDT).

## Step 4: Configure Connection Settings

Click on the **gear icon** on the CodeThreat card to open the configuration panel. Fill in the required fields:

1. **Token**: Paste the API token you generated from CodeThreat.
2. **Organization Name**: Enter your organization name in CodeThreat.
3. **URL**: Enter your CodeThreat instance URL (e.g., `https://cloud.codethreat.com`).
4. **Insecure**: Enable this checkbox only if your CodeThreat instance uses a self-signed SSL certificate.

   <Image align="center" border={true} src="https://files.readme.io/43b08a0e4d07279c471db5157d8d5a1f515009692bda514451e88db864e24beb-code-threat-settings_1.png" className="border" />

## Step 5: Test the Connection

Click the **"Test Connection"** button at the bottom of the configuration panel to verify that the provided credentials and URL are correct.

* If the connection is successful, the integration is ready to use.
* If the connection fails, verify your Token and URL values.
* For existing integrations, you can use the **"Retest Connection"** button at the top of the panel.

## Step 6: Advanced Settings (Optional)

Click on **"Advanced Settings"** to expand additional options:

| Setting                                  | Description                                                        | Default |
| ---------------------------------------- | ------------------------------------------------------------------ | ------- |
| Allow team leads to scan this instance   | Permits team leads to trigger scans using this CodeThreat instance | Off     |
| Allow team leads to create new instances | Permits team leads to create additional CodeThreat instances       | Off     |

After modifying advanced settings, click **"Save Advanced Settings"** to apply changes.

## Summary

| Step | Action                                                                            |
| ---- | --------------------------------------------------------------------------------- |
| 1    | Navigate to **Integrations** from the sidebar                                     |
| 2    | Select the **SAST** tab under Scanners                                            |
| 3    | Find **CodeThreat** and click **Activate** (if not already active)                |
| 4    | Click the **gear icon** and fill in **Token**, **Organization Name**, and **URL** |
| 5    | Click **Test Connection** to verify                                               |
| 6    | (Optional) Configure **Advanced Settings** for team lead permissions              |

## How to Create a Scan

After activating and configuring Code Threat, you can create scans from your project's scanner settings.

### Navigate to Project Scanners

1. Go to your **Project** page.
2. Click on the **Settings** tab.
3. Select **Scanners** from the left sidebar.

### Add Code Threat Scanner

1. In the scanner type dropdown, select **SAST**.
2. In the scanner dropdown, search for and select **Code Threat**.
3. Click the **Add** button to open the scan configuration drawer.

   <Image align="center" border={true} src="https://files.readme.io/6d42bc8598411d97db6a02e7bc73485c98876d373c8cc16c8f8d2ecb644906ec-code-threat-scan-creation_1.png" className="border" />

### Scan Configuration Fields

| Field       | Description                                    | Required |
| ----------- | ---------------------------------------------- | -------- |
| Environment | Select the environment for the scan (optional) | No       |
| Bind to     | Select the Code Threat project/scan to bind to | Yes      |
| Branch      | Specify the branch to scan                     | No       |
| Meta Data   | Additional metadata for the scan (optional)    | No       |
| Scan Tag    | Tag to identify the scan (optional)            | No       |

### Scheduler

* **Now**: Run the scan immediately after saving.
* **Custom Date**: Schedule the scan for a specific date and time.

### Webhook (Optional)

Enable webhook to trigger scans via actions taken on your application lifecycle management tool:

1. Check the **Trigger scans via actions** checkbox.
2. Select the **Platform** (e.g., GitHub, GitLab, Bitbucket).
3. Click **Generate** to create a **Secret Key** for webhook authentication.

### KDT Command

You can also trigger Code Threat scans from your CI/CD pipeline using KDT:

```bash
kdt scan -p <project_name> -t codethreat -b <branch_name>
```

Click **Save** to create the scan configuration.

## Troubleshooting

### Connection Fails

* **Invalid Token**: Verify the token is correct and has not expired. Generate a new token from the Code Threat dashboard.
* **Wrong Organization Name**: Ensure the Organization Name matches exactly as it appears in your Code Threat account.
* **Incorrect URL**: Verify the URL is correct (e.g., `https://cloud.codethreat.com/` for cloud or your self-hosted URL).
* **SSL Certificate Issues**: If using a self-hosted instance with a self-signed certificate, enable the **Insecure** checkbox.

### Scan Issues

* **Scan Timeout**: Large repositories may take longer to scan. Check the scan status on the Code Threat dashboard.
* **No Results**: Ensure the project language is supported by Code Threat and the repository is accessible.

## Best Practices

* **Use Dedicated API Tokens**: Create a separate token for the Invicti ASPM integration rather than using personal tokens.
* **Rotate Tokens Regularly**: Regenerate API tokens periodically to maintain security.
* **Use HTTPS**: Always use HTTPS for the Code Threat URL, especially for self-hosted instances.
* **Monitor Scan Queue**: Check the Code Threat dashboard for scan queue status if scans appear delayed.

## Limitations

* **Cloud vs. Self-Hosted**: Configuration settings may differ between Code Threat cloud and self-hosted deployments.
* **Language Support**: Code Threat supports a specific set of programming languages. Check their documentation for the latest supported language list.