Skip to main content

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

string
required
Directory or file to analyze
string
Focus on specific vulnerability type (optional)
string
Pre-existing findings.json to validate (skips discovery)
string
Path to compiled binary for Stage E feasibility analysis
boolean
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.
Output: 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)
Output: findings.json with status “pending” or “not_disproven”

Stage B: Process Analysis (Claude)

Stage B is critical. This is where superficial scanning becomes thorough validation.
Systematic analysis with attack trees:
  1. Build attack surface: sources, sinks, trust boundaries → attack-surface.json
  2. Build attack tree: knowledge graph of attack paths → attack-tree.json
  3. Form hypotheses: testable predictions for each finding → hypotheses.json
  4. Test hypotheses: gather evidence, verify predictions
  5. Track failures: why approaches didn’t work → disproven.json
  6. Track proximity: how close to exploitation (0-10 scale) → attack-paths.json
Stage B produces 5 working documents:

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)
Output: Update 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
Output: Update findings.json with ruling and final_status fields

Stage E: Feasibility (Python)

For memory corruption only:
Output: exploit-context.json Final Status After Stage E:

Execution Models

Non-Agentic Mode (Claude Code)

When user runs /validate <path>:
  1. You are the LLM - perform the analysis yourself
  2. Run Stage 0 via Python (inventory) → checklist.json
  3. Stage A: Read files, identify vulnerabilities → findings.json
  4. Stage B: Build attack trees, form & test hypotheses → 5 working docs
  5. Stage C: Verify findings against actual code
  6. Stage D: Make rulings based on Stage B evidence
  7. Run Stage E via Python if binary provided

Agentic Mode (Python Orchestration)

When user runs python3 raptor.py agentic --repo <path>:
  1. Semgrep/CodeQL scan first - produces SARIF files
  2. SARIF conversion - deduplicates findings
  3. If LLM API available - runs full validation pipeline via API calls
  4. If no LLM API - deduplication only, skips validation theater
  5. Stage E - runs if binary provided

Vulnerability Types

string
OS command injection
string
SQL injection
string
Cross-site scripting
string
Directory traversal
string
Server-side request forgery
string
Insecure deserialization
string
Buffer overflow (memory corruption)
string
Format string vulnerabilities

Examples

Validate Web Application

Scans for command injection vulnerabilities.

Validate All Vulnerability Types

Comprehensive validation of all vulnerability classes.

Validate Pre-Existing Findings

Validates findings from external scanners.

Validate Memory Corruption with Binary

Includes Stage E feasibility analysis.

Skip Feasibility Analysis

Skips Stage E (not recommended for memory corruption).

Output Structure

Stage B: Why It Matters

If you’re tempted to skip Stage B because findings “obviously” look like false positives, don’t.
Create hypotheses even for “obvious” false positives:
  1. Create the hypothesis (e.g., “H1: SSRF via urlretrieve”)
  2. List testable predictions (e.g., “P1.1: Script runs at runtime”)
  3. Gather evidence to disprove (e.g., “Script outputs .h file → build-time only”)
  4. Record in disproven.json with lesson learned
This creates an audit trail and catches cases where “obvious” false positives are actually exploitable.

MUST-GATEs

This command enforces strict validation gates:
  1. ASSUME-EXPLOIT: Investigate as if exploitable until proven otherwise
  2. STRICT-SEQUENCE: Follow methodology, additional ideas presented separately
  3. CHECKLIST: Track coverage compliance
  4. NO-HEDGING: Verify all “if/maybe/uncertain” claims
  5. FULL-COVERAGE: Check ALL code, no sampling
  6. PROOF: Show vulnerable code for every finding

When to Use

  • After /scan or /agentic produces findings
  • Before investing time in /exploit development
  • When you suspect false positives from scanners
  • To validate third-party security reports

Workflow Integration

/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