Verify package attestations and enforce provenance policies in pub get/upgrade - #4875
Draft
mosuem wants to merge 6 commits into
Draft
Verify package attestations and enforce provenance policies in pub get/upgrade#4875mosuem wants to merge 6 commits into
mosuem wants to merge 6 commits into
Conversation
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 19, 2026 15:19
ea5aaba to
c218fa1
Compare
This was referenced Aug 19, 2026
mosuem
force-pushed
the
verify-sigstore-attestation
branch
3 times, most recently
from
August 24, 2026 12:18
79adede to
47dde5e
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 24, 2026 12:22
47dde5e to
28c09b4
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 24, 2026 12:40
28c09b4 to
dc37a88
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
3 times, most recently
from
August 24, 2026 12:59
b1dc5ea to
2d3e6e9
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 24, 2026 13:04
2d3e6e9 to
e397ce2
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
2 times, most recently
from
August 24, 2026 15:05
d3c6c4a to
e0c3456
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 24, 2026 15:40
e0c3456 to
c33ac01
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 24, 2026 15:46
c33ac01 to
d6008e4
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
2 times, most recently
from
August 24, 2026 15:53
547c547 to
2f0bd9e
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 25, 2026 16:11
4f20ae6 to
47ffef5
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 26, 2026 11:06
47ffef5 to
08f7ffb
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 27, 2026 08:07
08f7ffb to
6363412
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 27, 2026 08:17
6363412 to
f888ac9
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 27, 2026 09:15
f888ac9 to
3eb3deb
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 27, 2026 12:07
3eb3deb to
70d774f
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 27, 2026 12:21
70d774f to
90f3bf1
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 27, 2026 12:37
90f3bf1 to
95f8ad3
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
2 times, most recently
from
August 28, 2026 11:14
c4ff175 to
e61d51f
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 28, 2026 12:13
e61d51f to
8761f5d
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 28, 2026 12:49
8761f5d to
5e81745
Compare
mosuem
force-pushed
the
verify-sigstore-attestation
branch
from
August 31, 2026 13:58
5e81745 to
c41eb61
Compare
Adds loadTrustedRoot() and loadTrustedRootJson() in package:pub to resolve the Sigstore root of trust from: 1. Explicit override paths passed to the loader. 2. The PUB_SIGSTORE_TRUST_ROOT environment variable. 3. The built Dart SDK distribution at lib/_internal/sigstore/trusted_root.json. 4. The Dart SDK repository checkout at third_party/sigstore/trusted_root.json.
…t/upgrade - Adds `package:sigstore` dependency from labs monorepo. - Implements `PubAttestationVerifier` wrapping Sigstore attestation verifier. - Fetches and cryptographically verifies Sigstore attestations during hosted downloads in `pub get` and `pub upgrade`. - Enforces lockfile downgrade protection, SLSA provenance, digest match, and certificate roots. - Adds comprehensive unit and integration tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Client-side Ingestion & Cryptographic Verification on
pub get/upgradeWhen downloading packages in
HostedSource, queries the repository forGET /api/packages/<pkg>/versions/<ver>/attestationand runsPubAttestationVerifieragainst the cached or embedded Sigstoretrusted_root.json:ProvenancePolicy.enforcePolicy()blocks downgrades from signed to unsigned packages and detects repository switches across versions..tar.gzSHA-256 hash matches the in-toto subject digest in the attestation.<package>-<version>.tar.gz.trusted_root.jsonFulcio Root CAs.trusted_root.json.https://token.actions.githubusercontent.comissuer identity.pubspec.yaml's declared repository.Tests
test/get/hosted/attestation_verification_test.darttest/sigstore/verifier_test.darttest/sigstore/trusted_root_test.darttest/sigstore/lockfile_policy_test.dart