`cosign verify` fails with `Error: no matching signatures` for an image CI says it signed
BeginnerTroubleshootingSupply chain: signing, SBOM and dependencies
Answer
Likely causes → CI signed a different digest (the tag was re-pushed after signing), signed a per-platform manifest while you verify the index, or pushed the signature to a different repo (COSIGN_REPOSITORY).
Diagnose →
crane digest ghcr.io/acme/api:1.4
cosign tree ghcr.io/acme/api:1.4
cosign triangulate ghcr.io/acme/api:1.4 # where cosign looks for the .sig
Fix → Sign by digest straight after push using the digest output of the build step:
cosign sign --yes ghcr.io/acme/api@${DIGEST}
Verify the same digest.
Prevent → Never sign tags; pass steps.build.outputs.digest through the pipeline and deploy by digest.
More on Supply chain: signing, SBOM and dependencies
Keyless `cosign verify` fails: `none of the expected identities matched what was in the certificate`Intermediate`cosign sign` in GitHub Actions fails with `getting signer: getting key from Fulcio: ... no OIDC token`BeginnerKey-based `cosign verify --key cosign.pub` fails after a key rotation for older imagesIntermediate`cosign verify-attestation --type cyclonedx` returns `none of the attestations matched the predicate type`IntermediateKyverno `verifyImages` rejects pods: `failed to verify image ... : no signatures found` for a signed private ECR imageAdvancedAfter enabling signature verification, pods fail because the manifest uses `image: api:1.4` and the policy mutates it to a digest the registry rejectsAdvanced