Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/commands/review-code-pr.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
allowed-tools: Bash(gh pr diff:*),Bash(gh pr view:*)
allowed-tools: Bash(gh pr diff:*),Bash(gh pr view:*),Bash(npm run react-compiler-compliance-check:*)
description: Review a code contribution pull request
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function Avatar({source, size}: AvatarProps) {
Before flagging, verify that the file actually compiles with React Compiler:

```bash
npx react-compiler-healthcheck --src "<filepath>" --verbose
npm run react-compiler-compliance-check check <filepath>
```

If the output contains **"Failed to compile"** for the file under review, the rule **does not apply** — the author may have no alternative to manual memoization until the compilation issue is resolved.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/claude-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
prompt: "/review-code-pr REPO: ${{ github.repository }} PR_NUMBER: ${{ github.event.pull_request.number }}"
claude_args: |
--model claude-opus-4-6
--allowedTools "Task,Glob,Grep,Read,Bash(gh pr diff:*),Bash(gh pr view:*)" --json-schema '${{ steps.schema.outputs.json }}'
--allowedTools "Task,Glob,Grep,Read,Bash(gh pr diff:*),Bash(gh pr view:*),Bash(npm run react-compiler-compliance-check:*)" --json-schema '${{ steps.schema.outputs.json }}'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove unsafe compliance-check shell access

Adding Bash(npm run react-compiler-compliance-check:*) in the pull_request_target review job lets the agent execute a script that shells out with interpolated input (execSync(\npx react-compiler-healthcheck ${srcArg} --verbose`)inscripts/react-compiler-compliance-check.ts`), so a PR-controlled filepath containing shell substitution can trigger arbitrary command execution when the reviewer runs the recommended check command. This capability was previously blocked by the tool allowlist, so enabling it here introduces a new high-impact injection path unless file paths are strictly escaped or passed as argv arrays.

Useful? React with 👍 / 👎.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kacper-mikolajczak @adhorodyski I feel like this is a real problem as anyone could update the contents of the script, right?


- name: Post code review results
if: steps.code-review.outcome == 'success' && steps.filter.outputs.code == 'true'
Expand Down
Loading