auto-fix
[experimental] Auto-remediate verified findings by generating patches and optionally creating a PR
[beta] Application understanding + threat modeling - maps architecture, generates DFDs, performs STRIDE analysis
> /plugin marketplace add allsmog/vuln-scout > /plugin install vuln-scout@vuln-scout
How it fires
How this command gets triggered: by you, by Claude, or both.
/threatsContext preview
What this command does when you run it.
[beta] Application understanding + threat modeling - maps architecture, generates DFDs, performs STRIDE analysis
name: threats description: "[beta] Application understanding + threat modeling - maps architecture, generates DFDs, performs STRIDE analysis" argument-hint: "[--scope name] [--save filename.md] [--quick] [--diagram-only] [--stride-only]" allowed-tools: - Glob - Grep - Read - Write - TodoWrite - Task
Combines application understanding with systematic threat identification. First understands the application, then identifies what could go wrong.
> "Understanding the application deeply will always beat automation." - NahamSec
Before searching for sinks, understand:
---
| Flag | Effect | |------|--------| | `--quick` | Quick understanding only (skip STRIDE, faster) | | `--diagram-only` | Only generate data flow diagrams | | `--stride-only` | Skip understanding, go straight to STRIDE | | `--scope name` | Use pre-created scope file | | `--save file.md` | Save output to file |
---
1. Create a todo list to track progress 2. If `--quick` flag: do Phase 1 only (app understanding) 3. If `--diagram-only` flag: skip to Phase 2 (Data Flow Diagramming) 4. If `--stride-only` flag: skip to Phase 3 (STRIDE Analysis)
---
For large codebases (>300k tokens), run architecture-level threat modeling on a compressed scope:
# First create compressed scope /vuln-scout:scope . --compress --name architecture # Then run threats on the scope /vuln-scout:threats --scope architecture --save .claude/threat-model.md
1. Load scope file from `.claude/scope-[name].md` 2. Generate **system-level** DFDs and trust boundaries (not function-level) 3. Perform STRIDE on **components** (services, modules, data stores) not individual functions 4. Focus on:
5. Output serves as **context for module-level audits**
| Aspect | Compressed (System-Level) | Full Code (Function-Level) | |--------|---------------------------|---------------------------| | Scope | Entire codebase | Single module | | Components | Services, modules, data stores | Functions, methods, classes | | Threats | Architecture flaws, trust issues | Implementation bugs, injection points | | DFDs | High-level data flow | Detailed source-to-sink | | Use case | Initial threat landscape | Deep vulnerability hunting |
The threat model generated here is automatically loaded by `/vuln-scout:full-audit` when analyzing individual modules:
# Phase 1: Create system threat model (once) /vuln-scout:threats --scope architecture --save .claude/threat-model.md # Phase 2: Module audits reference this context /vuln-scout:full-audit --scope impl # ^ Shows relevant threats from system model for this module
---
Search for all places where data enters the system:
# HTTP endpoints grep -rniE "(app\.(get|post|put|delete|patch)|@(Get|Post|Put|Delete|Patch|RequestMapping)|router\.(get|post))" --include="*.ts" --include="*.js" --include="*.java" --include="*.py" # WebSocket handlers grep -rniE "(ws\.|websocket|socket\.on|@OnMessage)" --include="*.ts" --include="*.js" --include="*.java" # File upload handlers grep -rniE "(multer|upload|multipart|@RequestPart|FileUpload)" --include="*.ts" --include="*.js" --include="*.java" --include="*.py" # GraphQL resolvers grep -rniE "(resolver|@Query|@Mutation|graphql)" --include="*.ts" --include="*.js" # Browser Event Handlers (CRITICAL - often missed!) grep -rniE "(addEventListener\s*\(\s*['\"]message['\"]|\.onmessage\s*=)" --include="*.js" --include="*.ts" --include="*.html" # postMessage origin validation check grep -rniE "addEventListener\s*\(\s*['\"]message['\"]" --include="*.js" --include="*.ts" -A 10 | grep -v "origin"
**IMPORTANT**: Browser event handlers like `addEventListener("message", ...)` are entry points for cross-origin data! Check for missing `event.origin` validation.
Document each entry point with:
Search for business logic components:
# Services/Controllers grep -rniE "(Service|Controller|Handler|Manager|Processor)" --include="*.ts" --include="*.js" --include="*.java" --include="*.py" # Middleware grep -rniE "(middleware|interceptor|filter|@Before|@After)" --include="*.ts" --include="*.js" --include="*.java" # Background workers grep -rniE "(queue|worker|job|cron|scheduler|@Scheduled)" --include="*.ts" --include="*.js" --include="*.java" --include="*.py"
Search for persistence layers:
# Database connections grep -rniE "(mongoose|sequelize|prisma|typeorm|knex|sqlalchemy|hibernate|activerecord)" --include="*.ts" --include="*.js" --include="*.java" --include="*.py" --include="*.rb" # Cache systems grep -rniE "(redis|memcached|cache|@Cacheable)" --include="*.ts" --include="*.js" --include="*.java" --include="*.py" # File storage grep -rniE "(s3|blob|storage|FileOutputStream|writeFile)" --include="*.ts" --include="*.js" --include="*.java" --include="*.py" # Message queues grep -rniE "(rabbitmq|kafka|sqs|pubsub|amqp)" --include="*.ts" --include="*.js" --include="*.java" --include="*.py"
Search for third-party integrations:
# HTTP clients (external API calls) grep -rniE "(axios|fetch|requests\.|HttpClient|RestTemplate)" --include="*.ts" --include="*.js" --include="*.java" --include=
AI-powered whitebox penetration testing plugin for Claude Code. 9 languages, 22 skills, 7 autonomous agents. STRIDE threat modeling, OWASP 2025 coverage, polyglot monorepo support.
Repo: allsmog/vuln-scout
[experimental] Auto-remediate verified findings by generating patches and optionally creating a PR
[experimental] Create a custom Semgrep detection rule from a confirmed vulnerability pattern
[stable] Compare security posture between two git refs to find new/fixed vulnerabilities and track regression
[stable] End-to-end security audit with hotspot-aware framework pivots, shared findings.json schema, and CI-friendly workflow flags
[beta] Audit a decompiled Android target — scans jadx_out/sources + apktool_out together and merges findings