Repository navigation
Conversation
…estations Adds an `attest` input (default `false`) to `publish.yml`. When set, a new `attest` job signs the package archive with `actions/attest` (Sigstore SLSA build provenance) and uploads the bundle as the `attestation-bundle` workflow artifact. The bundle is not passed to `dart pub publish` yet. The `attest` job has no `permissions:` block and inherits the caller's permissions: GitHub validates the permissions of every job in a reusable workflow against the caller's grant (even for skipped jobs), so requesting `attestations: write` would break existing callers that only grant `id-token: write`.
The `v1` tag moved to v1.8.2, so zizmor's `ref-version-mismatch` audit flags the `6afc89d… # v1` pins (which point to v1.8.1).
This was referenced Nov 13, 2026
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.
Note
This PR was generated by an AI coding agent (Jetski) on behalf of @mosuem.
Adds an opt-in
attestinput (defaultfalse) topublish.yml. When set, a newattestjob signs the package archive withactions/attest(Sigstore SLSA build provenance) and uploads the bundle as theattestation-bundleworkflow artifact. Nothing is passed to pub yet, so this can land before pub.dev accepts attestations.Part 1 of 2, split out of #199, for package provenance signing (see go/dart-signed-packages). #199 is stacked on this PR and passes the bundle to
dart pub publish --with-attestationonce pub supports it.Backwards compatibility
GitHub checks the permissions requested by every job of a reusable workflow against the caller's permissions at startup, including jobs that would be skipped. If any job requested
attestations: write, every existing caller that only grantsid-token: write(the snippet on dart.dev and pub.dev) would fail withThe nested job '…' is requesting 'attestations: write', but is only allowed 'attestations: none'. This is the same problem as withcontents: readin #203.So the
attestjob:permissions:block and inherits the caller's permissions;attest: true.Callers that don't opt in get exactly the same jobs and permissions as before (
attestis skipped). Callers that opt in must also grantattestations: write.publishnowneeds: [package, attest], with a condition that lets it run whenattestis skipped. Ifattest: trueand the attestation fails, nothing is published.Changes
publish.yml:attestinput.attestjob: downloadspackage-archive, runsactions/attest@v4.2.2onpackage.tar.gz, and uploads the bundle aspackage.tar.gz.sigstore.jsonin theattestation-bundleartifact.publishwaits forattestand still runs whenattestis skipped.dart.yml: newtest_publish_attestjob (attest: true,test-run: true). It is skipped for PRs from forks because they can't mint OIDC tokens. Each run creates a real attestation for theexamplepackage archive in this repo.CHANGELOG.md:v1.8.3-wipentry.dart-lang/setup-dartpin comments inpublish.ymlchange from# v1to# v1.8.1, the tag the SHA actually points to. Since v1.8.2 moved thev1tag, zizmor'sref-version-mismatchaudit reports them as Medium findings, andzizmor-outputfails for any PR that touches this file (it does onmaintoo).Example caller workflow