End-of-Life (EoL)

Scan images on Amazon EC2 Container Registry (ECR)

To scan a repository, Prisma Cloud has to authenticate with ECR using either an IAM user (service account) or IAM role. The minimum permissions policy required is
AmazonEC2ContainerRegistryReadOnly
. It is a managed, predefined policy. AWS managed policies grant the minimum set of permissions required for common use cases so you don’t need to spend a lot of time investigating permissions yourself.
The
AmazonEC2ContainerRegistryReadOnly
permissions policy is currently defined as follows:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ecr:GetAuthorizationToken", "ecr:BatchCheckLayerAvailability", "ecr:GetDownloadUrlForLayer", "ecr:GetRepositoryPolicy", "ecr:DescribeRepositories", "ecr:ListImages", "ecr:DescribeImages", "ecr:BatchGetImage" ], "Resource": "*" } ] }
Prerequisites:
You have installed a Defender somewhere in your environment.
  1. Open Console and go to
    Defend > Vulnerabilities > Registry
    .
  2. Click
    Add registry
    .
  3. In the dialog, enter the following information:
    1. In
      Version
      , select
      Amazon EC2 Container Registry
      .
    2. In
      Registry
      , enter the URL for the registry.
    3. In
      Repository
      , enter the name of the repository to scan.
    4. In the
      Tag
      field, enter an image tag. Leave this field blank to scan all tags.
    5. Configure how Prisma Cloud authenticates with AWS. You can use an IAM user, IAM role, or AWS STS.
      To authenticate with an IAM role, set
      Use IAM role
      to
      On
      .
      To authenticate with an IAM user, click
      Add new
      in the
      Credential
      drop-down list, and create a new AWS credential with an access key ID and secret access key.
    6. In
      OS type
      , specify whether the repo holds
      Linux
      or
      Windows
      images.
    7. In
      Scanner
      , select
      Automatic
      .
      Console automatically selects an available Defender to execute the scan job. Alternatively, you can explicitly select a Defender from the drop-down list. Defenders are listed according to the hosts where they run. For more information, see deployment patterns.
    8. In
      Number of scanners
      , enter the number of Defenders across which scan jobs can be distributed.
    9. Set
      Cap
      to the number of most recent images to scan. Leaving
      Cap
      set to
      5
      will scan the 5 most recent images. Setting this field to
      0
      will scan all images.
    10. Click
      Add
      .
  4. Click the yellow save button.
  5. Verify that the images in the repository are being scanned.
    1. Go to
      Monitor > Vulnerabilities > Images > Registries
      .
      A progress indicator at the top right of the window shows the status of the current scan. As the scan of each image is completed, its findings are added to the results table.
    2. To get details about the vulnerabilities in an image, click on it.
      To force a specific repository to be scanned again, select
      Scan
      from the top right of the results table, then click on the specific registry to rescan.

Recommended For You