Image signatures and security verification policy
An image signature can bind an artifact identity to a signing key or verified signer identity. A deployment policy determines which signers, artifact subjects and supporting evidence are acceptable. A digest identifies content; it is not proof that the content came from a trusted source.
Worked example
This is an offline lesson. Scenarios are fictional and Docker commands are unexecuted. Any optional execution requires an approved disposable VM, a reviewed preloaded image with verified digest, blocked external access and appropriate resource limits. No host-policy change, real credentials or live scan is required. Keep the exercise offline. Before any separately authorized runtime check, verify the effective daemon, builder, runner or deployment identity as applicable; use synthetic data, reviewed inputs and bounded resources. Record missing evidence as NOT RUN.
Synthetic policy: digest A; trusted signer release-builder; verified signature requiredCandidate A + verified expected signer + current passing scan policy -> eligible for reviewCandidate B + signature for A -> rejectCandidate A + unknown signer -> rejectCandidate A + absent scan evidence -> holdVerify the signature using reviewed tooling such as Cosign, with a trust configuration appropriate to the signing method. For key-based signing, validate the expected trusted key; for identity-based signing, validate expected identity and issuer plus applicable verification evidence. Verify the signed subject matches the intended digest, including index versus platform manifest scope. Provenance describes build circumstances; SBOM lists components; a vulnerability report assesses known findings. Each provides different evidence. Apply freshness, remediation and deployment-approval rules separately. The offline Python fixture checks only a simplified checklist using synthetic Boolean values. It cannot verify cryptography, determine actual signer identity, enforce Docker policy or scan an image. The checklist is deliberately restricted to the fictional no-network workload. Its Boolean signature field represents a result from external verification, not a verifier. Require expected key or precise identity and issuer, exact subject and applicable trust evidence; reject broad identity matching that does not represent the policy.
Common mistake
A cryptographically valid signature from an unexpected identity must not satisfy a trust policy. A trusted signature also does not prove the software is free of vulnerabilities.
Manual practice
For the four fictional candidates, explain the review decision. Then run the optional local checklist tests, or reason through them manually, and identify what would still need real verification.
Worksheet: lab-fixtures/docker-container-security/11-signature-policy/scenario.txt.
The synthetic model is in lab-fixtures/docker-container-security/policy-model/. Use it for reasoning practice only, not as an actual security control.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Image signatures and security verification policy — Knowledge check
Apply defensive container security reasoning in a fictional scenario.
Does a matching digest establish who published the image?
A signature is valid but belongs to an unexpected signer. What now?
What does the supplied offline Boolean checklist actually test, rather than enforce?