Repository navigation
Read-only token for pull request lint runs, abaplint 2.120.75 - #46
Merged
Merged
Conversation
The workflow granted contents: write to the whole run so that its last step could push the badges to the badges branch on main - which also gave every pull request run from a branch of this repository a write token while it ran the pull request's own code (npm ci, the linter). The token is now read-only by default; the gate job hands the badge files over as an artifact, and a separate publish-badges job, the only one with contents: write, pushes them exactly as before. It runs only on main (push, schedule, manual run), never for a pull request, and only after a green gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Te3BRpRpxNhZAYnrQL6Gdt
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Te3BRpRpxNhZAYnrQL6Gdt
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 changes
check-abap2ui5get a read-only token. The workflow grantedcontents: writeto the whole run only so that its last step could push the badges to thebadgesbranch on main - which also handed a write token to every pull request run from a branch of this repository while it ran that branch's code (npm ci, the linter). Now:permissions: contents: read;.github/badges/*.jsonas a one-day artifact - only on main and only after a green gate;publish-badgesjob (needs:the gate,permissions: contents: write, guarded bygithub.event_name != 'pull_request' && github.ref == 'refs/heads/main') downloads them and pushes tobadgeswith the unchanged script (same worktree/orphan-branch logic, same commit message, same warning on a refused push).publish-badgesgreen and a new commit onbadges(or "up to date").npx). No new findings.Checks
npm run checklocally: abaplint (standard and cloud) 0 issues, abap2UI5 linter 0 failing, rename build OK.🤖 Generated with Claude Code
https://claude.ai/code/session_01Te3BRpRpxNhZAYnrQL6Gdt
Generated by Claude Code