/phoenix-security-review:0day-scannerfrom phoenix-security-review
Analyzes code changes (commits, PRs, files, branches) for zero-day vulnerabilities using LLM-powered scanning with cost budgeting and knowledge-graph linking.
Ships in phoenix-security-review. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Analyze code changes (commits, PRs, files) for potential zero-day security vulnerabilities using LLM-powered analysis. This skill provides conversational access to the 0-Day Scanner Agent with real-time token monitoring and knowledge graph integration.
Stack-aware fallback (when MCP unavailable): if
analyze_for_zero_day_vulnerabilitiesis not reachable, detect the changed files' language(s) and load the matching reference pack from../security-reviewer/languages/{python,javascript-typescript,go,java,rust,ruby,dotnet}.mdto drive a diff-only review using the assistant's built-in tools. Apply the 8-point check from../security-reviewer/SKILL.mdscoped to the diff.
Extract:
Use MCP tool analyze_for_zero_day_vulnerabilities:
{
"commit_sha": "abc123def456",
"mode": "light",
"max_cost_usd": 0.10,
"link_to_graph": true,
"save_to_db": true,
"stream_tokens": true,
"return_reasoning": true
}
If vulnerabilities found:
If no vulnerabilities found:
Offer to:
User: "Analyze commit abc123 for security vulnerabilities"
Assistant:
I'll analyze commit abc123 for potential zero-day vulnerabilities using light-touch mode (estimated cost: $0.05).
[Analyzing commit abc123...]
Token usage: 3,500 input + 800 output = 4,300 total ($0.043)
🔴 **CRITICAL VULNERABILITY FOUND**
**Type**: SQL Injection
**Severity**: Critical
**Confidence**: 85%
**Description**: SQL injection vulnerability found where user input is directly concatenated into a query string without parameterization.
**Vulnerable Code**:
```python
query = f"SELECT * FROM users WHERE id={user_id}" # VULNERABLE: unsanitized input
Proof of Concept:
' OR 1=1 --
Knowledge Graph Context:
getUserById, authenticateUserhandleRequest → authenticateUser → getUserByIdRemediation: Use parameterized queries or prepared statements to prevent SQL injection.
Would you like me to:
### Example 2: PR Review
**User**: "Check PR #1234 for security issues, budget $0.20"
**Assistant**:
I'll analyze PR #1234 for security vulnerabilities with a budget of $0.20.
[Fetching PR #1234: "Add user authentication"] [Found 3 commits to analyze]
[Analyzing commit 1/3...] Token usage: 4,200 tokens ($0.042) ✅ No vulnerabilities found
[Analyzing commit 2/3...] Token usage: 5,100 tokens ($0.051) 🟡 MEDIUM VULNERABILITY FOUND
Type: Weak Cryptography Severity: Medium Description: Uses MD5 for password hashing instead of bcrypt/scrypt
[Analyzing commit 3/3...] Token usage: 3,800 tokens ($0.038) ✅ No vulnerabilities found
Summary:
Would you like details on the weak cryptography finding?
### Example 3: File Analysis
**User**: "Is src/auth.ts secure?"
**Assistant**:
I'll analyze the current state of src/auth.ts for security vulnerabilities.
[Reading file: src/auth.ts] [Analyzing for vulnerabilities...]
Token usage: 2,800 input + 600 output = 3,400 total ($0.034)
✅ NO CRITICAL VULNERABILITIES FOUND
However, I noticed some security best practices that could be improved:
These are not exploitable vulnerabilities but could strengthen security posture.
Would you like me to:
### Example 4: Full Repository Analysis
**User**: "Scan the entire repository for 0-day vulnerabilities in the last 30 days, budget $5"
**Assistant**:
I'll perform a comprehensive security audit of the repository, analyzing all commits from the last 30 days with a budget of $5.00.
[Fetching commits from main and develop branches...] [Found 87 commits to analyze] [Estimated cost: $4.35]
[Progress: 10/87 commits analyzed (11%)] Token usage: 3,200 tokens ($0.48) Findings: 1 (Medium)
[Progress: 25/87 commits analyzed (29%)] Token usage: 8,100 tokens ($1.22) Findings: 2 (1 High, 1 Medium)
[Progress: 50/87 commits analyzed (57%)] Token usage: 16,500 tokens ($2.48) Findings: 4 (1 Critical, 1 High, 2 Medium)
🔴 CRITICAL VULNERABILITY FOUND (Commit: def456) Type: Command Injection File: src/utils/exec.ts Blast Radius: 12 direct callers, 45 transitive
[Progress: 75/87 commits analyzed (86%)] Token usage: 24,800 tokens ($3.72) Findings: 5 (1 Critical, 2 High, 2 Medium)
[Progress: 87/87 commits analyzed (100%)] ✅ ANALYSIS COMPLETE
Summary:
Findings:
Top Vulnerabilities:
Affected Files: 5 files across 12 modules Knowledge Graph: All vulnerabilities linked to affected symbols
Would you like me to:
## Key APIs
### MCP Tool
```typescript
analyze_for_zero_day_vulnerabilities({
// Input source (one required)
commit_sha?: string,
pr_number?: number,
file_path?: string,
diff?: string,
full_repo?: boolean, // Analyze entire repository
// Full repo options (when full_repo=true)
max_commits?: number, // Max commits to analyze (default: 100)
since_date?: string, // ISO 8601 date (e.g., "2026-01-01T00:00:00Z")
since_days?: number, // Scan last N days (alternative to since_date)
branches?: string[], // Branches to scan (default: ["main", "master"])
// Analysis options
mode: "light" | "standard" | "deep",
max_cost_usd?: number, // Budget limit (default: 0.10 for single, 5.00 for full repo)
provider?: "openai" | "anthropic" | "gemini",
model?: string,
// Integration
link_to_graph?: boolean,
save_to_db?: boolean,
stream_tokens?: boolean,
return_reasoning?: boolean
})
# Light-touch analysis
POST /api/v1/zeroday/analyze/light
{
"commit_sha": "abc123",
"repo_url": "https://github.com/owner/repo",
"mode": "light",
"max_cost_usd": 0.10
}
# Full repository analysis
POST /api/v1/zeroday/analyze/full-repo
{
"repo_url": "https://github.com/owner/repo",
"mode": "standard",
"max_commits": 100,
"since_days": 30,
"branches": ["main", "develop"],
"max_cost_usd": 5.00,
"link_to_graph": true,
"stream_tokens": true
}
# Programmatic launch
POST /api/v1/zeroday/scans/launch
{
"scan_type": "commit",
"target": {"repo_url": "...", "commit_sha": "..."},
"options": {"mode": "light", "max_cost_usd": 0.50}
}
# Get scan status
GET /api/v1/zeroday/scans/{scan_id}
# Stream updates (SSE)
GET /api/v1/zeroday/scans/{scan_id}/stream
Users can override defaults:
"Analyze commit abc123 using Claude Sonnet, budget $0.50"
"Scan PR #1234 in deep mode, don't save to database"
-- Get all 0-day vulnerabilities in repository
MATCH (v:Vulnerability)
WHERE v.detected_at > datetime() - duration({days: 7})
RETURN v.vuln_type, v.severity, v.commit_sha
-- Find functions with critical vulnerabilities
MATCH (v:Vulnerability {severity: 'critical'})-[:AFFECTS]->(f:Function)
RETURN f.name, f.filePath, v.vuln_type
-- Calculate vulnerability density by file
MATCH (v:Vulnerability)-[:AFFECTS]->(s)
WITH s.filePath AS file, COUNT(v) AS vuln_count
RETURN file, vuln_count
ORDER BY vuln_count DESC
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub security-phoenix-demo/security-skills-claude-code --plugin phoenix-security-review6 skills in this plugin
/security-assessmentComprehensive OWASP Top 10 2025 and ASVS Level 1 security assessment across a whole codebase, with cost budgeting, knowledge-graph linking and automated test generation. Use whenever someone asks to run a security assessment, a security audit, a security check or a vulnerability assessment; mentions OWASP Top 10 or ASVS; or wants a full security pass before a release. Prefers the `run_security_assessment` MCP tool and falls back to the bundled OWASP/ASVS checklists and per-language reference packs when MCP is unreachable. For a diff-scoped pass use `0day-scanner`; for design risk use `threat-modeling`; for a threat-model-driven review use `tm-security-review`.
/security-reviewerMulti-language security review for web apps, APIs, and CLIs. Use whenever code is added or modified — new endpoints, auth/RBAC changes, template or DOM rendering, outbound HTTP, dependency updates, IaC/config changes, or end-of-feature reviews. Covers Python, JavaScript, TypeScript, Go, Rust, Java/Kotlin, Ruby, C#/.NET, plus shared OWASP Top 10 and ASVS L1 logic. Triggers on phrases like "security review", "review this for security", "audit this code", "is this safe", "AppSec check", "threat-model this change", "supply chain risk", "before I merge", or whenever a senior engineer would pause to ask "what could go wrong here". Pairs with the `security-reviewer` subagent and the session-start / pre-bash / post-edit hooks shipped alongside it.Other plugins' skills for the same job