A security audit of the Miden zkVM used AI agents not merely for agentic code review but to build the developer tooling and formal models that made deep analysis possible. Over six months the auditors had models (Claude and Codex) generate an LSP/VS Code extension, a decompiler (over 100 AI-generated commits), a static-analysis/abstract-interpretation engine, linters, and CLIs. MASM’s stack-machine design and absent calling conventions forced the team to target a well-defined subset for decompilation; the decompiler’s intermediate representation became the core for data-flow and type analyses. The team implemented abstract interpretation to conservatively track stack types and used model-driven development and regression testing to harden the toolchain.
Those tools produced concrete results: static analyses flagged over 400 reachable locations where type validation could be improved and exposed one high-severity bug in mod_12289 where an unvalidated prover-supplied remainder could enable forging Falcon signatures and draining accounts. Parallel formalization in Lean yielded 95 machine-checked correctness proofs covering the binary-arithmetic core and uncovered two subtle bugs missed by unit tests, including a 64-bit right-rotation edge case and a defect in a 256-bit operation. Building tooling and formal models with AI materially increased audit depth and found real, exploitable issues.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.