Overview
The/validate command validates that vulnerability findings are real, reachable, and exploitable before investing in exploit development. It runs a rigorous 6-stage validation pipeline to filter out false positives and assess true exploitability.
Validation prevents wasted effort on false positives. Use this before
/exploit to ensure findings are genuine.Syntax
Parameters
Directory or file to analyze
Focus on specific vulnerability type (optional)
Pre-existing findings.json to validate (skips discovery)
Path to compiled binary for Stage E feasibility analysis
Skip Stage E even for memory corruption vulnerabilities
Validation Stages
All stages are mandatory. Execute in sequence: 0 → A → B → C → D → E
Stage 0: Inventory (Python)
Build checklist of all code to analyze.checklist.json
Stage A: One-Shot Analysis (Claude)
Quick vulnerability identification:- Read source files
- Look for injection, overflow, UAF, format string, deserialization
- Note: file, line, function, vuln_type, proof (actual code)
findings.json with status “pending” or “not_disproven”
Stage B: Process Analysis (Claude)
Systematic analysis with attack trees:- Build attack surface: sources, sinks, trust boundaries →
attack-surface.json - Build attack tree: knowledge graph of attack paths →
attack-tree.json - Form hypotheses: testable predictions for each finding →
hypotheses.json - Test hypotheses: gather evidence, verify predictions
- Track failures: why approaches didn’t work →
disproven.json - Track proximity: how close to exploitation (0-10 scale) →
attack-paths.json
Stage C: Sanity Check (Claude)
Verify against actual code:- Confirm file exists at stated path
- Confirm vulnerable code exists at stated line (VERBATIM)
- Confirm source→sink flow is real
- Confirm code is reachable (called from main/handler)
findings.json with sanity_check field
Stage D: Ruling (Claude)
Make final determinations:- Rule out test code, dead code, already-mitigated code
- Check for preconditions that prevent exploitation
- Apply hypothesis results from Stage B
- Final status: Exploitable, Confirmed, or Ruled Out
findings.json with ruling and final_status fields
Stage E: Feasibility (Python)
For memory corruption only:exploit-context.json
Final Status After Stage E:
| Verdict | Final Status | Meaning |
|---|---|---|
| Likely | Exploitable | Clear path to code execution |
| Difficult | Confirmed (Constrained) | Primitives exist but hard to chain |
| Unlikely | Confirmed (Blocked) | No viable path with current mitigations |
| N/A | Confirmed | Web/injection vuln (Stage E skipped) |
Execution Models
Non-Agentic Mode (Claude Code)
When user runs/validate <path>:
- You are the LLM - perform the analysis yourself
- Run Stage 0 via Python (inventory) →
checklist.json - Stage A: Read files, identify vulnerabilities →
findings.json - Stage B: Build attack trees, form & test hypotheses → 5 working docs
- Stage C: Verify findings against actual code
- Stage D: Make rulings based on Stage B evidence
- Run Stage E via Python if binary provided
Agentic Mode (Python Orchestration)
When user runspython3 raptor.py agentic --repo <path>:
- Semgrep/CodeQL scan first - produces SARIF files
- SARIF conversion - deduplicates findings
- If LLM API available - runs full validation pipeline via API calls
- If no LLM API - deduplication only, skips validation theater
- Stage E - runs if binary provided
Vulnerability Types
OS command injection
SQL injection
Cross-site scripting
Directory traversal
Server-side request forgery
Insecure deserialization
Buffer overflow (memory corruption)
Format string vulnerabilities
Examples
Validate Web Application
Validate All Vulnerability Types
Validate Pre-Existing Findings
Validate Memory Corruption with Binary
Skip Feasibility Analysis
Output Structure
Stage B: Why It Matters
| Without Stage B | With Stage B |
|---|---|
| Quick ruling based on gut feel | Evidence-backed ruling from tested hypotheses |
| ”Looks like a false positive" | "Hypothesis H2 disproven: ws:// only in comment (evidence: line 463)“ |
| No record of what was tried | disproven.json documents failed approaches |
| No proximity tracking | PROXIMITY scores show how close to exploitation |
- Create the hypothesis (e.g., “H1: SSRF via urlretrieve”)
- List testable predictions (e.g., “P1.1: Script runs at runtime”)
- Gather evidence to disprove (e.g., “Script outputs .h file → build-time only”)
- Record in
disproven.jsonwith lesson learned
MUST-GATEs
This command enforces strict validation gates:- ASSUME-EXPLOIT: Investigate as if exploitable until proven otherwise
- STRICT-SEQUENCE: Follow methodology, additional ideas presented separately
- CHECKLIST: Track coverage compliance
- NO-HEDGING: Verify all “if/maybe/uncertain” claims
- FULL-COVERAGE: Check ALL code, no sampling
- PROOF: Show vulnerable code for every finding
When to Use
- After
/scanor/agenticproduces findings - Before investing time in
/exploitdevelopment - When you suspect false positives from scanners
- To validate third-party security reports
Workflow Integration
Related Commands
/scan
Generate findings to validate
/exploit
Generate exploits after validation
/agentic
Full workflow with automatic validation
/crash-analysis
Root-cause analysis for crashes
Notes
- Stage E only runs for memory corruption vulnerabilities
- Web vulnerabilities skip directly to final output after Stage D
- Validation adds 5-10 minutes but prevents wasted effort
- Use before exploit development to ensure findings are real
- Produces audit trail of investigation process