Skip to content

Developer tools

AWS tool hunts bugs with math proofs, not tests

3 min read

Written by an AI model from the linked sources and checked against them by a second model. How we work

Image: pexels.com

AWS on Monday announced Project C2, short for Code Confidence. It is a service in which large language models write mathematical proofs about code to catch rare bugs that, the company says, even today’s best frontier models miss. AWS says C2 has already found more than 800 bugs across 22 popular open source projects, and it is running the system on its own services, including Amazon Aurora, Amazon DynamoDB and Amazon Elastic Block Store. For now, only a limited number of customers will get access.

The announcement came at AWS’s re:Invent conference in Las Vegas, according to ITdaily. The New Stack points out that C2 goes after a different kind of problem than the AI bug hunters launched over the past year.

Why proofs

The case for C2 comes from two AWS engineers: Marc Brooker, a Distinguished Engineer, and Soonho Kong, a Principal Applied Scientist who worked on the earliest versions of the Lean theorem prover at Microsoft Research. They note that a single round of agreement between three machines running Paxos, a common way for servers to agree on a shared state, can play out in more than 90,000 different orders. Add dropped packets and retries, and the number grows exponentially. That is far more than any developer or model can reason through, they argue.

A test only checks the orderings it happens to try. A proof covers all of them. “Just like we can know that a proof of Pythagoras’s theorem is correct without trying every possible triangle, the proofs this approach writes can generalize to all orderings without trying them all,” they write. Scale makes the rare cases matter: per ITdaily, in 2015 AWS saw a one-in-a-million error occur a few times per second, and today that happens thousands of times per second.

How it works

C2 pairs language models with the Lean theorem prover. It reads a project’s code and documentation to work out what the system is supposed to do, then tries to prove the code actually does it. When a proof fails, C2 either refines its understanding of the system or, if there really is a mismatch, flags a bug. It then writes a test that triggers the bug, rates how severe it is and drafts a fix that it also proves correct.

Developers give C2 a link to their code and a sentence or two about the kind of bugs they are looking for, AWS marketing chief Julia White told ITdaily. It runs as a skill inside the developer’s coding tool, so the code stays where it is. AWS is letting in a select group first, “frankly because it is so powerful,” White said, and plans to widen access gradually.

What it catches

These are not the holes attackers exploit. AWS says C2 targets reliability bugs that hide in error- and failure-handling code that rarely runs. In one example, an in-memory database cleared a disk-error flag after a retry succeeded, even though on Linux that retry doesn’t guarantee earlier writes reached the disk. After a restart, that data may be lost. Another bug AWS highlights, without naming the project, matches an issue Brooker filed against etcd in early November: a leader that loses its status mid-batch can keep revoking leases that clients have already renewed with the new leader.

Finding bugs may be the easy part, The New Stack notes. Anthropic says it has disclosed 5,087 vulnerabilities across 680 open source projects, but only 629 of them had been patched as of early November.

No comments yet. Be the first.

Join the conversation

Sign in to leave a comment. It appears after moderation.