Before you start
- Use a disposable image repository and read access to the image and its signature. Record the fully qualified reference with its SHA-256 digest. Ask the publisher which signing system and identity it uses.
- For keyless Sigstore verification, gather the expected certificate identity and OIDC issuer from your release policy. For Notation, gather the approved certificate chain and trusted signer identity.
Data and access
Sigstore
For a keyless signature, compare the expected certificate identity and issuer with your release policy. A workflow identity may include the repository, workflow path and Git ref. The identity you observed on an image can help diagnose a mismatch. Use the approved identity and issuer to decide which signer is authorized.
Check. You have a digest-pinned image reference and the publisher identity or certificate subject from a trusted source.
Cosign
Replace the placeholders with the identity and issuer in your release policy and the image’s pinned digest. To try a public example, use the signed Cosign image and expected publisher in Sigstore’s installation guide. Change only the expected identity and verify the same digest again.
cosign verify --certificate-identity "$EXPECTED_IDENTITY" \ --certificate-oidc-issuer "$EXPECTED_ISSUER" "$IMAGE_AT_DIGEST"Check. Cosign accepts the pinned image with the correct identity and issuer and fails when only the expected identity changes.
Notation
Install the approved trust store. Import a strict trust policy scoped to the image repository that names the full certificate subject expected from your signer. Verify the same digest against that policy. In disposable configuration, change only the expected subject, then restore it. If a signed digest fails, run notation verify -v to inspect the reason.
notation verify "$IMAGE_AT_DIGEST"Check. Notation says Successfully verified signature with the matching policy. With the wrong subject, verbose output says the signing certificate does not match the trusted identities.
Test the release gate
In a scratch build, require the verification command to succeed before continuing. Run the build on the intended signed digest and an unsigned digest. Check that the unsigned image stops the gate.
Check. A digest with no signature fails the build check. If your publisher sets a signature expiry, also check that a disposable signature fails once it expires.
Check your result
Verification accepts the pinned image from the approved publisher. An unsigned image or a different signer fails the required check in the scratch build.
What we tested
Tested on . Cosign 3.1.4 verified the project’s public GHCR image by digest and rejected a different expected publisher identity. In a disposable Distribution 3.1.2 registry, Notation 1.3.2 accepted the pinned image under a strict trust policy. It rejected a different trusted subject, an unsigned image and an expired signature.
If you get stuck
A signature exists but the image fails the gate
Review the registry and image digest first. Then check the certificate identity and issuer in Cosign, or the repository scope, trusted identity and trust store in Notation.