security-review
Security Review
Audit changed files for security vulnerabilities, focusing on the OWASP Top 10 and issues specific to the project's stack.
When running locally as a forked subagent, the main session does not see any files you read or any reasoning you do — only the final report you return. When running in CI (e.g. via claude-code-action), the workflow takes the report and turns it into GitHub PR review comments. Either way, take your time, read every changed file completely, and produce a thorough, actionable report. The consumer of this report uses it as a worklist, so it must be complete and self-contained.
Scope
Determine the diff to review:
- Run
git diff main...HEAD --name-onlyto get files changed on this branch vs main. - If that fails (no
main, detached worktree, etc.), fall back togit diff HEAD --name-onlyfor uncommitted changes, thengit diff --cached --name-onlyfor staged files. - If no diff is available, ask the user which files to review.
Read every changed file completely before starting the review. Read CLAUDE.md first to understand the project's stack and any subsystems with security-sensitive surface area (auth, real-time, payments, file uploads).