Skip to content

ci: grant the version workflow the permissions its image job needs - #258

Merged
Bccorb merged 1 commit into
mainfrom
fix/release-workflow-permissions
Sep 5, 2026
Merged

ci: grant the version workflow the permissions its image job needs#258
Bccorb merged 1 commit into
mainfrom
fix/release-workflow-permissions

Conversation

@Bccorb

@Bccorb Bccorb commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

What broke

Every run of Version Changelog PR since 7ee36cf (2026-08-28) has ended in startup_failure at 0-1s. GitHub's validator rejects the workflow file:

.github/workflows/release.yml (Line: 121, Col: 3): Error calling workflow
'.../docker-publish.yml'. The workflow is requesting
'security-events: write, id-token: write', but is only allowed
'security-events: none, id-token: none'.

Why

A called workflow cannot be granted more than the calling job holds. docker-publish.yml declares four permissions at the workflow level, but the publish-image job was granting two:

Permission Callee needs Caller granted Used by
contents: read yes yes checkout
packages: write yes yes ghcr push
id-token: write yes no keyless cosign sign
security-events: write yes no upload-sarif (trivy)

7ee36cf added the cosign signing and SARIF upload steps to docker-publish.yml without widening the caller's permissions block.

The consequence is larger than it looks. This is whole-run validation, not a job failure, so the version-changelog job never started either, even though publish-image is gated behind if: new_tag == 'true' and would rarely run at all. That is why no version PR has been opened in the last week. There are currently 34 pending changesets and the package is still at v0.7.4.

Worth noting: the actionlint step in ci.yml reports this clean. actionlint does not validate reusable workflow permission subsetting, so the workflow lint gave a false all-clear.

The change

Grants the publish-image job the two missing scopes so the caller's permissions match what docker-publish.yml declares.

Verification

  • actionlint 1.7.12, exit 0
  • npm run format:check clean
  • pre-commit hook ran the full test suite, coverage and build
  • the two permission sets now match exactly

One caveat worth stating plainly: actionlint cannot confirm this fix, since it never flagged the bug. The definitive check is GitHub's own parser on the next push to main. That push should also produce the backlogged version PR.

No changeset, since this is CI-only and not user-facing.

The publish-image job calls docker-publish.yml, which declares id-token
(keyless cosign signing) and security-events (trivy SARIF upload) at the
workflow level. A called workflow cannot be granted more than the caller
holds, so the call was rejected before anything ran.

This is a whole-run validation failure rather than a job failure, so the
version-changelog job never started either, even though publish-image is
gated behind a tag being created. Every run since 7ee36cf has ended in
startup_failure, which is why no version PR has been opened since.

actionlint does not check reusable workflow permission subsetting, so the
workflow lint in ci.yml reported this clean.
@Bccorb
Bccorb merged commit a692ab8 into main Sep 5, 2026
5 checks passed
@Bccorb
Bccorb deleted the fix/release-workflow-permissions branch September 5, 2026 23:01
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