Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which AWS Permissions are needed to see ECR Enhanced Image Scan Findings

I recently enabled Enhanced Image Scanning for one of my ECR repositories on AWS.

My user can see the images in the repository and next to each image there is a "See findings" link. When I click on the link, another page opens that shows all the findings of that image.

I am trying to give permission to another IAM user to see these findings. That user already can see the repository and the images. The user can even see the "See findings" link for each image. Clicking on that link opens the new page as expected but the page is empty. It says "No scan Findings"

enter image description here

I gave the user all ECR List and Read permissions as below:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "ecr:GetRegistryPolicy",
                "ecr:DescribeImageScanFindings",
                "ecr:GetLifecyclePolicyPreview",
                "ecr:GetDownloadUrlForLayer",
                "ecr:DescribeRegistry",
                "ecr:DescribePullThroughCacheRules",
                "ecr:DescribeImageReplicationStatus",
                "ecr:GetAuthorizationToken",
                "ecr:ListTagsForResource",
                "ecr:ListImages",
                "ecr:BatchGetRepositoryScanningConfiguration",
                "ecr:GetRegistryScanningConfiguration",
                "ecr:BatchGetImage",
                "ecr:DescribeImages",
                "ecr:DescribeRepositories",
                "ecr:BatchCheckLayerAvailability",
                "ecr:GetRepositoryPolicy",
                "ecr:GetLifecyclePolicy"
            ],
            "Resource": "*"
        }
    ]
}

Please note that these permissions already include "ecr:DescribeImageScanFindings" yet the user still can't see the findings.

Which IAM permissions should I give this user to make these findings visible?

like image 991
e-mre Avatar asked Oct 19 '25 03:10

e-mre


1 Answers

Solved it by trial and error. Turns out some permissions from inspector and inspector2 services were also needed. Adding the following as an inline policy made the findings visible:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "inspector2:ListCoverageStatistics",
                "inspector2:ListFindings",
                "inspector2:ListFindingAggregations",
                "inspector2:ListCoverage",
                "inspector2:GetFindingsReportStatus",
                "inspector:ListFindings",
                "inspector:DescribeFindings"
            ],
            "Resource": "*"
        }
    ]
}

Please note that my IAM user already had read and list permissions on ECR.

like image 111
e-mre Avatar answered Oct 22 '25 02:10

e-mre



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!