Attention Iron Bank Customers: On March 27, 2025, we are moving SBOM artifacts from the Anchore Scan job to the Build job to streamline the container hardening pipeline. If you currently download SBOMs from the Anchore Scan job, you can still get them from the Build job and from other sources, including IBFE and image attestations.
I imagine it won't work unless we get public cert for validation in right? This might still require, testing and validation but great that there is already a policy!
Good point! I forgot to include the link for where the public cert is baked in. I'll get a test environment running with this policy enabled and report back
Enabling on a test environment shows that the policy does work as intended in audit mode. Noting that the policy has failed in each namespace.
Updated to latest version of Kyverno in BB (1.10.3) and am seeing successful scans now:
$kubectl run test-n default --dry-run=server --image=registry1.dso.mil/ironbank/opensource/kubernetes-1.17/kubectl-1.17@sha256:d3ea65a16986ae3d1ce12a2f8d65bf795b26eaca2d8f69b54d595b7ea528b47c --sleep 9999Error from server: admission webhook "mutate.kyverno.svc-fail" denied the request:resource Pod/default/test was blocked due to the following policiesrequire-image-signature: verify-image: | failed to verify image registry1.dso.mil/ironbank/opensource/kubernetes-1.17/kubectl-1.17@sha256:d3ea65a16986ae3d1ce12a2f8d65bf795b26eaca2d8f69b54d595b7ea528b47c: .attestors[0].entries[0].keys: no matching signatures
Setting to Audit mode does work as expected:
$kubectl run test-n logging --dry-run=server --image=registry1.dso.mil/ironbank/opensource/kubernetes-1.17/kubectl-1.17@sha256:d3ea65a16986ae3d1ce12a2f8d65bf795b26eaca2d8f69b54d595b7ea528b47c --sleep 9999Warning: policy require-image-signature.verify-image: unverified image registry1.dso.mil/ironbank/opensource/kubernetes-1.17/kubectl-1.17@sha256:d3ea65a16986ae3d1ce12a2f8d65bf795b26eaca2d8f69b54d595b7ea528b47cpod/test created (server dry run)