Security auditing in the age of (good enough) AI
TL;DR Highlight
Six months of agent-built tooling found a high-severity bug and produced 95 Lean proofs.
Who Should Read
A developer who wants to use agents for code review or security audits beyond simple bug hunting.
Core Mechanics
- Agents built the tools before the review
- Before auditing Miden VM, Trail of Bits spent six months having agents build an LSP server, decompiler, static analysis engine, and Lean model from scratch.
- The target used a custom assembly language (MASM) with almost no developer tooling.
- The decompiler's real value was its IR
- The decompiler took over 100 AI-generated commits.
- Its analysis framework and intermediate representation (IR) turned out most useful and were reused for static analysis.
- Claude built, Codex reviewed
- After each feature, agents decompiled random procedures and compared them with the original.
- Issues found became regression tests for the model to fix.
- Static analysis found a high-severity bug
- It flagged over 400 locations with weak type validation plus one high-severity issue.
- In mod_12289 the prover-supplied remainder was never validated, letting a malicious prover forge Falcon signatures.
- 95 Lean proofs and two bugs
- Parallel agents produced proofs covering all binary arithmetic components of the core library.
- They found a rotr edge case and a wrapping_mul stack bug that unit tests missed.
- Side projects now pay off
- Agents became good enough to carry non-essential projects with light supervision.
- A failed side project now costs only tokens.
Community Reactions
- An opinion that 'good enough' AI for auditing is like good enough brakes
- Security leaves no room for complacency.
- An opinion that you should assume you will eventually be breached and redesign your architecture
- The commenter says security firms need a new way to do business.
- A view that this shows AI used to do things better, not just faster
- Building tooling and formal proofs is seen as a positive example.
How to Apply
- Have an agent build a small CLI for an unfamiliar codebase
- Ask Claude Code for a script that extracts symbols and call relations from the repo you review today.
- Require a verification step comparing output with the source.
- Split the builder and reviewer agents
- Use one model to implement and another to review.
- Turn each issue found into a regression test.
- Build a pass that checks input validation
- Write an analysis that checks external values get type and range validation, and add it to CI.
- Start with spots reachable from the public API.
- Try formal proofs on core pure functions
- Start with small side-effect-free functions and have the agent write correctness theorems in Lean.
- The tool checks proofs, so humans only read the theorem statements.
Try It
# Paste into Claude Code: simplified version of the paper's method (input validation audit)
You are a security reviewer. Find every point in {{directory}} where external input enters (request params, values from external services).
For each point, tabulate (1) type validation (2) range validation (3) any path that uses the value before validation.
Then for each suspected gap, write a reproducible test and run it to confirm it actually fails.
Next to try: have another model review the results to filter false positives.Terminology
Related Papers
Frostbite: A new CPU architecture discovered, designed and verified by AI
AI agents designed a CPU from scratch, claiming 4.59x perf/W over a traditional core
Restricting AI agents in mobile operating systems platforms from capturing data
Signal now blocks OS-level AI agents from reading its screen on iOS 27 and Android
Actions Speak Louder than Words: Stateful Privacy Sniffing of LLM Agents via Behavioral Covert Channels in Web Interactions
Agents' link choices alone let attackers rebuild user queries at F1 0.89; SOR cuts it to 0.39.
Tracking and Limiting Unsupported Claim Propagation in Multi-Agent LLM Systems: A Provenance-Aware Framework
Passing claims with source, evidence and history kept equivalence at 5 agent stages at 96% versus 31%.
LLM assisted reverse engineering
Pointing an agent at binaries with skills and MD notes made years-long hacks feasible
Metrics-in-the-Loop: Complexity Feedback Reshapes Agent-Written Code
Injecting per-turn complexity reports into coding agents cut code erosion without changing correctness
Why is Gemini 4 Carbon taking so long?
Carbon took nearly an hour on bug fixes that Astra and Opus finished in minutes, mostly from extra unrequested work.
Weight-Space Programming builds neural networks like a 1990s researcher
LLM hand-wrote MNIST weights to 91.3%, using 1990s-style techniques