Repository navigation
Claude review - #864
Claude review#864HyakoV3 wants to merge 3 commits into
Conversation
|
My bad friends... wrong repo. |
PR Summary by QodoAdd automated Claude PR reviews and mention-triggered responses
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. Any commenter can start privileged jobs
|
| types: [created] | ||
| jobs: | ||
| claude: | ||
| if: contains(github.event.comment.body, '@claude') |
There was a problem hiding this comment.
1. Any commenter can start privileged jobs 🐞 Bug ⛨ Security
The claude job checks only whether a newly created comment contains @claude, without checking the commenter's authorization. A qualifying issue or pull-request comment starts a job that receives an OAuth secret, creates a GitHub App token, and grants write permissions, even when the commenter is untrusted.
Agent Prompt
## Issue description
Any newly created comment containing `@claude` can start the credential-bearing Claude job, regardless of who posted it.
## Fix Focus Areas
- .github/workflows/claude.yml[3-9]
- .github/workflows/claude.yml[12-30]
## Recommended Fix
Require an authorized commenter before running the job, using a permission check that applies to both comment event types. Do not create the App token or invoke Claude for unauthorized comments.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| name: Code Review | ||
| on: | ||
| pull_request: | ||
| types: [opened, ready_for_review, reopened] |
There was a problem hiding this comment.
2. Later pr commits receive no review 🐞 Bug ≡ Correctness
The review workflow lists opened, ready_for_review, and reopened but omits the synchronize pull-request event. Commits pushed after a PR is opened therefore do not start another automatic review unless a separately listed event occurs.
Agent Prompt
## Issue description
The automatic review does not run when commits are pushed to an existing pull request.
## Fix Focus Areas
- .github/workflows/claude-code-review.yml[3-4]
## Recommended Fix
Add `synchronize` to the pull-request event types so updates to an open PR start a new review.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| app-id: ${{ secrets.VANDAME_APP_ID }} | ||
| private-key: ${{ secrets.VANDAME_APP_PRIVATE_KEY }} |
There was a problem hiding this comment.
3. Reviews fail for forked pull requests 🐞 Bug ☼ Reliability
The pull_request review job unconditionally creates an App token from repository secrets and passes another repository secret to the Claude action. GitHub does not provide those secrets to pull_request runs from forks, so the authentication steps cannot complete for those PRs.
Agent Prompt
## Issue description
The review workflow requires secrets that are unavailable to pull-request runs originating from forks.
## Fix Focus Areas
- .github/workflows/claude-code-review.yml[3-4]
- .github/workflows/claude-code-review.yml[18-26]
## Recommended Fix
Provide a safe, separately authorized review path for forked PRs, or explicitly skip forked PRs before the token-creation step and avoid presenting those runs as working reviews.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| name: Code Review | ||
| on: | ||
| pull_request: | ||
| types: [opened, ready_for_review, reopened] |
There was a problem hiding this comment.
4. Draft prs receive premature reviews 🐞 Bug ≡ Correctness
The review workflow includes opened without checking whether the pull request is a draft. Opening a draft starts the Claude review, and marking that same PR ready starts another review through ready_for_review.
Agent Prompt
## Issue description
Opening a draft PR starts a review before the PR is ready, followed by another review when it is marked ready.
## Fix Focus Areas
- .github/workflows/claude-code-review.yml[3-6]
## Recommended Fix
Add a job condition that excludes draft PRs while retaining the `ready_for_review` event.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Adicionando o vandame como revisor das PRs.