Scan Images in GitLab Container Registry
Configure Prisma Cloud to scan your GitLab Container Registry on GitLab without using administrator credentials. You can use GitLab Personal access token method to authenticate Prisma to access the GitLab Container Registry to manage and get a full list of all container registries/images.
Create a New Registry Scan
Prerequisites
Install a Defender somewhere in your environment.
Enable the GitLab Container Registry under your GitLab project settings if it’s not enabled already. See the GitLab administrator documentation to enable GitLab Container Registry across your GitLab instance.
Create a GitLab Personal access token with at least "read_api" scope permission.
Log in to Console, and select Defend > Vulnerabilities > Images > Registry settings.
Select Add registry.

In Add New Registry, enter the following values:
In Version, select GitLab Container Registry.
In Registry, enter your custom domain URL address to scan. If you don’t have a custom GitLab domain, enter the URL as "https://registry.gitlab.com".
In Repository, enter the name of the repository to scan, or leave this blank to scan all repositories.
Optionally enter the Repositories to exclude them from being scanned.
In Repository types, select the repository types that Prisma Cloud should scan.
Enter Tag numbers to scan, leave blank, or enter a wildcard (*) to scan all the tags.
Optionally, enter Tags to exclude, to avoid scanning images with specified tags.
Enter the details for at least one of the fields based on your GitLab configuration:
User ID: GitLab user account. The user ID is used to get all registries associated with the user.
Group ID: Enter a single group ID, or a list of group IDs. The group ID is used to locate all the registries within a specific group.
Project ID: Enter a GitLab Project ID, or a list of project IDs. The project ID is used to locate all the registries located within a specific project.
To trigger a full scan, including all repositories associated with the User ID you provided, enter the User ID.
When you enter all 3 IDs, Prisma Cloud uses the Project ID and the Group ID to query the GitLab registry. The User ID is not used.
When you enter any of the following two choices, the ID used to query is
User ID and Group ID, Prisma Cloud uses the Group ID to query the registry.
User ID and Project ID, the Project ID is used.
Group ID and Project ID, both IDs (AND logic) are used.
Group IDs to exclude - Only top-level groups should be set here. When user set top-level group to exclude, sub-groups will also be excluded.
In Credential, select the GitLab access token credentials that you created in the prerequisites section.
In OS type, specify whether the repo holds Linux or Windows images.
In Scanners scope, specify the collections of Defenders to use for the scan.
Console selects the available Defenders from the scope to execute the scan job according to the Number of scanners setting. For more information, see deployment patterns.
In Number of scanners, enter the number of Defenders across which scan jobs can be distributed.
Set Cap to the number of most recent images to scan. Leaving Cap set to the default value of 5 will scan the most recent 5 images. Setting this field to 0 will scan all images.
Select Add and scan.
Verify that the images in the repository are being scanned under Monitor > Vulnerabilities > Images > Registries.
Last updated
Was this helpful?

