Gitlab Self-managed
Integrate Prisma Cloud with your GitLab Self-managed version control system (VCS) to gain visibility into, and monitor the systems, technologies, configurations, and pipelines that make up the GitLab self-managed 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 Self-managed 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.
Before you begin.
Grant the Prisma Cloud user the necessary permissions for integrating Prisma Cloud with your GitLab Self-managed VCS, as specified in User Permissions below.
Add the Prisma Cloud IP addresses and hostname for Application Security to an allow list to enable access to the Prisma Cloud Console.
Ensure the use of the default port 443 for the integration.
Provide a hostname or IP address that can be resolved on the public DNS.
On the Prisma Cloud Application Security console.
In Application Security, select Home > Settings > Connect Provider > Code & Build Providers.

Select GitLab Self-managed (under Code Repositories) in the catalog that is displayed.

The Configure Domain step of the integration wizard (wizard) is displayed.
Enter your domain or IP address in the Configure Domain step of the installation wizard> Register.
The domain is the hostname associated with your self-hosted GitLab instance.
The Register OAUTH app step of the wizard is displayed.

Copy the values Application Name and Redirect URL fields > Next.
You are redirected to your GitLab Self-managed instance.
On the GitLab Self-managed console.
Create an application.
Access GitLab Self-Managed > User Settings > Applications.
Paste the copied Application Name and Redirect URL in their respective fields.
Select api as the application scope > Save application.
Copy the generated Application ID and Secret values that are displayed after the application is created.

In the Set Client ID and Secret step of the Prisma Cloud integration wizard.
Paste the generated Application ID and Secret values that you copied above > click Authorize.
The Select Repositories step of the wizard is displayed.
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
Select Next > Done in the Status step of the wizard to complete the integration.
Verify integration.
In Application Security, select Settings > Code & Build Providers.
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.
Next step: Monitor and manage scan results.
View your selected GitLab Self-managed repositories on the Repositories page. The next GitLab Self-managed 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 Self-Managed. After the initial integration with Prisma Cloud, you can continue to add additional organizations and workspaces using a different or the 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.
Add additional integrations to a configured GitLab Self-Managed account.
In Application Security, select Settings > Connect Provider > Code & Build Providers > GitLab Self-managed (under Code Repositories).
Select Add Integration in the wizard.
Execute the installation steps above.
Next step: Monitor and manage scan results - see step 6 of the integration procedure above.
Manage Integrations
Manage integrations from the integration wizard.
Access the GitLab Self-Managed integration wizard - see step 1 of Support for Multiple Integrations above.
Select the menu under Actions.
Select Reselect repositories to add or remove repositories
Select Delete Integration to delete integrations
User Permissions
Authorize the user integrating Prisma Cloud with your GitLab Self-managed 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 Self-managed 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 groupsissues_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 groupsjob_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
System:
repository_update_events: This event occurs whenever there are updates or changes made to a GitLab repository, including actions such as new commits, branch operations, tag updates, and modifications to repository settings
Last updated
Was this helpful?

