ci: grant the version workflow the permissions its image job needs - #258
Merged
Conversation
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.
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.
What broke
Every run of
Version Changelog PRsince7ee36cf(2026-08-28) has ended instartup_failureat 0-1s. GitHub's validator rejects the workflow file:Why
A called workflow cannot be granted more than the calling job holds.
docker-publish.ymldeclares four permissions at the workflow level, but thepublish-imagejob was granting two:contents: readpackages: writeid-token: writecosign signsecurity-events: writeupload-sarif(trivy)7ee36cfadded the cosign signing and SARIF upload steps todocker-publish.ymlwithout 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-changelogjob never started either, even thoughpublish-imageis gated behindif: 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.ymlreports this clean. actionlint does not validate reusable workflow permission subsetting, so the workflow lint gave a false all-clear.The change
Grants the
publish-imagejob the two missing scopes so the caller's permissions match whatdocker-publish.ymldeclares.Verification
actionlint1.7.12, exit 0npm run format:checkcleanOne 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.