Interview Prep/CI/CD/Supply Chain and Pipeline Security

What is an admission policy for supply chain verification, and how is it set up?

AdvancedProductionSupply Chain and Pipeline Security
Answer

An admission controller rejects pods whose images do not meet policy. With Kyverno, a ClusterPolicy verifies the cosign keyless signature and issuer identity for images from your registry, in Enforce mode after a period in Audit.

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata: { name: verify-image-signatures }
spec:
  validationFailureAction: Enforce
  rules:
    - name: verify-cosign
      match: { any: [{ resources: { kinds: [Pod] } }] }
      verifyImages:
        - imageReferences: ["ghcr.io/acme/*"]
          attestors:
            - entries:
                - keyless:
                    issuer: https://token.actions.githubusercontent.com
                    subject: https://github.com/acme/*/.github/workflows/release.yml@refs/heads/main
                    rekor: { url: https://rekor.sigstore.dev }
All CI/CD questions

More on Supply Chain and Pipeline Security