ci: annotate the lockfix permissions with sentinel accepts - #144
Merged
Conversation
Both scopes are used by exactly one step each — contents: write by "Push the fix if anything changed" and actions: write by "Approve the pull-request checks on the fixed commit" — so GHA002 has nothing to act on. The sentinel:accept markers say that to the scanner in its own syntax, with the reason on the line it flags. Returns the declaration to the workflow level, where the markers sit on the lines GHA002 reports, and drops the job-level block added in #142 so there is one place to read the answer instead of two. Effective permissions are unchanged: the file has a single job, which inherits exactly what it used to override with. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019h7znwAftvs36vD4YwKMRf
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.
Adds the
sentinel:accept GHA002markers to the two permission lines independabot-lockfix.yml, with the reason on the line the scanner flags:Each scope is used by exactly one step —
contents: writeby "Push the fix if anything changed" (git push origin HEAD:$BRANCH),actions: writeby "Approve the pull-request checks on the fixed commit" (POST .../actions/runs/{id}/approve) — so there is nothing for GHA002 to act on beyond recording that.This returns the declaration to the workflow level so the markers sit on the lines GHA002 reports, and drops the job-level block added in #142, so there is one place to read the answer instead of two.
Effective permissions are unchanged. The file has a single job, which now inherits exactly what it previously overrode with:
The one thing lost is the "a second job added here starts read-only" property from #142. That only matters if this file ever gains another job, and the markers are worth more than a hypothetical.
cleanup-runs.ymlstill carries itsactions: writeat job level with no marker — say the word and it gets the same treatment on bothmainanddapper.🤖 Generated with Claude Code
https://claude.ai/code/session_019h7znwAftvs36vD4YwKMRf
Generated by Claude Code