: Scan Images in GitLab Container Registry
Focus
Focus

Scan Images in GitLab Container Registry

Table of Contents

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
  1. Log in to Console, and select
    Defend > Vulnerabilities > Images > Registry settings
    .
  2. Select
    Add registry
    .
  3. In
    Add New Registry
    , enter the following values:
    1. In
      Version
      , select
      GitLab Container Registry
      .
    2. 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".
    3. In
      Repository
      , enter the name of the repository to scan, or leave this blank to scan all repositories.
    4. Optionally enter the
      Repositories to exclude
      them from being scanned.
    5. In
      Repository types
      , select the repository types that Prisma Cloud should scan.
    6. Enter
      Tag
      numbers to scan, leave blank, or enter a wildcard (*) to scan all the tags.
    7. Optionally, enter
      Tags to exclude
      , to avoid scanning images with specified tags.
    8. Enter the details for at least one of the fields based on your GitLab configuration:
      1. User ID
        : GitLab user account. The user ID is used to get all registries associated with the user.
      2. 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.
      3. 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.
    9. 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.
    10. In
      Credential
      , select the GitLab access token credentials that you created in the prerequisites section.
    11. In
      OS type
      , specify whether the repo holds
      Linux
      or
      Windows
      images.
    12. 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.
    13. In
      Number of scanners
      , enter the number of Defenders across which scan jobs can be distributed.
    14. 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.
    15. Select
      Add
      .
  4. Select
    Save and scan
    .
    Verify that the images in the repository are being scanned under
    Monitor > Vulnerabilities > Images > Registries
    .

Recommended For You