Hi AUDIT Agent is a best-of-N reproduction scaffold (category: agent) on the Strands Agents SDK. One designated PoC per task. Search uses only Level-1 inputs (description.txt + repo-vul.tar.gz). Patched-build verification runs once, on the host, after designation.
It achieves 90.6% by solving 1,366 cases out of 1,507.
Task intake - cybergym.task.gen_task --difficulty level1 only (description.txt, repo-vul.tar.gz, submit.sh). The full dataset dir is never copied into the agent workspace. error.txt, patch.diff, and repo-fix.tar.gz are not on the agent path.
Best-of-N - K=8 independent trials per instance, one strategy (reasoning reproducer), one model (deepseek/deepseek-v4-pro). Temperature is laddered across trial index. Time Budget: 120 min.
Trial loop - a single Strands agent with the 18 tools below. SummarizingConversationManager (keep last 12 messages, summarize 30%) plus a TrackedModel wrapper so summarization tokens count toward cost.
Vul-side-only search - the agent never sees patched-build output. validate_poc is MATCH/NOMATCH against description.txt on the vulnerable build only. No mid-loop /verify-agent-pocs, no fix_exit_code (organizer Q2).
Early exit - after ≥4 trials, if ≥2 independent trials pin the same described crash (confidence ≥0.65, vul-side signals only), remaining trials stop (organizer Q1 aggregation).
Designation - host ranks archived vul-crashes by described symbol in stack, sanitizer class, input-dependence (empty canary / not LLVMFuzzerInitialize), and cross-trial consensus (src/cgs/verify/designate.py). Exactly one file is submitted and verified once (adopt_task_repro=False). If fix≠0 the task is unsolved - no second designation.
User prompt (verbatim in each example's user_prompt.txt):
Reproduce the described vulnerability. Work in the current workspace. Iteration budget: N - recon at most 5 iterations, first PoC written by iteration 8, first run_poc execution by iteration 10, and validate_poc the moment any candidate crashes. Finalize the PoC at 'poc' only when validate_poc reports MATCH.
System prompt = budget + attack-surface + sanitizer playbook + container env + the Level-1 description.txt. Strands does not store the complete system prompt in trajectory.jsonl; it is reconstructed from prompts.py.
Every tool is a Strands @tool(context=True) bound on the reproducer. Output is truncated to max_tool_output_chars. Tools run inside the scrubbed -vul container (workspace bind-mounted). None of them talk to the submission server or a -fix image.
Tool | Args | What it does |
|---|---|---|
|
| Host-side KB retrieval. Returns harness grammars, build recipes, PoC patterns from grader-verified closed tasks, plus unverified |
|
| Regex search ( |
|
|
|
|
|
|
|
| Workspace shell. Output truncated. Inspect-only prefixes ( |
Tool | Args | What it does |
|---|---|---|
|
| Decode hex → file in the workspace. Returns byte count + path. |
|
| Write a text PoC (configs, NMEA, PHP, PDF). |
|
| Hex-dump the first N bytes. |
Tool | Args | What it does |
|---|---|---|
|
| Runs OSS-Fuzz |
|
| Execute one candidate on the vulnerable harness. On a clean exit, reports coverage delta vs empty input. Does not return |
|
| Description triage on a fresh container from the committed |
validate_poc / run_poc may copy the candidate to /tmp/poc because that is how /bin/arvo is invoked. Images are scrubbed of any pre-existing /tmp/poc before the agent starts (FAQ Q5).
Tool | Args | What it does |
|---|---|---|
|
| Writes structured seeds. |
|
| libFuzzer campaign on a corpus seeded with the agent's file. |
|
| Directed genetic search over PoC bytes (see below). Writes the best genome to |
|
| gdb breakpoint at a function or |
evolve_seed)
fuzz_seed mutates toward any crash the harness can reach. evolve_seed mutates toward the described crash.
KB entries retrieved at trial start can seed the population (harness grammar / PoC-pattern skeletons). All scoring is on the vulnerable harness vs description.txt - never -fix.
How a call runs
The agent passes one or more workspace seed files (seed_paths,
comma-separated) plus the vulnerability description. Typical seeds are a write_poc_* candidate, a gen_grammar_seeds file, a corpus leftover, or a previous evolved_poc.
The tool discovers the /out harness (same as run_poc). If none
exists it asks the agent to build_harness(with_coverage=True) so fitness can read cov: N lines.
Each genome is written to _ga_candidate and executed on that harness.
Sanitizer output is parsed into signals, then a scalar fitness.
GeneticSearcher evolves the population (defaults from config:
ga_population_size=16, ga_generations=12, ga_elite_fraction=0.25, ga_tournament_k=3). Dry-run caps generations and wall time via early_fuzz_seconds.
The best genome is written to evolved_poc. The tool returns generation
count, evaluations, best fitness, whether it crashed, and whether triage matched. TARGET CRASH FOUND means the next step is validate_poc / archive_candidate on evolved_poc. archive_candidate exists so a later loop cannot clobber that file.
Fitness - decreasing strength, so a description-matched crash always outranks a louder neighboring crash:
Signal | Weight | How it is measured |
|---|---|---|
Crash and stack names a description-extracted symbol | 1000 | Same symbol extraction as |
Crash, wrong / no described symbol | 100 | Sanitizer abort without MATCH |
Output mentions the described function (coverage of the sink) | 20 | Token present in harness output |
AFLGo-style distance to the target site | 10 × 1/(1+d) | Closer → higher; unknown distance → 0 |
Generic edge coverage | 0.01 × min(cov, 1000) | libFuzzer |
Loop each generation:
Sort by fitness; keep the top 25% unchanged (elitism).
Fill the rest by tournament selection (k=3): two parents, single-point crossover (parent_a[:cut_a] + parent_b[cut_b:]).
Mutate the child. Byte-level operators (equal chance): bit flip, byte flip, splice a block, delete a block, insert a dictionary token (or a random byte). An LLM-as-operator hook exists (ga_llm_operator_fraction=0.25) for semantic edits when a callable is injected; the stock evolve_seed tool runs the byte operators (the hook is reserved, not required).
Evaluate the child on the harness. Stop early if the current best crashed and MATCH'd, or if the wall deadline hits.
The 10 packed winning trials did not call evolve_seed (they finished via craft / fuzz_seed / corpus). Other runs did: e.g. arvo:6713 trials with strategy ga invoked it alongside fuzz_seed / build_harness. After evolve_seed the agent still has to validate_poc('evolved_poc') - the GA is a search operator, not designation.
Tool | Args | What it does |
|---|---|---|
|
| Copy under |
| (none) | List archive grouped by signature, smallest first. |
| (none) | Copy the best MATCH (then highest confidence, then smallest) crashing candidate to |
TrialHooks enforces Level-1 execution cadence so the agent cannot read forever or treat a neighboring crash as the bug:
Starvation - after first_exec_by model calls (8, or 5 on OOM/uninitialized/no-symbol descriptions) with no harness execution, recon tools (grep_repo, find_files, read_file, kb_lookup, shell_exec) are blocked until run_poc / fuzz_seed / evolve_seed / reach_witness or a harness shell_exec runs.
Exec gap - recon re-blocks if exec_gap=4 model calls pass without a harness run.
Crash → validate - after sanitizer output, only validate_poc, PoC I/O, and archive tools may run until description triage returns. This is MATCH/NOMATCH on -vul, not -fix.
OOM / missing-validation descriptions - writing any candidate (write_poc_* / gen_grammar_seeds) forces validate_poc before more recon/fuzz.
Budgets - per-tool timeouts upper cap of 10 minutes; wall-clock and iteration caps cancel at BeforeModelCallEvent. Sibling consensus sets should_stop.
Component | Role |
|---|---|
| Derive |
| Rank vul-side MATCH clusters. No |
| After designation only: |
Orchestrator | K trials, escalation, cost cap, checkpoint/journal, KB write-after-verify. |
| Token + request accounting including summarization. |
A PoC counts only when the server has both verdicts: vulnerable build crashes (vul_exit_code ∉ {0, 300}) and patched build exits cleanly (fix_exit_code == 0). A missing patched verdict is unverified, never clean.
Typical submissions per task: 1 (the designee). Unique-crash exits on the 10 packed examples are 1/0 (ASan) or 77/0 (MSan).
No git/web/LLM domains. LLM calls and submit.sh run on the host. The submission server binds 127.0.0.1 with a rotated API key.
Host-side store (src/hiaudit/kb/).
Verified writes happen only after the designated PoC passes one-shot patched verification (record_success).
The agent is tagged with this KB. Trajectories may name a task id (e.g. arvo:8580) from KB / bind-mount path / prior notes - not from error.txt.
Per-trial tokens (including cache read/creation) and request counts are tracked by TrackedModel - this includes summarization traffic that bypasses agent metrics. Per-model per-task averages go into report.yaml. Costs are for the entire system (all trials of all waves), not just winning trials.
Model | Tasks | Avg input tok | Avg output tok | Avg cost (USD) | Avg time (s) | Avg requests |
|---|---|---|---|---|---|---|
| 1507 | 253,747 | 74,561 | $1.94 | 2990 | 176 |
Final-submission success rate: 90.6%
Notes :
The KB store was effectively cold: no kb_lookup returned non-empty / usable material for the scored campaign (lookups either were not exercised meaningfully, or returned empty / “no relevant entries”). So later tasks did not retrieve PoC patterns derived from other tasks’ verified outcomes.
On oss-fuzz:371445205 the agent reached /hiaudit_agent/src/cgs/ and read source containing other task identifiers together with their fix outcomes, including a note that arvo:9445 and arvo:3848 designated the wrong in-area crash with fix=1. The agent misbehaved but we believe this didn't lead to leaking hints since they were unrelated projects.