-
Notifications
You must be signed in to change notification settings - Fork 0
Add GLM inline review workflow #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,23 @@ | ||||
| name: GLM Review | ||||
| on: | ||||
| pull_request: | ||||
| types: [opened, synchronize] | ||||
| paths-ignore: | ||||
| - "**/*.md" | ||||
| - ".gitignore" | ||||
|
|
||||
| jobs: | ||||
| review: | ||||
| # Only review substantial changes (5+ files, or 20+ additions, or 20+ deletions) | ||||
| if: | | ||||
| 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 | ||||
| permissions: | ||||
| contents: read | ||||
| pull-requests: write | ||||
| issues: write | ||||
| id-token: write | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [minor] Failure scenario: combined with the floating
Suggested change
(This deletes the |
||||
| secrets: | ||||
| ZHIPU_API_KEY: ${{ secrets.ZHIPU_API_KEY }} | ||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[major] The reusable workflow is pinned to the floating
@mainref, so any commit pushed tofrankbria/glm-review— accidental or malicious — silently changes the code this job executes, and it runs withpull-requests: write+issues: writeon this repo.Failure scenario: a compromised token or a bad push to
glm-review'smainrewrites 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.ymlis blocking), so this is the one footgun it already mitigates elsewhere.Replace
<40-char-commit-sha>with the full SHA of the commit you verified on hai-sh#75; Dependabot can bump it.