-
Notifications
You must be signed in to change notification settings - Fork 53
ci: add Claudius PR Review workflow #3347
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: v3.1-dev
Are you sure you want to change the base?
Changes from all commits
9979307
5b5d153
242ef6d
e8443b5
ae8808d
e77497f
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,36 @@ | ||||||||||||||||||||
| name: "Claudius PR Review" | ||||||||||||||||||||
|
|
||||||||||||||||||||
| on: | ||||||||||||||||||||
| pull_request_target: | ||||||||||||||||||||
| types: | ||||||||||||||||||||
| - labeled | ||||||||||||||||||||
| - synchronize | ||||||||||||||||||||
lklimek marked this conversation as resolved.
Show resolved
Hide resolved
Collaborator
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. 🔴 Blocking: TOCTOU: synchronize on pull_request_target allows fork authors to re-trigger with secrets
Since the review action reads PR code, the fork author can push prompt-injection payloads (e.g. in Fix: Remove source: ['claude-security', 'codex-security', 'claude-general', 'codex-general'] 🤖 Fix this with AI agents |
||||||||||||||||||||
| issue_comment: | ||||||||||||||||||||
|
Comment on lines
+3
to
+8
|
||||||||||||||||||||
| types: | ||||||||||||||||||||
| - created | ||||||||||||||||||||
|
|
||||||||||||||||||||
| concurrency: | ||||||||||||||||||||
| group: claudius-review-${{ github.event.pull_request.number || github.event.issue.number }} | ||||||||||||||||||||
| cancel-in-progress: true | ||||||||||||||||||||
|
|
||||||||||||||||||||
| permissions: | ||||||||||||||||||||
| contents: read | ||||||||||||||||||||
| pull-requests: write | ||||||||||||||||||||
| issues: write | ||||||||||||||||||||
lklimek marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||
|
|
||||||||||||||||||||
| jobs: | ||||||||||||||||||||
| claudius-review: | ||||||||||||||||||||
|
Collaborator
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. 🟡 Suggestion: Missing timeout-minutes No source: ['claude-general'] 🤖 Fix this with AI agents |
||||||||||||||||||||
| name: Claudius PR Review | ||||||||||||||||||||
| runs-on: ubuntu-24.04 | ||||||||||||||||||||
| env: | ||||||||||||||||||||
| CLAUDE_CODE_EFFORT_LEVEL: max | ||||||||||||||||||||
| if: | | ||||||||||||||||||||
| (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'claudius-review') && github.event.pull_request.draft == false) || | ||||||||||||||||||||
| (github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '/review') && contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) | ||||||||||||||||||||
|
Comment on lines
+27
to
+29
Collaborator
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. 🟡 Suggestion: The condition checks The fix is to check
Suggested change
source: ['codex'] 🤖 Fix this with AI agents
lklimek marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||
| steps: | ||||||||||||||||||||
| - uses: lklimek/claudius-review-action@main | ||||||||||||||||||||
lklimek marked this conversation as resolved.
Show resolved
Hide resolved
Collaborator
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. 🔴 Blocking: Third-party action pinned to mutable @main with secret access
Fix: Pin to a specific commit SHA with a version comment. source: ['claude-general', 'codex-general', 'codex-security'] 🤖 Fix this with AI agents |
||||||||||||||||||||
| with: | ||||||||||||||||||||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||||||||||||||||||||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||
|
Comment on lines
+31
to
+34
Collaborator
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. 🔴 Blocking: Action pinned to mutable branch, not commit SHA
GitHub's security hardening guide recommends pinning third-party actions to a full-length commit SHA. This is especially critical here because: (1) the action is from a personal account, not a verified org, (2) it runs in a
Suggested change
source: ['claude', 'codex'] 🤖 Fix this with AI agents |
||||||||||||||||||||
| claude_model: "opus" | ||||||||||||||||||||
| trigger_label: "claudius-review" | ||||||||||||||||||||
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.
🟡 Suggestion: Missing ready_for_review trigger type
If a draft PR is labeled
claudius-reviewand later marked ready for review (without new commits), the review won't trigger. Addingready_for_reviewto the types list covers this gap without the security issues ofsynchronize.source: ['codex-general']
🤖 Fix this with AI agents