docs(docker-release): correct misleading security-events comment - #75
Merged
Merged
Conversation
The comment implied a caller only needs security-events: write when
it actually sets scan_image: true. That's wrong: GitHub validates a
caller's granted permissions against a called reusable workflow's
top-level permissions block statically, regardless of which steps
run — so every caller must declare it unconditionally, or the run
fails before any job starts ("requesting security-events: write,
but is only allowed security-events: none").
This bit beacon-api's first real release.yml run. Fixed the comment
and added the missing permissions blocks to the README's promote-
mode example so nobody copies the same trap.
2 tasks
JSisques
added a commit
to sisques-labs/beacon-api
that referenced
this pull request
Sep 16, 2026
docker-release.yml declares security-events: write unconditionally at its own top level (only exercised when scan_image=true), and GitHub validates a caller's granted permissions against that declaration statically, regardless of which steps actually run. Dropping it broke the first real release.yml run: Error calling workflow '.../docker-release.yml@main'. The workflow is requesting 'security-events: write', but is only allowed 'security-events: none'. See sisques-labs/workflows#75 for the corrected upstream comment.
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.
Summary
Root-caused the real bug behind beacon-api's first
release.ymlrun failing withstartup_failure:docker-release.ymldeclaressecurity-events: writeunconditionally at its own top level (only actually exercised whenscan_image: true), but GitHub validates every caller's granted permissions against that declaration statically — regardless of whether the permission is ever exercised at runtime. Every caller must declaresecurity-events: write, even one that never setsscan_image.The existing comment said the opposite ("callers that don't enable scan_image never exercise the upload step... callers that DO must also declare it") — implying it was safe to omit when unused. It isn't. This directly caused beacon-api to drop the permission when its
release.ymlwas rewritten for the trunk-basedpromotemode (see beacon-api#25), since it looked unnecessary.Changes
docker-release.ymlto state the real constraint.permissions:blocks (both top-level and job-level) to the README'spromote-mode usage example, so nobody copies the same trap.Test plan
actionlintcleantests/release-train-detect.test.sh— 36/36, no regression