Amazon EC2 Container Registry (ECR)

Scan ECR registries.

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": [ { "Sid": "PrismaCloudComputeECRScanning", "Effect": "Allow", "Action": [ "ecr:BatchCheckLayerAvailability", "ecr:BatchGetImage", "ecr:DescribeImages", "ecr:DescribeRepositories", "ecr:GetAuthorizationToken", "ecr:GetDownloadUrlForLayer", "ecr:GetRepositoryPolicy", "ecr:ListImages" ], "Resource": "*" } ] }
Code copied to clipboard
Unable to copy due to lack of browser support.
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. You can use an IAM user, IAM role, or AWS STS.
    6. In
      OS type
      , specify whether the repo holds
      Linux
      or
      Windows
      images.
    7. 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.
    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
    Save
    button.

Results

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