mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-10-13 09:25:14 +03:00
fix(ci): drop id-token from the Claude workflows and tighten the review comment
CodeQL alert #121 flags the pr-head checkout in the PR review job. The checkout is deliberate and nothing in the job executes it, but the job still carried `id-token: write`, and so did the issue analyst. claude-code-action only uses OIDC to trade for a Claude GitHub App token when no github_token is passed - that app token asks for contents, pull_requests and issues write - or for workload identity, which neither workflow uses. Both pass github_token, so the permission did nothing for them, yet any code running in either job could have minted that write token, undoing the review's read-only split. Three reviews posted on one morning (#6666, #6675, #6752) also showed rubric gaps. REVIEW.md said both "open with the verdict" and "lead with No blocking issues", so the comments opened three ways and two tallies dropped severities; the opening is now a fixed order - tag line only when blocking, verdict paragraph, one status line whose tally names all three severities. #6675 filed a spoofable X-Forwarded-For IP, which that PR first shows to an admin approving a login, under Design; Design now holds approaches and trade-offs only, and a concrete consequence the change makes reachable or worse is a finding. The coverage list ran to some 25 nested lines on #6752; it is now ten lines at most, one per area, no nested bullets.
This commit is contained in:
@@ -9,7 +9,6 @@ on:
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
issue-analyst:
|
||||
@@ -29,7 +28,6 @@ jobs:
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Record when this run started
|
||||
id: started
|
||||
|
||||
@@ -99,7 +99,6 @@ jobs:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
issues: read
|
||||
id-token: write
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
REPO: ${{ github.repository }}
|
||||
@@ -297,8 +296,9 @@ jobs:
|
||||
with the Write tool - the only file you may write - as your last
|
||||
action, never a placeholder or a draft. Whatever that file holds
|
||||
when your turn ends is what the workflow posts; a run that ends
|
||||
without the finished review in it has failed. The comment opens
|
||||
with the verdict, then the tally, carries the line
|
||||
without the finished review in it has failed. The comment follows
|
||||
the opening order in `REVIEW.md` - verdict paragraph, then the
|
||||
status line with the full tally - carries the line
|
||||
`Reviewed head: ${{ needs.prepare.outputs.sha }}`, gives each
|
||||
finding in full with its `file:line`, and ends with the coverage list
|
||||
`REVIEW.md` asks for, whether or not you found anything. When there is
|
||||
|
||||
Reference in New Issue
Block a user