Skip to content

docs(docker-release): correct misleading security-events comment - #75

Merged
JSisques merged 1 commit into
mainfrom
fix/docker-release-security-events-comment
Sep 16, 2026
Merged

JSisques merged 1 commit into
mainfrom
fix/docker-release-security-events-comment

Conversation

@JSisques

Copy link
Copy Markdown
Contributor

Summary

Root-caused the real bug behind beacon-api's first release.yml run failing with startup_failure:

Error calling workflow 'sisques-labs/workflows/.github/workflows/docker-release.yml@main'.
The workflow is requesting 'security-events: write', but is only allowed 'security-events: none'.

docker-release.yml declares security-events: write unconditionally at its own top level (only actually exercised when scan_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 declare security-events: write, even one that never sets scan_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.yml was rewritten for the trunk-based promote mode (see beacon-api#25), since it looked unnecessary.

Changes

  • Corrected the comment in docker-release.yml to state the real constraint.
  • Added the missing permissions: blocks (both top-level and job-level) to the README's promote-mode usage example, so nobody copies the same trap.

Test plan

  • actionlint clean
  • tests/release-train-detect.test.sh — 36/36, no regression

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.
@JSisques
JSisques merged commit 0a3356b into main Sep 16, 2026
2 checks passed
@JSisques
JSisques deleted the fix/docker-release-security-events-comment branch September 16, 2026 09:53
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.
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