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

GitLab

Integrate Prisma Cloud with your GitLab version control system (VCS) to gain visibility into, and monitor the systems, technologies, configurations, and pipelines that make up the GitLab platform.

This integration enables security scans to identify Infrastructure-as-Code (IaC) misconfigurations, Software Composition Analysis (SCA) vulnerabilities, exposed secrets, license mis-compliance and CI/CD pipeline risks in your GitLab environment, allowing you to understand and fix issues as soon as they are detected, resulting in an enhanced security posture for your organization.

The GitLab integration creates a webhook that triggers periodic scans of your code. These scans run on all pull requests (PRs), and their results are displayed in both the PR comments and reports.

Refer to Subscribed Events below for a list of subscribed events for which the integration is subscribed to.

  1. Before you begin.

    1. Grant the Prisma Cloud user the necessary permissions for integrating Prisma Cloud with your GitLab VCS, as specified in User Permissions below.

    2. Add the Prisma Cloud IP addresses and hostname for Application Security to an allow list to enable access to the Prisma Cloud Console.

  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 GitLab (under Code Repositories) in the catalog that is displayed.

      connect provider
    3. Select Authorize in the Configure Account step of the integration wizard that is displayed.

      You are redirected to GitLab to authorize Prisma Cloud access.

      gitlab auth1.1
  3. On GitLab, review the requested permissions > Authorize.

    You are redirected to the Select Repositories step of the installation wizard on the Prisma Cloud console.

    gitlab select repos
  4. Select which repositories will be scanned:

    • Permit all existing repositories

    • Permit all existing and future repositories

      This is the recommended option to ensure complete coverage and successful operation of all features.

    • Choose from repository list > select repositories

  5. Select Next > Done in the Status step of the wizard to complete the integration.

  6. Verify integration.

    1. In Application Security, select Home > Settings > Code & Build Providers.

    2. Confirm that the status of the integrated GitLab repositories displays Connected under Status.

      It may take up to 3 minutes for the integration status to be updated.

  7. Next step: Monitor and manage scan results.

    • View your selected GitLab repositories on the Repositories page. The next GitLab scan will include these repositories

    • To view scan results and resolve issues, in Application Security select Home > Projects. See Monitor and Manage Code Build Issues for more information

Support for Multiple Integrations

Prisma Cloud supports multiple integrations for GitLab. After the initial integration with Prisma Cloud, you can continue to add additional organizations and workspaces using a different or a same user or team token.

Multiple integrations from a single Prisma Cloud account enables you to:

  • View a list of integrations on a single console

  • Add additional integrations

  • Delete an existing integration

Selecting a repository for a specific integration will restrict you from selecting the same repository in another integration.

  1. In Application Security, select Home > Settings > Connect Provider > Code & Build Providers > GitLab (under Code Repositories).

  2. Select Add Integration in the wizard.

  3. Execute the GitLab installation process above.

  4. Next step: Monitor and manage scan results - see above.

Manage Integrations

Manage integrations from the integration wizard.

  1. Access the GitLab integration wizard on Prisma Cloud console - see the integration process above > select the menu under Actions.

  2. From Actions you can:

    • Add or remove repositories from Reselect repositories

    • Delete integrations

User Permissions

Authorize the user integrating Prisma Cloud with your GitLab instance with the following permissions.

  • Maintainer permissions. Grants sufficient permissions to configure external integrations, manage repository access, and adjust CI/CD settings

  • api: Grants full read and write access to the API, including all groups and projects, as well as permissions to interact with the container registry, the dependency proxy, and the package registry

  • Administrator repository permissions: In order to scan pull requests (PRs), the user performing the integration must have administrative privileges for the repositories. This enables Prisma Cloud to set up subscription webhooks for the selected repositories

A repository can only be integrated with a single integration at a time. The first integration that connects with the repository will be the one it is assigned to. This means that if multiple integrations attempt to connect to the same repository, only the first integration to establish the connection will be associated with that repository.

Subscribed Events

Below is a comprehensive list of events to which Prisma Cloud is subscribed. These events encompass various actions and changes occurring within your GitLab environment that trigger notifications and integrations with Prisma Cloud:

Projects:

  • merge_requests_events: This event is triggered when merge or pull requests are created, updated, merged, closed, or have changes made to them

  • push_events: This event occurs whenever code changes are pushed to a repository, indicating new commits being added to the version control history

  • tag_push_events: This event is triggered when new tags are pushed to a repository

  • note_events: This event is generated when comments or notes are added to various objects within GitLab, such as issues, merge requests, or commits

  • confidential_note_events: Similar to note_events, but specifically for confidential comments or notes that are restricted to certain users or groups

  • issues_events: This event is triggered when issues are created, updated, closed, or have changes made to them

  • confidential_issues_events: Similar to issues_events, but specifically for confidential issues that are restricted to certain users or groups

  • job_events: This event occurs when jobs defined in CI/CD pipelines are created, updated, started, finished, or have changes made to them

  • pipeline_events: This event is generated when pipelines are created, updated, started, finished, or have changes made to them

  • wiki_page_events: This event occurs when changes are made to wiki pages within GitLab, including creation, updates, and deletions

  • deployment_events: This event is triggered when deployments are created, updated, started, finished, or have changes made to them

  • releases_events: This event occurs when releases are created, updated, published, or have changes made to them

Groups:

  • subgroup_events: This event is specific to GitLab groups and occurs when changes are made to subgroups within a group hierarchy

Last updated

Was this helpful?