Skip to content

feat(workflow): raise release-extension seam token ceiling - #1148

Merged
c-vigo merged 2 commits into
devfrom
feature/1144-release-extension-token-ceiling
Jul 16, 2026
Merged

c-vigo merged 2 commits into
devfrom
feature/1144-release-extension-token-ceiling

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

The scaffolded release.yml calls the consumer-owned release-extension.yml
seam, but its extension caller job declared no permissions: block, so
the called reusable workflow ran under the caller's workflow-level default
(contents: read, packages: read). A called reusable workflow can only
downgrade the caller's GITHUB_TOKEN — never elevate it — so any write-scoped
extension step was silently denied:

Type of Change

  • feat -- New feature

Changes Made

Option A from the issue — raise the ceiling and document it:

  • assets/workspace/.github/workflows/release.yml — the extension caller
    job 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 (scope
    table + 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-provenance job sets
permissions: { id-token: write, attestations: write }. Scopes beyond the
ceiling (e.g. contents: write to push a branch) still belong in a
consumer-owned tag-push workflow — documented.

Scope note: this is scaffold-only. Devkit's own release.yml is a bespoke
upstream pipeline and does not use the release-extension.yml seam, so there's
no dogfooding copy to change.

Changelog Entry

Changed

  • Release extension seam gains a documented token ceiling (#1144)
    • full entry in CHANGELOG.md under ## Unreleased.

Testing

  • Tests pass locally (just test)
  • Manual testing performed (describe below)

Manual Testing Details

  • New tests/test_workflow_release_extension.py (TDD, RED→GREEN): asserts the
    caller 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; actionlint clean on the edited workflow (only the expected
    cross-tree reusable-path notes); full prek run --all-files green.
  • Manifest sync propagated the doc into assets/workspace/docs/ (mirror test green).

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • I have updated CHANGELOG.md in the [Unreleased] section (and pasted the entry above)
  • My changes generate no new warnings or errors
  • I have added tests that prove my fix is effective
  • New and existing unit tests pass locally with my changes

Additional Notes

Companion to #1147 (#1142); both surfaced during the sync-issues-action deploy
recon. The workaround shipping there today (attest-release.yml on
push: tags: v*.*.*) remains valid — this makes the in-seam path work too, so
future consumers can keep provenance attestation inside release-extension.yml.

Closes #1144

Refs: #1144

c-vigo added 2 commits July 16, 2026 13:14
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
@c-vigo
c-vigo enabled auto-merge July 16, 2026 11:26
@c-vigo
c-vigo merged commit 557add0 into dev Jul 16, 2026
13 checks passed
@c-vigo
c-vigo deleted the feature/1144-release-extension-token-ceiling branch July 16, 2026 11:27
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