Skip to content

Fix image verification for cosign signatures#62

Merged
rdimitrov merged 3 commits intomainfrom
fix-verifier
Mar 16, 2026
Merged

Fix image verification for cosign signatures#62
rdimitrov merged 3 commits intomainfrom
fix-verifier

Conversation

@rdimitrov
Copy link
Member

The following PR fixes an issue where image verification fails with "image is not signed" for images signed with cosign v2+ using OCI 1.1 referrers (sigstore bundle v0.3) even though the signatures are valid.

The root cause is a go-containerregistry bug (google/go-containerregistry#1997) where the referrers fallback tag index sets artifactType to application/vnd.oci.empty.v1+json (the config media type) instead of propagating the actual artifactType from the inner manifest (application/vnd.dev.sigstore.bundle.v0.3+json). The existing filter in bundleFromAttestationonly checked the index descriptor'sartifactType`, causing it to skip all valid sigstore bundles.

This change introduces an isSigstoreBundle helper that checks three sources: the index descriptor's artifactType (fast path for compliant registries), the manifest's config.ArtifactType, and the layer media types as a final fallback.

Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
@rdimitrov rdimitrov merged commit 3f6a171 into main Mar 16, 2026
5 checks passed
@rdimitrov rdimitrov deleted the fix-verifier branch March 16, 2026 09:17
@rdimitrov rdimitrov self-assigned this Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants