> For the complete documentation index, see [llms.txt](https://docs.prismacloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prismacloud.io/content-collections/application-security/get-started/connect-code-and-build-providers/ci-cd-runs/add-circleci.md).

# CircleCI

Integrate Prisma Cloud with your CircleCI system to allow dynamic, automated, and context-specific scans within your development workflow. This includes continuous scanning of your workflow whenever changes are pushed or triggered, integrating security checks, and catching issues as soon as they are introduced. Additionally, it automates shift-left actions such as notifying developers or creating tickets, based on scan results.

1. Before you begin.
   1. [Generate and copy the Prisma Cloud access key](/content-collections/administration/create-access-keys.md) to enable access to Prisma Cloud. The access key includes a key ID and secret.
   2. Add the Prisma Cloud IP addresses and hostname for Application Security to an [allow list](/content-collections/get-started/console-prerequisites.md) to enable access to the Prisma Cloud Console
   3. Grant the Prisma user integrating Prisma Cloud with CircleCI **Administrator** user permissions.
2. On the Prisma Cloud Application Security console.
   1. In Application Security, select **Home** > **Settings** > **Connect Provider** > **Code & Build Providers**.

      <figure><img src="/files/XKnsAzR4JSx7Q1BGkVMp" alt="connect provider menu"><figcaption></figcaption></figure>
   2. Select **CircleCI** (under CI/CD Runs) in the catalog that is displayed.

      <figure><img src="/files/LSFiWuVPnPC2pbtFdyTL" alt="connect provider"><figcaption></figcaption></figure>

      The **Add Environment Variable** step of the integration wizard opens.

      <figure><img src="/files/Y2x1FhWA1jUSPwmPdpsE" alt="circleci wizard add env var"><figcaption></figcaption></figure>
3. Add the Prisma Cloud access key to your CircleCI Secrets as an environment variable.
   1. Copy the Prisma access key name from the **Name** field.
   2. Copy the Prisma Cloud Access key ID and secret.

      Access key format: `PRISMA_ACCESS_KEY::PRISMA_SECRET_KEY`.
   3. In CircleCI: Locate the file for storing environment variables in your settings and create a variable by pasting the copied values into the provided fields and following any additional prompts or steps presented by CircleCI to finalize the creation of the environment variable.

      For more on CircleCI environment variables refer to <https://circleci.com/docs/env-vars/>.
   4. Click **Next**.

      The **Configure Job** step of the integration wizard is displayed.

      <figure><img src="/files/IH7fnQ4ef0NZ0x4EXejE" alt="circleci wizard config job2"><figcaption></figcaption></figure>
4. Modify your **.circleci/config.yaml** file using the following code, and select **Done**.

   The `prisma-api-url` value in the example code is environment-specific. Therefore, replace the value with the appropriate value for your environment.

   ```
   version: 2.1
   orbs:
     bridgecrew: bridgecrew/bridgecrew@1.0.5
   jobs:
     build:
       executor: checkov/default
       steps:
         - checkout
         - checkov/scan:
             directory: .
             api-key-variable: BC_API_KEY
             prisma-api-url: https://api2.prismacloud.io
   ```
5. Verify integration: In **Application Security**, select **Home** > **Settings** > **CI/CD Runs** tab.

   Your integrated CircleCI repositories will be displayed. You may have to wait for up to three minutes before the status of the integration is updated.
6. Next step: Monitor and manage scan results.
   * The next CircleCI scan will automatically include the selected repositories
   * To view scan results and resolve issues, in **Application Security** select **Home** > **Projects**. See [Monitor and Manage Code Build Issues](https://github.com/PaloAltoNetworks/pc-docs-md/tree/main/enterprise-edition/content-collections/application-security/risk-management/monitor-and-manage-code-build/monitor-and-manage-code-build.md) for more information


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.prismacloud.io/content-collections/application-security/get-started/connect-code-and-build-providers/ci-cd-runs/add-circleci.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
