Auditing in the age of (good enough) AI
Summary
Fredrik Dahlgren of Trail of Bits describes six months of agent-built tooling before a Miden zkVM audit: an LSP, decompiler, static analyses, and a Lean model of the executor.
Prep tooling beats starting at agentic code review.
Agents now make custom LSP, decompilation, analysis, and formal models worth building before the engagement starts.
before code review even starts, agents now allow us to build custom tooling and formal models that improve the quality and depth of our reviews.
MASM had almost no tooling.
Stack-machine Miden assembly made implicit dataflow hard to review, so the team spent lead time on language support.
Static analysis caught a high-severity bug.
An underconstrained remainder in mod_12289 let a malicious prover forge Falcon signatures and drain Falcon-keyed accounts.
A malicious prover could exploit this to forge Falcon signatures and drain any Miden account controlled by a Falcon key pair.
Lean proofs cover when bugs are absent.
Ninety-five correctness proofs over binary arithmetic also found two unit-test misses in rotr and wrapping_mul.
Failed side projects now cost tokens.
Agents made exploratory prep viable without selling clients on uncertain tooling work in advance.
Today, a failed side project only costs tokens.
Read the original ↗Save to your Sponge
Summarized with Sponge. Quotes are the author’s own words.