Pcornel
Security · Container Security

Image Security

Cheat sheet · https://pcornel.dk/topic.php?topic=5037

Back to the Topic

Answer

Image security means building containers from minimal, trusted, pinned base images, keeping them patched, avoiding secrets in layers and signing images so only verified ones are deployed.

Remember

  • Pin base images by digest.
  • Use multi-stage builds to keep images small.
  • Sign images.

First checks

  • Base image policy (minimal/distroless) — attack surface
  • cosign verify <image> — signature
  • syft <image> -o table — SBOM contents

Commands

docker history

Verify in this order

Dockerfile → build → scan → sign → registry

Where it usually breaks

First mismatch in platform/workload identity → desired configuration → management/control plane → runtime enforcement → telemetry → workload/resource outcome; preserve identity/policy/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5037

Confirmation

Confirm action

Continue?