Overview
When Claude is asked to verify suspected security bugs, this plugin activates a rigorous verification process. Bugs are routed through one of two paths based on complexity, and both paths end with six mandatory gate reviews before any verdict.Author: Maciej Domanski
Version: 1.0.0
Version: 1.0.0
Verification Paths
The plugin routes each bug based on complexity:Standard Verification
Linear single-pass checklist for straightforward bugs. No task creation overhead.
Deep Verification
Full task-based orchestration with parallel sub-phases for complex bugs.
Standard Path
Use when ALL of these hold:- Clear, specific vulnerability claim (not vague or ambiguous)
- Single component — no cross-component interaction
- Well-understood bug class (buffer overflow, SQL injection, XSS, etc.)
- No concurrency or async involved
- Straightforward data flow from source to sink
- Data flow tracing
- Exploitability proof
- Impact assessment
- PoC sketch (pseudocode)
- Devil’s advocate spot-check (7 questions)
- Gate review (6 mandatory gates)
Deep Path
Use when ANY of these hold:- Ambiguous claim with multiple interpretations
- Cross-component bug path (data flows through 3+ modules)
- Race conditions, TOCTOU, or concurrency
- Logic bugs without a clear spec to verify against
- Standard verification was inconclusive
- User explicitly requests full verification
- Claim analysis and bug class classification
- Context extraction (execution, caller, architectural, historical)
- Phase 1: Data flow analysis (trust boundaries, API contracts, environment protections)
- Phase 2: Exploitability verification (attacker control, bounds proofs, race proofs)
- Phase 3: Impact assessment (real security impact vs operational robustness)
- Phase 4: PoC creation (pseudocode, executable, unit test, negative PoC)
- Phase 5: Devil’s advocate review (13 questions with LLM self-check)
- Gate reviews: Six mandatory gates before any verdict
Components
Skills
| Skill | Description |
|---|---|
| fp-check | Main verification skill with routing logic and gate reviews |
Agents
| Agent | Phases | Description |
|---|---|---|
| data-flow-analyzer | 1.1–1.4 | Traces data flow from source to sink, maps trust boundaries, checks API contracts and environment protections |
| exploitability-verifier | 2.1–2.4 | Proves attacker control, creates mathematical bounds proofs, assesses race condition feasibility |
| poc-builder | 4.1–4.5 | Creates pseudocode, executable, unit test, and negative PoCs |
Hooks
| Hook | Event | Purpose |
|---|---|---|
| Verification completeness | Stop | Blocks the agent from stopping until all bugs have completed all 5 phases, gate reviews, and verdicts |
| Agent output completeness | SubagentStop | Blocks agents from stopping until they produce complete structured output |
Installation
Triggers
The skill activates when the user asks to verify a suspected bug:- “Is this bug real?” / “Is this a true positive?”
- “Is this a false positive?” / “Verify this finding”
- “Check if this vulnerability is exploitable”
The skill does not activate for bug hunting (“find bugs”, “security analysis”, “audit code”).
Step 0: Understand the Claim
Before any analysis, restate the bug in your own words. If you cannot, ask for clarification. Document:- Exact vulnerability claim: e.g., “heap buffer overflow in
parse_header()whencontent_lengthexceeds 4096” - Alleged root cause: e.g., “missing bounds check before
memcpyat line 142” - Supposed trigger: e.g., “attacker sends HTTP request with oversized Content-Length header”
- Claimed impact: e.g., “remote code execution via controlled heap corruption”
- Threat model: What privilege level? Is it sandboxed? What can the attacker already do?
- Bug class: Memory corruption, injection, logic bug, race condition, etc.
- Execution context: When and how is this code path reached?
- Caller analysis: What functions call this code and what constraints do they impose?
- Historical context: Any recent changes, known issues, or previous security reviews?
Standard Verification Workflow
Step 1: Data Flow
Trace data from source to the alleged vulnerability sink.- Map trust boundaries crossed (internal/trusted vs external/untrusted)
- Identify all validation and sanitization between source and sink
- Check API contracts — many APIs have built-in bounds protection
- Check for environmental protections (compiler, runtime, OS, framework)
Step 2: Exploitability
Prove the attacker can trigger the vulnerability.- Attacker control: Prove the attacker controls data reaching the vulnerable operation
- Bounds proof: For integer/bounds issues, create an explicit algebraic proof
- Race feasibility: For race conditions, prove concurrent access is actually possible
Step 3: Impact
Determine whether exploitation has real security consequences.- Distinguish real security impact (RCE, privesc, info disclosure) from operational robustness issues (crash recovery)
- Distinguish primary security controls from defense-in-depth
Step 4: PoC Sketch
Create a pseudocode PoC showing the attack path:Step 5: Devil’s Advocate Spot-Check
Answer these 7 questions. If any produces genuine uncertainty, escalate to deep verification. Against the vulnerability:- Am I seeing a vulnerability because the pattern “looks dangerous” rather than because it actually is?
- Am I incorrectly assuming attacker control over trusted data?
- Have I rigorously proven the mathematical condition for vulnerability can occur?
- Am I confusing defense-in-depth failure with a primary security vulnerability?
- Am I hallucinating this vulnerability? LLMs are biased toward seeing bugs everywhere.
- Am I dismissing a real vulnerability because the exploit seems complex or unlikely?
- Am I inventing mitigations or validation logic that I haven’t verified in the actual source code?
Step 6: Gate Review
Apply all six gates before any verdict:Example: True Positive
Claim: Buffer overflow inparse_header() when content_length exceeds 4096
- Source: HTTP request header (attacker-controlled)
- Sink:
memcpy()at line 142 - Trust boundary: External network → internal buffer
- Validation: None found between
atoi()andmemcpy() - API contract:
memcpy()has no bounds protection (memcpy_s would prevent this)
- Attacker control: YES — attacker sends HTTP header with
Content-Length: 10000 - Bounds proof:
content_length = 10000,sizeof(buffer) = 4096,10000 > 4096→ overflow confirmed - No upstream validation prevents large values
- Real security impact: YES — heap buffer overflow enables RCE
- Not defense-in-depth: This is a primary boundary
- Pattern bias? NO — mathematically proven overflow
- Trust assumption? NO — HTTP headers are attacker-controlled
- Math proof? YES — explicit bounds proof above
- Defense-in-depth? NO — primary boundary
- Hallucination? NO — code analysis confirmed
- Gate 1 (Control): PASS — attacker controls Content-Length header
- Gate 2 (Reachability): PASS — any HTTP POST triggers this path
- Gate 3 (Validation): FAIL — no validation, vulnerability confirmed
- Gate 4 (API): FAIL — memcpy() has no bounds protection
- Gate 5 (Environment): FAIL — no compiler/OS protection for this pattern
- Gate 6 (Impact): PASS — RCE is real security impact
Example: False Positive
Claim: SQL injection inget_user() when username contains single quotes
- Source: User-supplied username (attacker-controlled)
- Sink:
db.execute() - Validation: None visible in this function
- API contract: Parameterized query —
?placeholder with separate parameters
- Attacker control: YES — attacker can provide any username
- BUT: API contract check reveals parameterized queries prevent injection
- The
?placeholder and separate(username,)tuple mean the database driver escapes the value
- No exploitation possible due to API protection
- Gate 1 (Control): PASS — attacker controls username
- Gate 2 (Reachability): PASS — code is called on every login
- Gate 3 (Validation): PASS — no explicit validation needed
- Gate 4 (API): PASS — Parameterized queries prevent SQL injection by design
- Gate 5 (Environment): PASS — database driver escapes parameters
- Gate 6 (Impact): N/A — no exploitation possible
Rationalizations to Reject
| Rationalization | Why It’s Wrong | Required Action |
|---|---|---|
| ”Rapid analysis of remaining bugs” | Every bug gets full verification | Return to task list, verify next bug through all phases |
| ”This pattern looks dangerous, so it’s a vulnerability” | Pattern recognition is not analysis | Complete data flow tracing before any conclusion |
| ”Skipping full verification for efficiency” | No partial analysis allowed | Execute all steps per the chosen verification path |
| ”The code looks unsafe, reporting without tracing data flow” | Unsafe-looking code may have upstream validation | Trace the complete path from source to sink |
| ”Similar code was vulnerable elsewhere” | Each context has different validation | Verify this specific instance independently |
| ”This is clearly critical” | LLMs are biased toward seeing bugs | Complete devil’s advocate review; prove it with evidence |
Batch Triage
When verifying multiple bugs at once:- Run Step 0 for all bugs first — restating each claim often collapses obvious false positives immediately
- Route each bug independently (some may be standard, others deep)
- Process all standard-routed bugs first, then deep-routed bugs
- After all bugs are verified, check for exploit chains — findings that individually failed may combine to form a viable attack
Final Summary
After processing all suspected bugs, provide:- Counts: X TRUE POSITIVES, Y FALSE POSITIVES
- TRUE POSITIVE list: Each with brief vulnerability description
- FALSE POSITIVE list: Each with brief reason for rejection
Related Skills
- Audit Context Building - Deep context helps verification
- Differential Review - May discover bugs requiring verification