Skip to main content

More Info:

Use Binary Authorization to enforce that only signed, attested container images can be deployed to the cluster. This prevents running untrusted or unverified images.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS GKE

Triage and Remediation

Remediation

Manual Steps

  1. Identify current Binary Authorization status
    • On any machine with gcloud access:
    • Review whether enabled is true and what evaluationMode is set to (DISABLED, PROJECT_SINGLETON_POLICY_ENFORCE, or PROJECT_SINGLETON_POLICY_ALLOW_ALWAYS).
  2. Retrieve and review the current Binary Authorization policy
    • On any machine with gcloud access:
    • Open binauthz-policy.yaml and verify:
      • Required attestors are defined for relevant images/projects.
      • Any admissionWhitelistPatterns are strictly limited and justified.
      • The default rule enforces attestation for images that should be trusted only when signed.
  3. Compare policy against organizational requirements
    • With security and platform owners, confirm:
      • Which registries and image paths are allowed.
      • Which teams/signing keys/attestors must sign images.
      • Any exceptions (e.g., third‑party images) are explicitly listed and documented in the policy rather than broadly whitelisting entire registries.
  4. Update the Binary Authorization policy as needed
    • Edit binauthz-policy.yaml to:
      • Add/remove attestors and adjust admission rules so only properly signed images are allowed.
      • Tighten or remove unnecessary whitelist patterns.
    • Import the updated policy:
  5. Enable or strengthen Binary Authorization on the cluster
    • Choose an appropriate evaluation mode (typically PROJECT_SINGLETON_POLICY_ENFORCE for full enforcement after testing):
    • For staged rollout, you may temporarily use PROJECT_SINGLETON_POLICY_ALLOW_ALWAYS to log decisions before enforcing.
  6. Verify configuration and perform a deployment test
    • Re‑check cluster configuration:
    • Attempt to deploy:
      • One unsigned image that should be blocked (confirm admission is denied).
      • One properly signed/attested image (confirm admission is allowed).
kubectl cannot configure Binary Authorization or enforce trusted images because this control is managed at the GKE control-plane / cloud-provider level. To enable and configure Binary Authorization, make the changes via the Google Cloud console, gcloud CLI, or IaC as described in the Manual Steps section.
How to interpret output (what indicates a problem)
  • For a cluster, any of the following indicate a potential finding for “only trusted container images are used”:
    • .binaryAuthorization is {} or null.
    • evaluationMode is DISABLED, NOT_SET, or missing.
    • The script prints: WARNING: Binary Authorization is NOT enforced on this cluster.
  • At the project level:
    • If No Binary Authorization policy configured for project is shown, clusters cannot enforce a meaningful Binary Authorization policy and should be reviewed and fixed via the cloud console/CLI/IaC.