Key-based `cosign verify --key cosign.pub` fails after a key rotation for older images
IntermediateTroubleshootingSupply chain: signing, SBOM and dependencies
Answer
Likely causes → Older images were signed with the previous key, and the policy trusts only the new public key.
Diagnose → Verify against both keys; check which signed which digest.
Fix → Trust both public keys during a transition (Kyverno attestors with count: 1 over two key entries), re-sign images still in use with the new key, then remove the old one.
Prevent → Plan rotation with an overlap window, store keys in KMS (cosign sign --key awskms:///alias/cosign), or move to keyless to remove long-lived keys.
More on Supply chain: signing, SBOM and dependencies
`cosign verify` fails with `Error: no matching signatures` for an image CI says it signedBeginnerKeyless `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`Beginner`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