Unsigned Container Images
Every gate passed. None checked the base image.
What Is Unsigned Container Images?
Scans and tests validate what a pipeline builds, not that the image which runs is the one it produced, unless a signature binds the two. You'll replace a base image in a shared build cache so a routine rebuild ships a backdoor through every green gate, then verify the running image is unsigned, switch a warn-only signature policy to enforce, and prove the cluster refuses any pos image it cannot trace to CI. Maps to OWASP Kubernetes Top Ten supply-chain guidance (2022 K02), enforced at admission.
What You'll Learn in Unsigned Container Images
- Explain why pipeline scans do not establish image provenance.
- Verify an image signature with cosign against a known key.
- Enforce signature verification at admission with a ClusterImagePolicy.
- Distinguish warn mode from enforce, and extend signing to base images.
Unsigned Container Images — Training Steps
-
A base image everyone trusts
Bob compromised a build cache server Haldrenne shares across teams, through an unpatched CI plugin. He cannot reach the production cluster or its pipeline. He looks at what the pipeline pulls when it builds. Haldrenne processes card payments for shops. Its terminal gateway runs in Kubernetes and clears every transaction.
-
Replace the cached layer
Bob pushes a base image with an extra layer that copies card data to a host he controls, under the tag the pipeline pulls. He signs nothing; the pipeline never checked signatures.
-
Wait for a rebuild
A week later, the pos-gateway team ships a routine change. Their pipeline rebuilds FROM pos/base:3.19, runs every scan and test green, and deploys. Bob checks his collection host.
-
Check your understanding
-
The gateway is calling out
Haldrenne's security team sees pos-gateway pods making outbound connections to an unknown host and traces it to an unexpected image layer.
-
Confirm the image is unsigned
Alice checks whether the running gateway image carries a valid Haldrenne signature.
-
Open the image policy
Haldrenne already has a signature policy. Alice opens it.
-
A policy that only warns
The policy names the pos images and the CI key correctly. Its mode is the problem.
-
Enforce the signature
Alice switches the policy from warn to enforce. From now on, admission rejects any pos image without a valid Haldrenne CI signature.
-
Apply the policy
Alice applies the enforcing policy.
Security Framework Coverage
CWE
- CWE-494 Download of Code Without Integrity Check
- CWE-347 Improper Verification of Cryptographic Signature
MITRE ATT&CK
- T1525 Implant Internal Image
- T1195.002 Supply Chain Compromise: Compromise Software Supply Chain
CIS Controls
- CIS 2 Inventory and Control of Software Assets
- CIS 4 Secure Configuration of Enterprise Assets and Software
NIST CSF
- PR.AT-02 Individuals in specialized roles are provided with awareness and training so that they possess the knowledge and skills to perform relevant tasks with cybersecurity risks in mind
- ID.AM Asset Management
- PR.PS Platform Security
NICE Framework
- IO-WRL-005 Systems Administration
- DD-WRL-001 Cybersecurity Architecture