> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/application-security/code-security/ide/jetbrains.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# JetBrains

Scan code for policy violations in JetBrains IDEs before you commit.

Integrate the Cortex AppSec code security plugin with your JetBrains IDE instance to enhance security during development. The plugin scans for security policy violations using both default and custom policies, allowing you to identify and resolve issues before committing code, reducing the risk of pull request failures due to undetected problems.

{% hint style="info" %}

### Note

The Cortex AppSec code security plugin supports all JetBrains products.
{% endhint %}

## Supported scan categories

The plugin scans these code security categories:

* **Secrets**: Identifies sensitive data embedded in code, such as API keys, encryption keys, OAuth tokens, certificates, PEM files, passwords, and pass-phrases
* **IaC misconfigurations** in IaC templates such as Kubernetes and Terraform. For a list of supported IaC frameworks, see [Supported frameworks and languages](https://cortex-docs.paloaltonetworks.com/application-security/code-security/code-security-assets/infrastructure-as-code-iac-resources-as-assets/supported-frameworks-and-languages.md)
* **SCA vulnerabilities**: Includes security issues in both direct and transitive open-source dependencies
* **Licenses**: Software license mis-compliance
* **Package Integrity**: Assesses the operational risk and potential impact of each package in your codebase

## Prerequisites and system requirements

Before you begin, ensure these requirements are met:

* **License:** Cortex Cloud base license with the Application Security add-on
* **Supported architectures**: macOS arm64 and x64; Windows x64
* **Environment setup**
  * **macOS** and **Windows**: Install [Python](https://www.python.org/downloads/) versions `3.9.x` to `3.14.x`
  * Install `Node.js version 22` and above for SCA scans (such as vulnerabilities scans)
* **Permissions**: **CLI Read only** permissions. Refer to [Cortex CLI](https://cortex-docs.paloaltonetworks.com/cortex-xsiam/reference-and-developer-docs/about-cortex-cli.md) for more information about permissions
* **API key and URL**: Generate an API access key and retrieve your URL for authentication. See [Retrieve your API key and URL](#retrieve-your-api-key-and-url)
* **Supported frameworks**: All frameworks that Cortex Cloud Application Security supports
* **Limitations**: no mono-repos; no special characters in the user name in a file path; Windows terminal actions run in Command Prompt only, not PowerShell

## Integration steps

### Retrieve your API key and URL

#### Step 1

Generate and copy a Cortex Cloud access key to enable access to Cortex Cloud. The access key includes a key ID and secret:

1. **Navigate to Settings** → **Configurations** → **API Keys (under Integrations)** → **+ New Key**.
2. Copy and save the key.
3. Retrieve your API Key ID from the ID column.

{% hint style="info" %}

### Important

When generating an API key, ensure you select the `Standard` security level. IDE and CLI scans will fail if the security level of the API key is set to Advanced.
{% endhint %}

For more information about API keys, see [Cortex XSIAM API documentation](https://cortex-docs.paloaltonetworks.com/cortex-xsiam/reference-and-developer-docs/api-documentation.md).

For more information about Application Security APIs, refer to the [Application Security API documentation](https://cortex-docs.paloaltonetworks.com/cortex-cloud-api/aspm-cicd-and-application-security/application-security-overview.md).

#### Step 2

**Retrieve your Cortex Cloud API URL**: Navigate to **Settings** → **Configurations** → **API Keys** (under Integration) → click **Copy API URL**.

### Installation

You can install the plugin directly through the JetBrains IDE **Plugins** panel or the JetBrains Marketplace.

* Install through JetBrains IDE: Navigate to **Settings** → **Plugins** → select the **Marketplace** tab → search for **Cortex Cloud** → **Install** → **OK**
* Install from the JetBrains marketplace:
  1. [Open the marketplace](https://plugins.jetbrains.com/).
  2. Select a platform, search for the **Cortex Cloud** plugin, and click **Get**.
  3. Select **Download** from the Versions tab and then **Got it** in the popup.

### Configure plugin settings

1. In your IDE, select **Settings** → **Tools** → **Cortex Cloud**.
2. In the plugin **Settings** screen, fill in these fields:
   * **Access Key**: Your Cortex Cloud API key ID
   * **Secret Key**: Your Cortex Cloud API secret key
   * **Cortex Cloud URL**: Your Cortex Cloud URL.

     <div data-gb-custom-block data-tag="hint" data-style="warning" class="hint hint-warning"><h3>Danger</h3><p>You must insert your <strong>API key</strong> and <strong>API ID</strong> values into the <strong>Settings</strong> before providing the tenant <strong>URL</strong>.</p></div>
   * **CA-Certificate** (optional): Add your CA certificate. Format: `.pem` file

     Example 2. Example

     * **macOS/Linux**: `/Users/your_username/Documents/cacert.pem or ~/Documents/cacert.pem`
     * **Windows**: `C:\Users\your_username\Documents\cacert.pem`
   * **CLI Version**: Leave blank to use the latest Cortex Cloud Application Security version (or enter 'latest'), or specify a version
   * **CLI Path**: Specifies the path to the CLI executable. Recommended: Leave empty to let the extension manage the CLI installation
   * **Ignore gitignore files**: Selected by default. Files that belongs to paths included in the `• gitignore` file will not be scanned when opened or saved
   * **External Checks Directory**: Provide the path to a folder containing custom security checks
   * **Custom Environment Variables**: Environment variables passed to the scanner during scans such as `CORTEX_API_BASE_URL`:
     * To add variables, provide the key/value pairs in the table under the **Custom Environment Variables** field
     * To remove variables, select the (**—**) sign
3. Click **Apply** → **OK**.

### Test connection

You can test your connection by selecting the **Test Connection** field under **Settings**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/application-security/code-security/ide/jetbrains.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
