# Only images your own pipeline built and signed, with a signed SBOM attached, # may run in production namespaces. Both are made in GitHub Actions with a # short-lived identity, so there is no signing key to protect. The CI/CD # signals template's supply-chain.yml workflow produces both. # # Starts in Audit. Switch failureAction to Enforce once the policy report shows # every production image passing. --- apiVersion: kyverno.io/v1 kind: ClusterPolicy metadata: name: verify-image-signatures annotations: policies.kyverno.io/description: Images in production must be signed by your organisation's GitHub Actions workflows and carry a signed CycloneDX SBOM. spec: background: false webhookTimeoutSeconds: 30 rules: - name: signed-by-our-pipeline match: any: - resources: kinds: [Pod] namespaces: ["prod-*"] verifyImages: - imageReferences: - "ghcr.io/your-org/*" failureAction: Audit attestors: - entries: - keyless: subject: "https://github.com/your-org/*" issuer: "https://token.actions.githubusercontent.com" rekor: url: https://rekor.sigstore.dev # The SBOM, attached with cosign attest --type cyclonedx and signed by # the same workflow identity. An image without one is reported. attestations: - type: https://cyclonedx.org/bom attestors: - entries: - keyless: subject: "https://github.com/your-org/*" issuer: "https://token.actions.githubusercontent.com" rekor: url: https://rekor.sigstore.dev