-
Notifications
You must be signed in to change notification settings - Fork 133
Claude fix #1259
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
Claude fix #1259
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -10,68 +10,74 @@ jobs: | |||||||||||||
| permissions: | ||||||||||||||
| contents: read | ||||||||||||||
| pull-requests: write | ||||||||||||||
| issues: read | ||||||||||||||
| issues: write | ||||||||||||||
| actions: read | ||||||||||||||
| id-token: write | ||||||||||||||
|
|
||||||||||||||
| steps: | ||||||||||||||
| - name: Checkout PR head (fork) | ||||||||||||||
| # IMPORTANT: checkout BASE repo only (safe on forks) | ||||||||||||||
| - name: Checkout base repo (safe) | ||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||
| with: | ||||||||||||||
| ref: ${{ github.event.pull_request.head.sha }} | ||||||||||||||
| fetch-depth: 1 | ||||||||||||||
|
|
||||||||||||||
| - name: Run Claude Code Review | ||||||||||||||
| id: claude-review | ||||||||||||||
| uses: anthropics/claude-code-action@v1 | ||||||||||||||
| with: | ||||||||||||||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||||||||||||||
| github_token: ${{ github.token }} | ||||||||||||||
|
|
||||||||||||||
| plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' | ||||||||||||||
| plugins: 'code-review@claude-code-plugins' | ||||||||||||||
| plugin_marketplaces: "https://github.com/anthropics/claude-code.git" | ||||||||||||||
| plugins: "code-review@claude-code-plugins" | ||||||||||||||
|
|
||||||||||||||
| claude_args: > | ||||||||||||||
| --dangerouslyDisableSandbox | ||||||||||||||
| --dangerously-skip-permissions | ||||||||||||||
|
||||||||||||||
| --dangerously-skip-permissions |
Copilot
AI
Feb 24, 2026
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.
The current --allowedTools list is very broad (gh api:* plus python3:* and many shell text utilities). In a pull_request_target job with secrets, a prompt-injected PR can use python3 (or other tooling) to read environment variables and leak tokens via PR comments/logs. Tighten this to only the exact gh commands/endpoints and parsing tools required (prefer jq over python3 here), and avoid wildcard gh api:* if possible.
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: Update the workflow prompt so that the Claude reviewer explicitly reads and follows MFC's contribution and GPU documentation, and focuses on correctness and the documented PR-pattern triggers rather than style, as required by the project's AI review rules. [custom_rule]
Severity Level: Minor
| Output requirements (even if no issues): | |
| Before reviewing code, fetch and skim these MFC-specific docs from the base repository: | |
| - docs/documentation/contributing.md (especially "Common Pitfalls", "What to Review", and PR-pattern triggers) | |
| - docs/documentation/gpuParallelization.md (GPU macro API and GPU rules) | |
| Prioritize correctness, numerical and physics issues, MPI/GPU correctness, precision mixing, and memory issues over formatting or lint-only concerns, which are enforced by pre-commit/CI. | |
Why it matters? ⭐
The project's AI review rules (provided in the prompt for this task) require reviewers to prioritize correctness, numerical/physics/MPI/GPU issues, and to consult the repo's contribution and GPU documentation (docs/documentation/contributing.md and docs/documentation/gpuParallelization.md). The proposed improved prompt explicitly instructs the automated reviewer to read those MFC docs and to emphasize correctness-related checks over style (which is already enforced by pre-commit). This directly enforces a documented custom rule and is therefore a substantive, beneficial change rather than a cosmetic tweak. The improved YAML is syntactically valid and clearly narrows the review focus to the repository's stated priorities.
Prompt for AI Agent 🤖
This is a comment left during a code review.
**Path:** .github/workflows/claude-code-review.yml
**Line:** 72:72
**Comment:**
*Custom Rule: Update the workflow prompt so that the Claude reviewer explicitly reads and follows MFC's contribution and GPU documentation, and focuses on correctness and the documented PR-pattern triggers rather than style, as required by the project's AI review rules.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
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.
issues: writeexpands the workflow token scope compared to the previousissues: read. If this job only needs to post PR comments, keep this permission read-only (or omit it) and removegh issue comment:*from the allowed tools; otherwise, please justify why issue write access is required in apull_request_targetworkflow that runs with secrets on forked PRs.