AI dev tools —

AWS Project C2 tool finds bugs best AI models miss, finding 800 bugs in 22 projects

The development of Project C2 by AWS introduces a novel mechanism for identifying coding flaws that even leading artificial intelligence models have failed to detect.

AWS Project C2 tool finds bugs best AI models miss, finding 800 bugs in 22 projects

This service employs large language models to generate formal mathematical proofs pertaining to code structures, an announcement made by AWS on Monday.

AWS reports that C2, which stands for Code Confidence, has already been utilized to uncover over 800 defects across twenty-two widely used open-source repositories. Furthermore, the system is currently being run against AWS's proprietary services, including Amazon Aurora, Amazon DynamoDB, and Amazon Elastic Block Store (EBS). Currently, however, the capability to subject one's own code to this testing regimen is restricted, as access is presently limited to a select group of clientele.

Instead of relying solely on traditional testing methods, the approach centers on mathematical proofs. Marc Brooker, an AWS Distinguished Engineer, and Soonho Kong, a Principal Applied Scientist who contributed to the initial versions of the Lean theorem prover at Microsoft Research, elaborated on this concept. They pointed out that a single iteration of agreement within three machines operating under the Paxos consensus protocol can manifest in upwards of 90,000 distinct sequences. When considering packet drops and subsequent retries, this number increases exponentially. The team contends that this scale of complexity is beyond the capacity of either a human developer or an AI model to thoroughly examine. The methodology, they assert, allows the generated proofs to encompass all possible orderings, much like one can confirm the correctness of Pythagoras's theorem without examining every conceivable triangle.

The operational procedure for C2 begins with the tool ingesting a project’s documentation and source code to ascertain the intended functionality of the system. Subsequently, it endeavors to formally prove that the code aligns with this stated purpose. Should the proof fail, C2 either refines its comprehension of the system or, if a genuine discrepancy exists, flags a specific bug. To finalize the process, the system also generates a test case designed to trigger the identified bug, assigns it a severity rating, and drafts a corresponding correction that it also proves to be sound. AWS has dedicated approximately a decade to employing automated reasoning within its internal infrastructure, and earlier this year, this technique was made available to developers via Kiro's requirements analysis feature.

Most of the recent AI-driven bug detection tools, launched within the past year, have concentrated their efforts on security vulnerabilities. Tools such as Anthropic’s Claude Security, OpenAI’s Codex Security (previously known as Aardvark), and Google DeepMind’s CodeMender primarily function by having a model reason about the code, effectively accelerating the process a security researcher would undertake. C2 is pursuing a different line of inquiry, and it is crucial to recognize this distinction. AWS explicitly clarifies that the issues addressed are not the types of exploitable vulnerabilities targeted by malicious actors, but rather reliability bugs that tend to reside within error-handling and failure-handling code paths that are infrequently executed. A potentially more analogous system is Antithesis, a startup that operates entire distributed systems within a deterministic hypervisor and introduces faults until a failure occurs. However, AWS maintains that while testing only verifies the sequences it explores, a formal proof covers every single possibility. One bug AWS highlights, without naming the specific project, mirrors an issue Brooker reported concerning etcd in early November, where a leader that loses its status mid-batch might continue to revoke leases already confirmed by clients under the new leader. Another instance AWS points out involves an in-memory database that cleared a disk-error flag following a successful retry, even though the Linux operating system does not guarantee that earlier writes have reached persistent storage after such a retry.

The subsequent hurdle may lie in the capacity of the receiving infrastructure to handle these findings. While Anthropic has reported disclosing 5,087 vulnerabilities across 680 open-source projects, only 629 of those had been patched as of early November.

This focus on formal verification represents a significant shift in the tooling landscape for software quality assurance, moving beyond pattern recognition in security toward exhaustive logical validation of operational integrity across complex state spaces.

Why it matters

This represents a significant shift in automated testing, moving beyond pattern matching to formal verification of code correctness. For operators, this could mean a new standard for ensuring the reliability of critical infrastructure components against rare failure modes.

Earlier coverage

Reported by The New Stack.

ai-devtoolscloud

Related coverage

Elsewhere in this edition