Skip to content

Accept, verify, and expose Sigstore package attestations - #9544

Closed
mosuem wants to merge 2 commits into
masterfrom
add-attestation-support
Closed

Accept, verify, and expose Sigstore package attestations#9544
mosuem wants to merge 2 commits into
masterfrom
add-attestation-support

Conversation

@mosuem

@mosuem mosuem commented Aug 19, 2026

Copy link
Copy Markdown
Member

Implements package attestation support on pub.dev using package:sigstore:

Features

  1. Upload Acceptance & Verification:
    • In packageBackend.publishUploadedBlob, checks for an accompanying attestation bundle (tmp/<guid>.sigstore.json) in the incoming bucket.
    • Verifies the attestation against the uploaded archive (SHA-256 digest match, package name, version, and pubspec repository) using AttestationVerifier from package:sigstore.
    • Rejects package publishing if the attestation is invalid or fails verification.
  2. Datastore Storage:
    • Adds AssetKind.attestation for storing verified attestation JSON as a PackageVersionAsset.
  3. Serving Attestations:
    • Exposes GET /api/packages/<package>/versions/<version>/attestation for the pub client and tools to retrieve the attestation bundle.
  4. Tooling & Tests:
    • Updates PubApiClientExt to support uploading attestation bundles alongside archive bytes.
    • Added unit tests in app/test/package/upload_test.dart.

mosuem added 2 commits August 19, 2026 14:18
Implements Sigstore attestation support in pub-dev using package:sigstore:
- Adds `AssetKind.attestation` for storing attestation bundles as package version assets in Datastore.
- Exposes `GET /api/packages/<package>/versions/<version>/attestation` endpoint to serve attestation bundles.
- In `packageBackend.publishUploadedBlob`, checks for accompanying `tmp/<guid>.sigstore.json` in the incoming bucket, verifies it against the uploaded package archive, name, version, and pubspec repository using `AttestationVerifier`, and rejects uploads with invalid attestations.
- Updates `PubApiClientExt` and adds unit tests in `upload_test.dart`.
@mosuem

mosuem commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

Superseded by stacked PRs #9545 and #9546.

@mosuem mosuem closed this Aug 19, 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.

1 participant