Core Exercises (Required)
- Sign an Image: Use
cosignto sign a test image from your registry. Verify the signature locally. - Audit Drill: Apply an image verification policy in
Auditmode. Push an unsigned image and find the violation in the cluster events or Kyverno reports. - Enforce Drill: Switch the policy to
Enforcemode. Attempt to deploy the unsigned image and document the admission rejection message. - SBOM Check: Generate an SBOM for your
backendapplication and verify that it matches the digest of the running image.
Challenge Exercise (Optional)
Full SBOM Attestation Chain: Generate an SBOM for the backend container image, sign it with cosign, and verify the attestation at admission time. Document the full trust chain from build to cluster entry.
Done When
You have completed this chapter when:
- You can explain why “build once, promote many” is required for provenance.
- You have successfully signed and attested a container image.
- You have demonstrated policy behavior in both
AuditandEnforcemodes. - You can handle an untrusted artifact denial without disabling your security guardrails.
- You can prove artifact identity using digest-level evidence.
Knowledge Check
Before finishing this chapter, complete the Quiz to verify your understanding of the guardrail principles.