CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Security Specialist

Static Analysis of a Dockerfile

The manifest is the last place to fix a workload's security and the Dockerfile is nearly the first. This guide scans one that looks perfectly ordinary, finds five problems, and shows how three of them are the base-image argument in a different form.

Supply Chain Security Guide 31 of 40 Intermediate

Written against the versions above. `trivy config` scans Dockerfiles with `DS-` rules alongside the `KSV-` rules it applies to manifests, so one binary covers both artefacts.

The cka6001 cluster: one control plane and 2 schedulable workers, on Cilium.
Server NameIP AddressOSRolesCPURAMHDD
CKA6001192.168.0.46Ubuntu 26.04 LTSControl Plane Node (tainted NoSchedule)2 Core4 GB50 GB
CKA6001-NODE01192.168.0.47Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA6001-NODE02192.168.0.48Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

Before you start

  1. The Dockerfile everyone has written

  2. The one that matters most

  3. Fix it and measure again

Official sources