Skip to content

Add integration test for package attestation upload and retrieval in pub_integration - #9549

Draft
mosuem wants to merge 1 commit into
verify-uploaded-attestationsfrom
integration-test-attestations
Draft

mosuem wants to merge 1 commit into
verify-uploaded-attestationsfrom
integration-test-attestations

Conversation

@mosuem

@mosuem mosuem commented Aug 20, 2026 •

Copy link
Copy Markdown
Member

Note: This PR needs to wait for the Dart SDK CL (https://dart-review.googlesource.com/c/sdk/+/538800) to add trusted_root.json and the pub client PRs (dart-lang/pub#4876 and dart-lang/pub#4875) to land and roll into the Dart SDK before being merged.

  • Adds getAttestation and uploadPackage helpers in PubHttpClient.
  • Adds publishArchive helper in DartToolClient supporting --with-attestation.
  • Adds attestation_integration_test.dart in pkg/pub_integration testing end-to-end attestation upload, Datastore storage, API retrieval, and rejection of tampered attestations against FakePubServerProcess.

@mosuem
mosuem force-pushed the integration-test-attestations branch from 8972dff to 3e4d70f Compare August 20, 2026 09:28
@mosuem
mosuem force-pushed the integration-test-attestations branch from 3e4d70f to 7d1e8ba Compare August 20, 2026 09:38
@mosuem
mosuem force-pushed the integration-test-attestations branch from 7d1e8ba to 669ee01 Compare August 20, 2026 11:16
@mosuem
mosuem force-pushed the integration-test-attestations branch 2 times, most recently from a91e408 to bd12b68 Compare August 20, 2026 11:40
@mosuem
mosuem force-pushed the integration-test-attestations branch 2 times, most recently from fd0438a to 2bdce63 Compare August 21, 2026 16:17
@mosuem
mosuem force-pushed the integration-test-attestations branch from 2bdce63 to 611f7bf Compare August 24, 2026 07:45
@mosuem
mosuem force-pushed the integration-test-attestations branch from 611f7bf to 5c2c249 Compare August 24, 2026 08:32
@mosuem
mosuem force-pushed the integration-test-attestations branch from 5c2c249 to 854f1aa Compare August 24, 2026 08:49
@mosuem
mosuem force-pushed the integration-test-attestations branch from 854f1aa to 91e7826 Compare September 3, 2026 15:38
@mosuem
mosuem force-pushed the integration-test-attestations branch from 91e7826 to 9b8c627 Compare October 12, 2026 08:46
…pub_integration

Uploads a package with an attestation bundle through the fake server and
retrieves it via the attestation API, and checks that an attestation for a
different archive is rejected.

The test client uploads the bundle to the `attestationUrl` returned by
`GET /api/packages/versions/new` before the archive (the protocol since
`accept-and-serve-attestations`), and the self-reported builder of the
hand-crafted provenance is one of the workflows pub.dev trusts, as the fake
server's `FakeAttestationVerifier` trusts it instead of verifying a
signature.
@mosuem
mosuem force-pushed the integration-test-attestations branch from 9b8c627 to d16f4d2 Compare October 12, 2026 13:06
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