CI/CD & GitHub Actions (50 Qs)•Part 3: Enterprise Scale, Compliance & Production Hardening (Senior / Staff)
What is SLSA and how do you achieve cryptographically signed provenance with Cosign?
senior LevelCode ExampleData Structures
In Simple Words: SLSA (Supply Chain Levels for Software Artifacts) is a security framework that prevents tampering. Using Sigstore Cosign, your CI pipeline cryptographically signs container images and generates verifiable build attestations:
yaml
- name: Sign container image
run: |
cosign sign --yes \
-a "repo=${{ github.repository }}" \
-a "workflow=${{ github.workflow }}" \
ghcr.io/org/app@${{ steps.build.outputs.digest }}
Production Kubernetes clusters running Kyverno or OPA Gatekeeper reject any container image that lacks a valid cryptographic signature from your GitHub Actions workflow!