Files
jonnydevs c070b9b588 fix(fp-check): use correct JSON response format in stop hooks (#129)
* fix(fp-check): use correct JSON response format in stop hooks

Prompt-type stop hooks must respond with JSON. The previous prompts
instructed Claude to return plain text ('block' or 'approve'), causing
'Stop hook error: JSON validation failed' on every session end.

Updated both Stop and SubagentStop hook prompts to respond with:
- {"decision": "block", "reason": "..."} to prevent stopping
- {} to allow stopping (omitting decision field per Claude Code docs)

Bug discovered by Claude while debugging the JSON validation error
during active use of the fp-check skill.

* fix: use documented ok/reason schema for prompt hooks, bump to 1.0.2

Per https://code.claude.com/docs/en/hooks.md (Prompt-based hooks >
Response schema), prompt hooks must respond {"ok": true} to allow or
{"ok": false, "reason": "..."} to block — not {"decision": "block"}
or {}. Also bump to 1.0.2 since main already shipped 1.0.1 without
this fix; clients only update when the version increases.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Dan Guido <dan@trailofbits.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 15:41:52 -04:00
..

fp-check

A Claude Code plugin that enforces systematic false positive verification when verifying suspected security bugs.

Overview

When Claude is asked to verify suspected security bugs, this plugin activates a rigorous per-bug verification process. Bugs are routed through one of two paths:

  • Standard verification — a linear single-pass checklist for straightforward bugs (clear claim, single component, well-understood bug class). No task creation overhead.
  • Deep verification — full task-based orchestration with parallel sub-phases for complex bugs (cross-component, race conditions, ambiguous claims, logic bugs without spec).

Both paths end with six mandatory gate reviews. Each bug receives a TRUE POSITIVE or FALSE POSITIVE verdict with documented evidence.

Installation

/plugin install fp-check

Components

Skills

Skill Description
fp-check Systematic false positive verification for security bug analysis

Agents

Agent Phases Description
data-flow-analyzer 1.11.4 Traces data flow from source to sink, maps trust boundaries, checks API contracts and environment protections
exploitability-verifier 2.12.4 Proves attacker control, creates mathematical bounds proofs, assesses race condition feasibility
poc-builder 4.14.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 for their assigned phases

Reference Files

File Purpose
standard-verification.md Linear single-pass checklist for straightforward bugs
deep-verification.md Full task-based orchestration with parallel sub-phases for complex bugs
gate-reviews.md Six mandatory gates and verdict format
false-positive-patterns.md 13-item checklist of common false positive patterns and red flags
evidence-templates.md Documentation templates for verification evidence
bug-class-verification.md Bug-class-specific verification requirements (memory corruption, logic bugs, race conditions, etc.)

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").

Methodology

Each bug is routed based on complexity:

Standard Path

For bugs with a clear claim, single component, and well-understood bug class:

  1. Data flow — trace source to sink, check API contracts and protections
  2. Exploitability — prove attacker control, bounds proofs, race feasibility
  3. Impact — real security impact vs operational robustness
  4. PoC sketch — pseudocode PoC required
  5. Devil's advocate spot-check — 5+2 targeted questions
  6. Gate review — six mandatory gates

Standard verification escalates to deep at two checkpoints if complexity warrants it.

Deep Path

For bugs with ambiguous claims, cross-component paths, concurrency, or logic bugs:

  1. Claim analysis — restate the vulnerability claim precisely, classify the bug class
  2. Context extraction — execution context, caller analysis, architectural and historical context
  3. Phase 1: Data flow analysis — trust boundary mapping, API contracts, environment protections, cross-references
  4. Phase 2: Exploitability verification — attacker control, mathematical bounds proofs, race condition proof, adversarial analysis
  5. Phase 3: Impact assessment — real security impact vs operational robustness, primary controls vs defense-in-depth
  6. Phase 4: PoC creation — pseudocode with data flow diagrams, executable PoC, unit test PoC, negative PoC
  7. Phase 5: Devil's advocate review — 13-question challenge with LLM hallucination self-check
  8. Gate reviews — six mandatory gates before any verdict