Security & multi-tenancyLesson 8 of 13
Image and Supply Chain Security
The software supply chain is the whole path from source → dependencies → build → image → deploy. If any one point is compromised, malicious code ships through the normal process. Let's follow one image along this path and see where each check is placed.
Vuln scanNot yet
SignatureNone
Deploy points to-
RequestResponse / reportAppears in a later step
What you will learn
- Where supply chain attacks strike
- What SBOM, scanning and signing each verify
- Why pin by digest instead of tag
- Why signatures matter only if checked at deploy
What each check verifies, and its limits
| Check | What it verifies | Limit |
|---|---|---|
| Vulnerability scan | Whether image packages have known vulnerabilities (CVEs) | Cannot find unknown flaws. Rescan when new vulnerabilities are published |
| SBOM | The full component list of the image | Only a list, not proof of safety |
| Signature | That our build made it and it was not changed | Meaningful only with a policy that verifies at deploy |
| Digest pinning | Exactly which image is deployed | Hard for humans to read. Add a version tag too |
Example: an image registry like Harbor can attach Trivy as a scanner to scan stored images and show the results (CVE ID, package name, installed version, fixed version, severity). Locally you can run the same scan with trivy image <image>.
Try it yourself
kubectl get pods -n <namespace> -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.containerStatuses[*].imageID}{"\n"}{end}' # Digest each Pod actually runs
trivy image --format cyclonedx --output sbom.json <image> # Generate an SBOM
trivy image --severity HIGH,CRITICAL --ignore-unfixed <image> # High severity with a fixed version first
cosign verify --key <cosign.pub> <image> # Who built it, and is it unchanged?
kubectl get validatingwebhookconfigurations # Is a policy verifying signatures at deploy?
Check yourself
Further reading: Images · Harbor docs · Sigstore docs · Trivy