Repository navigation
feat(workflow): raise release-extension seam token ceiling - #1148
Merged
Merged
Conversation
Grant the extension caller job in the scaffolded release.yml a documented GITHUB_TOKEN ceiling (packages/id-token/attestations write) so write-scoped extensions — provenance attestation, GHCR publish — work through the seam. A called reusable workflow can only downgrade the caller's token; with no caller grant the seam was capped read-only. Ceiling, not grant: the default no-op stays read-only and consumers opt in per job. Refs: #1144
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.
Description
The scaffolded
release.ymlcalls the consumer-ownedrelease-extension.ymlseam, but its
extensioncaller job declared nopermissions:block, sothe called reusable workflow ran under the caller's workflow-level default
(
contents: read, packages: read). A called reusable workflow can onlydowngrade the caller's
GITHUB_TOKEN— never elevate it — so any write-scopedextension step was silently denied:
actions/attest-build-provenance(needsid-token: write+attestations: write) — the flow that surfaced this during the sync-issues-action adoption ([CHORE] Adopt vigOS devkit 1.3.0 (direnv) — replace bespoke CI/release stack sync-issues-action#106).packages: write) — blocked by the same read-only ceiling.Type of Change
feat-- New featureChanges Made
Option A from the issue — raise the ceiling and document it:
assets/workspace/.github/workflows/release.yml— theextensioncallerjob now declares a documented token ceiling:
contents: read,packages: write,id-token: write,attestations: write.assets/workspace/.github/workflows/release-extension.yml(seeded/consumer-owned) —header note explaining the ceiling and the per-job opt-in; the default no-op
stays
contents: read.docs/DOWNSTREAM_RELEASE.md— new "Permission ceiling" subsection (scopetable + deny-by-default explanation + when to use a consumer-owned tag-push
workflow instead).
Ceiling, not grant. It's the maximum the seam can reach; the shipped
default no-op is read-only and deny-by-default is preserved — a consumer opts a
job in by declaring the scopes it needs (up to the ceiling), e.g. a
actions/attest-build-provenancejob setspermissions: { id-token: write, attestations: write }. Scopes beyond theceiling (e.g.
contents: writeto push a branch) still belong in aconsumer-owned tag-push workflow — documented.
Scope note: this is scaffold-only. Devkit's own
release.ymlis a bespokeupstream pipeline and does not use the
release-extension.ymlseam, so there'sno dogfooding copy to change.
Changelog Entry
Changed
CHANGELOG.mdunder## Unreleased.Testing
just test)Manual Testing Details
tests/test_workflow_release_extension.py(TDD, RED→GREEN): asserts thecaller ceiling grants the four scopes and the default no-op stays
read-only (ceiling ≠ grant).
uv run pytest -k "workflow or scaffold or release or downstream or extension"→ 109 passed;
actionlintclean on the edited workflow (only the expectedcross-tree reusable-path notes); full
prek run --all-filesgreen.assets/workspace/docs/(mirror test green).Checklist
CHANGELOG.mdin the[Unreleased]section (and pasted the entry above)Additional Notes
Companion to #1147 (#1142); both surfaced during the sync-issues-action deploy
recon. The workaround shipping there today (
attest-release.ymlonpush: tags: v*.*.*) remains valid — this makes the in-seam path work too, sofuture consumers can keep provenance attestation inside
release-extension.yml.Closes #1144
Refs: #1144