For the complete documentation index, see llms.txt. This page is also available as Markdown.

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 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 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.

      connect provider menu
    2. Select CircleCI (under CI/CD Runs) in the catalog that is displayed.

      connect provider

      The Add Environment Variable step of the integration wizard opens.

      circleci wizard add env var
  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.

      circleci wizard config job2
  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 for more information

Last updated

Was this helpful?