Skip to main content

More Info:

Enable vulnerability scanning on images stored in GCR or Artifact Registry so known CVEs in container images are surfaced. Scanning helps prevent deploying images with exploitable vulnerabilities.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS GKE

Triage and Remediation

Remediation

Manual Steps

  1. On any machine with gcloud configured to the target project, enable Container Analysis API (for GCR images):
  2. On the same machine, enable Container Scanning API (for Artifact Registry images):
  3. (Optional console check for GCR) In a browser, open:
  4. (Optional console check for Artifact Registry) In a browser, open:
  5. Verify that vulnerability scanning is enabled via API on the same machine with gcloud:
kubectl cannot enable image vulnerability scanning because this setting is configured at the Google Cloud project level (GCR/Artifact Registry APIs), not on Kubernetes API objects. To remediate this finding, make the changes in the Google Cloud Console or via gcloud as described in the Manual Steps section.