Skip to content

Fix attestation validation#2338

Draft
wolfv wants to merge 1 commit intomainfrom
claude/fix-sigstore-attestation-cvRJc
Draft

Fix attestation validation#2338
wolfv wants to merge 1 commit intomainfrom
claude/fix-sigstore-attestation-cvRJc

Conversation

@wolfv
Copy link
Copy Markdown
Member

@wolfv wolfv commented Mar 17, 2026

Summary

This PR fixes the experimental attestation verification process that ensures the downloaded artifact's SHA-256 digest matches at least one subject in the in-toto statement of the attestation bundle. This prevents accepting attestations for different artifacts (e.g., from different releases).

…ting

Previously, when an attestation config had a bundle_url but no publishers,
the identity check loop was empty and verification would always succeed.
Even with publishers specified, the code relied solely on sigstore-verify's
internal subject check without an explicit artifact-to-subject verification.

This adds an explicit `verify_artifact_subject()` check that runs before
identity verification: it computes the artifact's SHA-256 digest and
confirms it matches at least one subject in the attestation's in-toto
statement. This prevents accepting an attestation for a different file
(e.g., from a different release or a completely unrelated artifact).

This is analogous to CVE-2026-31830 in sigstore-ruby where the subject
digest check result was silently ignored.

https://claude.ai/code/session_01SkB2VgUFbUgew9UG1WqNet
@wolfv wolfv marked this pull request as draft March 17, 2026 17:50
@wolfv wolfv changed the title Add artifact SHA-256 verification to attestation validation Fix attestation validation Mar 17, 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