More Info:
Restrict image pulls to an approved set of container registries so that only vetted, trusted registries can supply container images.Risk Level
MediumAddress
SecurityCompliance Standards
- CIS EKS
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Inventory all registries in use by EKS workloads
- On any machine with kubectl access:
- Extract the image registry domain (before the first
/) from each image and build a unique list of registries currently used by the cluster.
- On any machine with kubectl access:
-
Define and document your approved registry list and criteria
- Outside the cluster (in your security/design docs or IaC repo), write down:
- The approval criteria (security scanning, signing, compliance, network location, etc.).
- The explicit list of approved registries (for example:
*.dkr.ecr.<region>.amazonaws.com,public.ecr.aws/<your-org>, internal mirror domains).
- Store this in version control and treat it as policy.
- Outside the cluster (in your security/design docs or IaC repo), write down:
-
Compare actual registries vs. approved list and decide disposition
- For each registry discovered in step 1:
- If it is not on the approved list, decide whether to:
- Add it to the approved list after review against the criteria, or
- Plan to migrate images away from it and prohibit future use.
- If it is not on the approved list, decide whether to:
- Record decisions per registry (approved / to-be-phased-out / banned) in your documentation.
- For each registry discovered in step 1:
-
Implement enforcement via AWS IAM and ECR configuration
- On any admin machine with AWS CLI configured, restrict ECR access to approved accounts/regions (example for one approved account/region; adjust ARNs/regions as per your policy):
- For external registries (Docker Hub, third‑party, etc.), configure AWS VPC endpoints, private connectivity, or organization policies (e.g., AWS Organizations service control policies) to only allow network egress and credentials for approved registries; remove or tighten any IAM policies that grant
ecr:*or registry logins not aligned with your approval list.
- On any admin machine with AWS CLI configured, restrict ECR access to approved accounts/regions (example for one approved account/region; adjust ARNs/regions as per your policy):
-
Update cluster/IaC to reference only approved registries
- Search your manifests/IaC (helm charts, kustomize, Terraform, CD pipelines) locally:
- For each non‑approved image reference, update the image to one hosted in an approved ECR registry (or other approved registry), then redeploy the workloads through your normal CI/CD process.
- Search your manifests/IaC (helm charts, kustomize, Terraform, CD pipelines) locally:
-
Verify only approved registries are currently used
- After changes deploy, re-run on any machine with kubectl access:
- Confirm that the resulting list of registries matches your approved registry list and that IAM/egress controls prevent pulling from any other registries.
- After changes deploy, re-run on any machine with kubectl access:
Using kubectl
Using kubectl
kubectl cannot be used to restrict image pulls to an approved set of ECR registries because this control is implemented at the cloud provider / managed control plane and IAM level, not via Kubernetes API objects. Make these changes in your AWS console/CLI/IaC as described in the Manual Steps section, then use kubectl only to verify workload image sources if needed.
Automation
Automation
- Any registry in the “Summary: registries in use” section that is not part of your approved ECR list (e.g.,
docker.io,gcr.io, other AWS accounts’ ECRs) is a candidate issue. - If you set
APPROVED_REGEXto your allowed ECR registries, any entries printed under “Found images that do NOT match the approved registry pattern” are using unapproved registries and must be reviewed and either:- Migrated to an approved ECR registry, or
- Explicitly granted an exception as part of your policies and procedures.

