AWS ECR Repository or Registry Policy Granted Public Access
Detects when an Amazon ECR repository or registry policy is modified to grant public access using a wildcard principal (Principal:"*") statement. This rule analyzes SetRepositoryPolicy and PutRegistryPolicy events…
Description
Detects when an Amazon ECR repository or registry policy is modified to grant public access using a wildcard principal (Principal:"*") statement. This rule analyzes SetRepositoryPolicy and PutRegistryPolicy events whose policy document grants an Allow effect to a wildcard ("*") principal, indicating that pull (and potentially push) permissions were extended to all identities, including unauthenticated users. A public container registry can expose proprietary images and any secrets baked into their layers, and, if push is allowed, enables supply-chain implantation. Public ECR access is sometimes intentional for image distribution, so the granting principal and the permissions should be validated.
Detection logic
Its licence does not clear it for publishing here
Sunturai publishes a detection's own text where the licence it arrived under has been reviewed and permits it, and Elastic License 2.0 has not. The query as its source wrote it, its canonical form and the hash that pins this revision are in the workspace record.
Detection requirements
- Platform
- IaaSOffice SuiteSaaS
The rule states no platform. This is derived from the ATT&CK technique it maps to.
Known benign triggers
- Repositories used to distribute public images may legitimately contain Principal:"*". This rule does not by itself determine whether a Deny statement restricts the same access; review the full policy in "aws.cloudtrail.request_parameters" and confirm the granted actions (pull-only versus push) and whether public exposure is intended.
MITRE ATT&CK mappings
0 exclusive techniques.This is coverage no other published rule has; it is not this rule's total technique count.
References
| Reference | Cited by |
|---|---|
| docs.aws.amazon.com/AmazonECR/latest/APIReference/API_SetRepositoryPolicy.html | Only this detection cites it |
| docs.aws.amazon.com/AmazonECR/latest/userguide/repository-policies.html | Only this detection cites it |
From the source
- At source
- Open at source
- Upstream identifier
- 699fdfb9-8430-4dcb-b5a9-da67dae64808
- Tagged by the source as
- Data Source: Amazon Web ServicesData Source: AWSData Source: AWS ECRDomain: CloudNoise: UnknownPerformance: FastPlatform: AWSResources: Investigation GuideRule Type: ES|QLTactic: ExfiltrationUse Case: Threat Detection
Licence
- Published under
- Elastic License 2.0Read the licence
- Attribution
- Required
Authorship
- Written by
- Published
- Sep 20, 2026
- Version
- 3