AgentReview
AI writes the code. AgentReview reviews it.
AgentReview is an independent security reviewer for AI-generated code. It works alongside your existing AI coding agent — Copilot, Claude Code, Cursor, Codex, or any other — to detect security vulnerabilities in code changes before they reach production.
Why?
AI coding agents are incredibly productive. They write implementations fast. But speed without security review creates risk.
AgentReview provides the missing piece:
Developer gives task to AI agent
↓
AI agent modifies code
↓
AgentReview detects & reviews changes
↓
Security findings appear in VS Code
↓
Developer clicks "Fix with Agent"
↓
AI agent receives precise remediation instructions
↓
AgentReview re-runs → vulnerability resolved ✅
AgentReview is NOT another coding agent. It's the security layer around your coding agent.
Features
- 🔍 Git Change Detection — Reviews only what changed, not the entire repository
- 🛡️ 10 Security Detectors — SQL injection, command injection, XSS, SSRF, path traversal, hardcoded secrets, weak crypto, unsafe deserialization, auth issues, dependency risk
- 📊 VS Code Integration — Problems panel, inline diagnostics, sidebar tree, review dashboard
- 🤖 Fix with Agent — Generates precise remediation prompts for your existing AI agent
- 🔄 Re-review Loop — Verifies whether the fix actually resolved the vulnerability
- 📜 Review History — Tracks review sessions and resolved findings
- 🔒 Privacy First — All analysis is local. No code leaves your machine.
- 💰 Zero LLM Cost — No API keys required. No cloud dependencies.
How It Works
AgentReview runs entirely locally using deterministic security analysis:
Git Diff → Pattern Analysis → Secret Scanning → Security Rules → Findings → VS Code UI
When a finding is detected, you can:
- View the vulnerable code in context
- Fix with Agent — copies a detailed remediation prompt to your clipboard
- Paste the prompt into your AI coding agent
- Re-review to verify the fix
Installation
From Source
git clone https://github.com/akhilvvn/agentreview.git
cd agentreview
npm install
npm run build
Then press F5 in VS Code to launch the Extension Development Host.
From VSIX
npm run package
code --install-extension agent-review-security-0.1.0.vsix
Quick Start
- Open a project in VS Code
- Make some code changes (or let your AI agent make them)
- Open the Command Palette (
Ctrl+Shift+P / Cmd+Shift+P)
- Run: AgentReview: Review Changes
- Review findings in the sidebar and Problems panel
- Click Fix with Agent on any finding
- Paste the remediation prompt into your AI coding agent
- Run: AgentReview: Re-run Review to verify the fix
Commands
| Command |
Description |
AgentReview: Review Changes |
Review all git changes |
AgentReview: Review Current File |
Review the active file |
AgentReview: Review Selection |
Review selected code |
AgentReview: Fix with Agent |
Generate fix prompt for a finding |
AgentReview: Ignore Finding |
Ignore or mark as false positive |
AgentReview: Clear Findings |
Clear all findings |
AgentReview: Re-run Review |
Re-review and check for resolved issues |
AgentReview: Show Review |
Focus the AgentReview panel |
Configuration
| Setting |
Default |
Description |
agentReview.enabled |
true |
Enable/disable the extension |
agentReview.maxFiles |
50 |
Max files to review |
agentReview.maxFileSizeKb |
500 |
Max file size (KB) |
agentReview.maxContextLines |
80 |
Max context lines around changed code |
agentReview.includeStagedChanges |
true |
Include staged and unstaged Git changes |
agentReview.minimumConfidence |
0.65 |
Min confidence threshold |
agentReview.ignoredPaths |
See below |
Paths to skip |
agentReview.privacy.excludePatterns |
See below |
Files never sent externally |
Security Detectors
| Detector |
CWE |
Description |
| Secret Detection |
CWE-798 |
Hardcoded API keys, tokens, passwords |
| SQL Injection |
CWE-89 |
String interpolation in SQL queries |
| Command Injection |
CWE-78 |
Dynamic input in exec/spawn |
| Path Traversal |
CWE-22 |
User input in file paths |
| XSS |
CWE-79 |
Unsafe innerHTML/dangerouslySetInnerHTML |
| SSRF |
CWE-918 |
User-controlled URLs in HTTP requests |
| Weak Crypto |
CWE-327 |
MD5/SHA1 for passwords, Math.random() for tokens |
| Unsafe Deserialization |
CWE-502 |
eval(), pickle, yaml.load |
| Auth Issues |
CWE-862 |
Missing auth checks, weak role patterns |
Security & Privacy
- All analysis is local — no code leaves your machine
- No telemetry — no usage data collected
- No API keys required — zero cloud dependencies
- Privacy-sensitive files excluded by default (
.env, *.pem, secrets/)
- Secrets are masked in findings — never exposed in full
- No LLM integration in the MVP — AgentReview does not call or pay for an AI service
- Fix with Agent copies a prompt — it does not automatically modify files or claim to control another agent
Architecture
See docs/architecture.md for details.
src/
├── extension.ts # Entry point
├── git/ # Git integration & diff parsing
├── analysis/ # Analysis engine & detector interface
├── detectors/ # 10 security detectors
├── findings/ # Finding model, store, deduplication
├── fix/ # Fix prompt generation & agent integration
├── review/ # Review engine, sessions, history
├── ui/ # Diagnostics, tree view, panel, status bar
└── utils/ # Logger, hashing, config, paths
Development
# Install dependencies
npm install
# Type check
npm run typecheck
# Build
npm run build
# Watch mode
npm run watch
# Run tests
npm test
# Lint
npm run lint
# Format
npm run format
# Package VSIX
npm run package
The MVP is entirely local and deterministic. It reviews Git changes, untracked text files,
or the active file when Git is unavailable. The Fix with Agent action copies a focused
remediation prompt to the clipboard for the user's existing coding agent.
Roadmap
Current (MVP)
- ✅ Local deterministic security analysis
- ✅ 10 security detectors
- ✅ Fix with Agent (clipboard)
- ✅ Re-review loop
- ✅ Review history
Next
- Native VS Code Chat API integration
- AST-based data flow analysis
- Additional language support
- Custom security rules
Future
- Optional AI-powered adversarial reviewer
- Team policies and dashboards
- CI/CD integration
Contributing
See docs/development.md.
License
MIT