|
| 1 | +name: review |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: [opened, synchronize, ready_for_review, reopened] |
| 6 | + |
| 7 | +jobs: |
| 8 | + pull-request: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + |
| 11 | + permissions: |
| 12 | + actions: read |
| 13 | + contents: read |
| 14 | + id-token: write |
| 15 | + pull-requests: write |
| 16 | + |
| 17 | + steps: |
| 18 | + - name: Checkout Repo |
| 19 | + uses: actions/checkout@v5 |
| 20 | + with: |
| 21 | + fetch-depth: 1 |
| 22 | + |
| 23 | + - name: Review Changes |
| 24 | + uses: anthropics/claude-code-action@v1 |
| 25 | + with: |
| 26 | + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} |
| 27 | + allowed_bots: "*" |
| 28 | + track_progress: true |
| 29 | + prompt: | |
| 30 | + REPO: ${{ github.repository }} |
| 31 | + PR NUMBER: ${{ github.event.pull_request.number }} |
| 32 | +
|
| 33 | + Perform a comprehensive review of this pull request. |
| 34 | +
|
| 35 | + ## Code Quality |
| 36 | + - Code quality and best practices |
| 37 | + - Potential bugs or issues |
| 38 | + - Performance considerations |
| 39 | +
|
| 40 | + ## OWASP Top 10 Analysis |
| 41 | + - SQL Injection vulnerabilities |
| 42 | + - Cross-Site Scripting (XSS) |
| 43 | + - Broken Authentication |
| 44 | + - Sensitive Data Exposure |
| 45 | + - XML External Entities (XXE) |
| 46 | + - Broken Access Control |
| 47 | + - Security Misconfiguration |
| 48 | + - Cross-Site Request Forgery (CSRF) |
| 49 | + - Using Components with Known Vulnerabilities |
| 50 | + - Insufficient Logging & Monitoring |
| 51 | +
|
| 52 | + ## Additional Security Checks |
| 53 | + - Hardcoded secrets or credentials |
| 54 | + - Insecure cryptographic practices |
| 55 | + - Unsafe deserialization |
| 56 | + - Server-Side Request Forgery (SSRF) |
| 57 | + - Race conditions or TOCTOU issues |
| 58 | +
|
| 59 | + Rate severity as: CRITICAL, HIGH, MEDIUM, LOW, or NONE. |
| 60 | + Post detailed findings with recommendations using inline comments for specific issues. Do not be noisy. |
| 61 | +
|
| 62 | + claude_args: >- |
| 63 | + --allowedTools |
| 64 | + "mcp__github_inline_comment__create_inline_comment, |
| 65 | + Bash(gh pr comment:*), |
| 66 | + Bash(gh pr diff:*), |
| 67 | + Bash(gh pr view:*), |
| 68 | + Bash(pnpm:*), |
| 69 | + Edit, |
| 70 | + Glob, |
| 71 | + Grep, |
| 72 | + Read, |
| 73 | + Write" |
0 commit comments