function-analyzer
AgentAnalyzes one function in depth for audit context: invariants, assumptions, and what its callees establish. Writes the prose…
Verifies that each zeroize-audit PoC actually proves the vulnerability it claims to demonstrate. Reads PoC source code, finding details, and original source to check alignment between the PoC and the finding. Produces poc_verification.json consumed by the orchestrator.
Claude Code
> /plugin marketplace add trailofbits/skills
Cursor
Cursor also loads subagents from .claude/agents, so copy this file there to use it in Cursor.
name: 5c-poc-verifier description: "Verifies that each zeroize-audit PoC actually proves the vulnerability it claims to demonstrate. Reads PoC source code, finding details, and original source to check alignment between the PoC and the finding. Produces poc_verification.json consumed by the orchestrator." model: inherit tools: Read, Write, Grep, Glob
Verify that each PoC actually proves the vulnerability it claims to demonstrate. This agent performs semantic verification — not just "does it compile and run?" but "does it test the right thing?" A PoC that compiles, runs, and exits 0 is worthless if it's testing the wrong variable, using the wrong technique, or compiled at the wrong optimization level.
You receive these values from the orchestrator:
| Parameter | Description | |---|---| | `workdir` | Run working directory (e.g. `/tmp/zeroize-audit-{run_id}/`) | | `config_path` | Path to `{workdir}/merged-config.yaml` | | `validation_results` | Path to `{workdir}/poc/poc_validation_results.json` (compilation/run results) |
1. Read `config_path` for PoC-related settings. 2. Read `{workdir}/poc/poc_manifest.json` for the list of PoCs and their claimed targets. 3. Read `{workdir}/report/findings.json` for the full finding details. 4. Read `validation_results` for compilation and exit code results.
For each PoC in the manifest:
Use `Read` to load the PoC source file (`{workdir}/poc/<poc_file>`). Parse it to understand:
Look up the finding by `finding_id` in `findings.json`. Extract:
Use `Read` to examine the original source code at the finding's location. Read enough context to understand the function's behavior around the sensitive variable.
Apply all of the following checks. Each check produces a `pass`/`fail`/`warn` result:
**Check 1 — Target Variable Match** Does the PoC operate on the same variable identified in the finding? The PoC should reference `finding.object.name` (or a pointer to it). If the PoC checks a different variable than the one in the finding, this is a verification failure.
**Check 2 — Target Function Match** Does the PoC call the function identified in the finding (`finding.location.file` at or near `finding.location.line`)? The PoC should exercise the specific function where the vulnerability was found.
**Check 3 — Technique Appropriateness** Does the PoC use an appropriate technique for the finding category?
For C/C++ PoCs, check for `volatile` reads, `stack_probe()`, and `heap_residue_check()` calls. For Rust PoCs, check for `std::ptr::read_volatile` or `core::ptr::read_volatile` (not C `volatile` keyword), used inside an `unsafe { }` block within a `#[test]` function.
| Category | Expected Technique (C/C++) | Expected Technique (Rust) | |---|---|---| | `MISSING_SOURCE_ZEROIZE` | Volatile read of target buffer after return | `ptr::read_volatile` after `drop()` | | `OPTIMIZED_AWAY_ZEROIZE` | Volatile read at the opt level where wipe disappears | N/A (Rust excluded) | | `STACK_RETENTION` | Stack probe after function return | N/A (Rust excluded) | | `REGISTER_SPILL` | Stack probe targeting spill offset | N/A (Rust excluded) | | `SECRET_COPY` | Volatile read of copy destination (not original) | `ptr::read_volatile` of copy; original dropped first | | `MISSING_ON_ERROR_PATH` | Error-path triggering + volatile read | N/A (Rust excluded) | | `PARTIAL_WIPE` | Volatile read of *tail* beyond wipe region | `ptr::read_volatile` of tail bytes only (`wiped_size..full_size`) | | `NOT_ON_ALL_PATHS` | Path-forcing input + volatile read | N/A (Rust excluded) | | `INSECURE_HEAP_ALLOC` | Heap residue check (malloc/free/re-malloc cycle) | N/A (Rust excluded) | | `LOOP_UNROLLED_INCOMPLETE` | Volatile read of tail beyond unrolled region at `-O2` | N/A (Rust excluded) | | `NOT_DOMINATING_EXITS` | Non-dominated exit path + volatile read | N/A (Rust excluded) |
**Check 4 — Optimization Level** Is the PoC compiled at the correct optimization level for the finding category?
For Rust PoCs, optimization level maps to cargo profile:
| Category | Required Opt Level (C/C++) | Required Opt Level (Rust) | |---|---|---| | `MISSING_SOURCE_ZEROIZE` | `-O0` | debug (no `--release`) | | `OPTIMIZED_AWAY_ZEROIZE` | Level from `compiler_evidence.diff_summary` | N/A (Rust excluded) | | `STACK_RETENTION` | `-O2` | N/A (Rust excluded) | | `REGISTER_SPILL` | `-O2` | N/A (Rust excluded) | | `SECRET_COPY` | `-O0` | debug (no `--release`) | | `MISSING_ON_ERROR_PATH` | `-O0` | N/A (Rust excluded) | | `PARTIAL_WIPE` | `
Trail of Bits skills and plugins for AI-assisted security analysis, testing, and development. Install this marketplace in Claude Code or Codex, or import it into your ChatGPT workspace marketplace.
Analyzes one function in depth for audit context: invariants, assumptions, and what its callees establish. Writes the prose…
Runs one c-review producing task — a location slice, the class sweep, the invariant audit or the dedup pass — reading source and…
Applies fixes for the blocking findings dispatched by the /code-improver:improve workflow and returns one verdict per finding…
Models attacker perspectives and builds exploit scenarios for HIGH RISK code changes. Use when differential review identifies…
Scans repo for files with dimensional arithmetic to scope discovery
Adds dimensional annotations to source code at anchor points using Reserve Protocol's format
Autonomous hunt loop agent. Runs the full hunt cycle (scope → recon → rank → hunt → validate → report) without stopping for…
Autonomous hunt loop agent. Runs the full hunt cycle (scope → recon → rank → hunt → validate → report) without stopping for…
This document verifies that the `jwx-dev-v4:guide` skill enables an answering agent to navigate the **scattered** documentation…