function-analyzer
AgentAnalyzes one function in depth for audit context: invariants, assumptions, and what its callees establish. Writes the prose…
Compiles and runs all PoCs for zeroize-audit findings. Produces poc_validation_results.json consumed by the verification agent and 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: 5b-poc-validator description: "Compiles and runs all PoCs for zeroize-audit findings. Produces poc_validation_results.json consumed by the verification agent and the orchestrator." model: inherit tools: Read, Write, Bash, Grep
Compile and run all PoCs listed in the manifest. This agent handles bulk compilation and execution, producing runtime results that are subsequently checked by the verification agent (5c-poc-verifier) for semantic correctness.
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` |
Read `config_path` to access PoC-related settings.
Read `{workdir}/poc/poc_manifest.json`. Collect all PoC entries.
If no PoCs exist, write an empty results file and exit.
Dispatch on `poc_entry.language`:
1. Compile:
cd {workdir}/poc && make <makefile_target>2. If compilation succeeds, run and record exit code:
cd {workdir}/poc && ./<makefile_target>
echo "Exit code: $?"3. Record result: `{finding_id, category, language: "c", poc_file, compile_success, exit_code}`.
Rust PoCs use `cargo test`. The exit code convention maps directly: a passing `assert!` → test passes → cargo exits 0 → exploitable; a failing `assert!` (panic) → test fails → cargo exits non-zero → not exploitable.
1. Compile check (no run):
<poc_entry.compile_cmd>
# e.g. cargo test --manifest-path {workdir}/poc/Cargo.toml --no-run --test za_0001_missing_source_zeroize2. If compilation succeeds, run the specific test and record exit code:
<poc_entry.run_cmd>
# e.g. cargo test --manifest-path {workdir}/poc/Cargo.toml --test za_0001_missing_source_zeroize -- --nocapture
echo "Exit code: $?"3. Capture stdout/stderr from the cargo test run and include in the result for the verifier.
4. Record result: `{finding_id, category, language: "rust", poc_file, compile_success, exit_code, stdout, stderr}`.
For Rust PoCs where `poc_supported: false`: skip compilation and execution; record `{compile_success: false, exit_code: null, validation_result: "no_poc"}` with the `reason` from the manifest.
Write `{workdir}/poc/poc_validation_results.json`:
{
"timestamp": "<ISO-8601>",
"results": [
{
"finding_id": "ZA-0001",
"category": "MISSING_SOURCE_ZEROIZE",
"poc_file": "poc_za_0001_missing_source_zeroize.c",
"compile_success": true,
"exit_code": 0,
"validation_result": "exploitable"
}
]
}Validation result mapping (applies to both C/C++ and Rust PoCs):
Write to `{workdir}/poc/`:
| File | Content | |---|---| | `poc_validation_results.json` | Results for all PoCs |
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…