Amazon ECR repository policies that use a wildcard * in the Principal field grant public access to your container images, potentially exposing sensitive data or proprietary code. When left unaddressed, this vulnerability allows unauthorized users to pull, and in some cases push, container images, compromising the integrity and confidentiality of your container deployments.
To remediate this issue, specify explicit IAM principals in your repository policies, such as "Principal": { "AWS": "arn:aws:iam::account_number:root" } instead of using "Principal": "*".
Exception: statements that combine a wildcard principal with a Condition that genuinely scopes the caller — such as aws:PrincipalOrgID, aws:PrincipalAccount, or aws:SourceArn — are not flagged, because the condition effectively limits who can invoke the action. Conditions that restrict how (e.g. aws:SecureTransport) or check key presence (e.g. Null) rather than binding the caller’s identity are not considered scoping and the statement is still flagged.