Skip to content

Add Sigstore signing for in-toto statements - #3125

Closed
konsti-openai wants to merge 31 commits into
mainfrom
konsti/sigstore-signing
Closed

konsti-openai wants to merge 31 commits into
mainfrom
konsti/sigstore-signing

Conversation

@konsti-openai

@konsti-openai konsti-openai commented Nov 11, 2026 •

Copy link
Copy Markdown

Add an internal uv-sigstore crate to sign serialized in-toto statements. The caller supplies an HTTP client and a CI OIDC token with the sigstore audience. The signer generates an ephemeral P-256 key, requests a Fulcio certificate, and submits the DSSE envelope to Rekor v1. It returns the signature, signing certificate, and transparency entry for packaging by the caller.

Rekor v1 supplies an integrated timestamp that fits the current PyPI attestation format. PyPI statement construction, CLI options, and uploading belong to the caller.

The caller fetches Sigstore's public log keys over HTTPS and can cache them across publishes. uv uses those keys to check Rekor's inclusion proof and signed receipt before uploading. These checks catch bad attestations early. A compromised metadata host could make uv accept bad evidence or fail to publish, but cannot redirect the OIDC token or change what uv signs. PyPI validates the attestation and publisher against its own trust roots.

Verification of Fulcio's embedded certificate timestamp before signing is in #3129.

@konsti-openai konsti-openai added the internal A refactor or improvement that is not user-facing label Nov 11, 2026
Comment thread crates/uv-sigstore/src/lib.rs Resolved
Comment thread crates/uv-sigstore/src/lib.rs Resolved
Comment thread crates/uv-sigstore/src/lib.rs Resolved
Comment thread crates/uv-sigstore/src/rekor.rs Resolved
Comment thread crates/uv-sigstore/src/rekor.rs Resolved
@woodruffw

Copy link
Copy Markdown
Member

The overall approach here looks reasonable to me, but I have a request that we break it up into fulcio.rs, rekor.rs, etc. for readability -- I think this will also make it easier to test fiddly bits like DSSEv1/PAE encoding at the unit level 🙂

Comment thread crates/uv-sigstore/src/trust.rs Resolved
Comment thread crates/uv-sigstore/src/lib.rs Resolved
Comment thread crates/uv-sigstore/src/rekor.rs Resolved

This branch was successfully deployed

1 active deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal A refactor or improvement that is not user-facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants