Show the commands to sign and verify an image with Cosign.
IntermediateConceptSupply Chain, SBOM, Signing and Image/IaC Scanning
Answer
# sign by digest (keyless in CI)
cosign sign --yes registry.example.com/app@sha256:<digest>
# verify, pinning who is allowed to have signed
cosign verify registry.example.com/app@sha256:<digest> \
--certificate-identity-regexp 'https://github.com/acme/app/.github/workflows/release.yml@refs/tags/.*' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
Always sign and verify the digest, never a mutable tag.
More on Supply Chain, SBOM, Signing and Image/IaC Scanning
What is a software supply chain attack? Give examples.BeginnerExplain dependency confusion and typosquatting.IntermediateWhat is an SBOM and why do we need one?BeginnerCycloneDX vs SPDX: how do they differ?IntermediateHow do you generate and use an SBOM with Syft and Grype?BeginnerWhat is VEX?Intermediate