Software Bill of Materials (SBOM) provide details on the composition of a given container image and may be represented in a couple different standards. Having an SBOM can be important to ensuring images are built using verified processes. This policy verifies that an image has an SBOM in CycloneDX format and was signed by the expected subject and issuer when produced through GitHub Actions and using Cosign's keyless signing. It requires configuration based upon your own values.
apiVersion: kyverno.io/v1kind: ClusterPolicymetadata:name: verify-sbom-cyclonedxannotations:policies.kyverno.io/title: Verify CycloneDX SBOM (Keyless)policies.kyverno.io/category: Software Supply Chain Securitypolicies.kyverno.io/severity: mediumpolicies.kyverno.io/subject: Podpolicies.kyverno.io/minversion: 1.8.3kyverno.io/kyverno-version: 1.9.0kyverno.io/kubernetes-version: "1.24"policies.kyverno.io/description: Software Bill of Materials (SBOM) provide details on the composition of a given container image and may be represented in a couple different standards. Having an SBOM can be important to ensuring images are built using verified processes. This policy verifies that an image has an SBOM in CycloneDX format and was signed by the expected subject and issuer when produced through GitHub Actions and using Cosign's keyless signing. It requires configuration based upon your own values.spec:validationFailureAction: AuditwebhookTimeoutSeconds: 30rules:- name: check-sbommatch:any:- resources:kinds:- PodverifyImages:- imageReferences:- myreg.org/path/repo:*attestations:- predicateType: https://cyclonedx.org/schemaattestors:- entries:- keyless:subject: mysubjectissuer: https://token.actions.githubusercontent.comrekor:url: https://rekor.sigstore.devconditions:- all:- key: "{{ Data.bomFormat }}"operator: Equalsvalue: CycloneDX
Ensures that container images used to run Flux controllers in the cluster are signed with valid Cosign signatures. Prevents the deployment of untrusted or potentially compromised Flux images. Protects the integrity and security of the Flux deployment process.
A signed bundle is required
A signed bundle is required.