Skip to main content

More Info:

Scan images being deployed to Amazon EKS for vulnerabilities.

Risk Level

Medium

Address

Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS Critical Security Controls v8
  • CIS EKS
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • Essential 8
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Manual Steps

  1. Identify node IAM roles used by the cluster
    • On any machine with AWS CLI access and the right permissions, list the nodegroups:
    • For each nodegroup, get its IAM role:
  2. Review current ECR-related permissions on each node IAM role
    • For each NODE_ROLE_ARN from step 1, list inline and attached policies:
    • For each attached or inline policy, view the document:
  3. Assess whether permissions are restricted to read-only ECR actions
    • In each policy document, locate Action entries containing ecr: and verify they are limited to:
      • ecr:BatchCheckLayerAvailability
      • ecr:BatchGetImage
      • ecr:GetDownloadUrlForLayer
      • ecr:GetAuthorizationToken
    • Record any additional ecr:* actions (e.g., ecr:PutImage, ecr:BatchDeleteImage, ecr:*) that go beyond these read-only requirements.
  4. Decide and plan corrections (principle of least privilege)
    • For each role where extra ECR actions are present, decide whether they are truly needed (for example, by CI/CD or admin tooling) or can be removed.
    • If non-read-only ECR actions are needed, consider moving those permissions to a separate IAM principal (e.g., a CI user/role) rather than the node role.
  5. Correct IAM policies to enforce read-only ECR access
    • To attach a dedicated read-only ECR policy to the node role (if missing), create it once:
    • Attach it to each node role:
    • Edit existing inline or customer-managed policies to remove any ECR actions other than the four listed above. For customer-managed policies, update the policy document and create a new version:
  6. Verify resulting permissions
    • Re-fetch each node role’s effective ECR permissions and confirm that the only remaining ecr: actions are:
      ecr:BatchCheckLayerAvailability, ecr:BatchGetImage, ecr:GetDownloadUrlForLayer, and ecr:GetAuthorizationToken:
kubectl can’t modify IAM permissions or Amazon ECR access; this configuration is managed in AWS IAM and (optionally) your IaC, not via Kubernetes API objects. To adjust node IAM roles and ECR permissions, follow the guidance in the Manual Steps section using the AWS console/CLI or your infrastructure-as-code tooling.

Additional Reading: