Add GLM inline review workflow - #79
Conversation
|
Claude finished @frankbria's task in 4m 54s —— View job 🔍 GLM Review — PR #79Reviewed
The
|
| github.event.pull_request.changed_files >= 5 || | ||
| github.event.pull_request.additions >= 20 || | ||
| github.event.pull_request.deletions >= 20 | ||
| uses: frankbria/glm-review/.github/workflows/review.yml@main |
There was a problem hiding this comment.
[major] The reusable workflow is pinned to the floating @main ref, so any commit pushed to frankbria/glm-review — accidental or malicious — silently changes the code this job executes, and it runs with pull-requests: write + issues: write on this repo.
Failure scenario: a compromised token or a bad push to glm-review's main rewrites the reviewer logic; the next PR here runs attacker-controlled code that can post/modify PR comments and issues, with no SHA gate at the caller side. This repo's own stated policy is to SHA-pin actions/workflows (CLAUDE.md: "actions are SHA-pinned and Dependabot keeps the pins fresh"; security-audit.yml is blocking), so this is the one footgun it already mitigates elsewhere.
| uses: frankbria/glm-review/.github/workflows/review.yml@main | |
| uses: frankbria/glm-review/.github/workflows/review.yml@<40-char-commit-sha> # pin to a verified SHA, e.g. @abcd1234… # v1.0.0 |
Replace <40-char-commit-sha> with the full SHA of the commit you verified on hai-sh#75; Dependabot can bump it.
| contents: read | ||
| pull-requests: write | ||
| issues: write | ||
| id-token: write |
There was a problem hiding this comment.
[minor] id-token: write lets the called workflow mint OIDC tokens, which a PR reviewer has no obvious need for — it only widens the blast radius of the unpinned @main reference above.
Failure scenario: combined with the floating @main ref, a malicious reviewer revision could mint OIDC tokens and attempt to assume any cloud role this repo is trusted for (if OIDC cloud trusts are ever added). Drop it unless the glm-review workflow actually calls actions/core OIDC / requestToken.
| id-token: write |
(This deletes the id-token: write line — keep it only if the called workflow requires OIDC.)
Adds the reusable GLM-5.2 inline PR reviewer (frankbria/glm-review): CodeRabbit-style inline comments on defective lines with committable suggestions, bugs-only scope. ZHIPU_API_KEY secret is set. Verified on hai-sh#75.