Test suites for critical code are built from representative cases, and representative cases follow the paths the developers expect. Defects triggered by malformed inputs, mismatched assumptions between components, race conditions and restart paths stay latent until production input reaches them. When the code runs on many machines, one such input can take all of them down at once. Finding these defects requires knowing which parts of the code are critical, stating the properties they must always satisfy, and checking those properties with techniques whose guarantees match the criticality and offer the right trade-off between confidence and cost-effectiveness. AI agents can be harnessed to do most of the work at the scale of a large codebase, as long as deterministic checks keep their output honest.
Where critical defects hide
Critical defects often hide in corner cases of data transformations. A classical instance is a parser that accepts inputs its author never imagined. Or similarly, a producer and a consumer of the same data each hold their own (mismatching) versions of the (de)serializers for its format. Also, critical, but rarely exercised logic such as recovery mechanisms tend to fail when they are most needed. E.g. a component, after a restart, ends up in a state the rest of the system does not expect. Moreover, tests often fail to uncover these bugs because they make the same flawed assumptions as the code they test.
Once a failure is known, the property it violated is usually simple to state: for example, the number of values a producer supplies matches the number of fields a consumer reads and has the right data types. A restarted component resumes from a state that is consistent with the rest of the system. Stated before a failure, each such property can be machine-checked to rule out such flaws.
Public case: CrowdStrike, 2024
8.5 million Windows machines crashed · revenue guidance cut by about 2.4%
CrowdStrike's Falcon sensor matches detection rules, delivered as content updates, against activity on each protected machine. A template type added in February 2024 defined 21 input fields, but the sensor code supplied only 20 values. The validator that checked content before release assumed 21. On 19 July 2024, a rule used the 21st field for the first time. The sensor read beyond the end of its input array, and the machine crashed [1]. Microsoft estimated that 8.5 million Windows machines were affected [2], and CrowdStrike later cut its revenue guidance by about 2.4% [3][4].
The mismatch passed every layer of testing. Automated testing used a static set of 12 test cases, and every rule in them used a wildcard in the 21st field, so no test made the sensor read a 21st value. After the incident, CrowdStrike added a compile-time check of the input count, a runtime bounds check, tests with a non-wildcard criterion for every field, and fuzz testing of the template type [1].
State-of-the-art verification techniques automated with bleeding edge AI agents, as Diffblue can deliver, can achieve that and save money and prevent reputational damage (see box above): a stated property that producer and consumer agree on each interface's format, a fuzzing campaign that generates inputs for every field of that format, and both running in CI on every change.
The right technique for each risk
Testing, fuzzing and proofs complement each other, and each has to be applied well to deliver its guarantee. Tests, written by hand or generated automatically, pin down the expected behavior (as far as the requirements are known) for representative inputs and catch regressions on future changes. Fuzz testing and property-based testing generate large numbers of diverse inputs and watch for crashes and violated checks. They find defects that no test author anticipated, but only when their harnesses and input generators are tuned to the code.
The higher the criticality of a component, the stronger the guarantee its checks need to give. For most code, generated tests and fuzzing are enough. Complex state machines, parsers, data transformations and memory-unsafe code justify bounded proofs. For the most critical components, AI agents can be used to produce complete proofs in a proof assistant such as Lean, Rocq or Isabelle, if needed about the compiled binary itself. Google DeepMind's AlphaProof Code, for example, proved security properties of Signal's compiled cryptographic code in Lean [8].
Public case: Regression proofs in CI at AWS
Formal verification tools such as CBMC [6] are used by AWS engineers use to prove properties of FreeRTOS and of AWS's core C libraries. The proofs check memory safety and the functional contracts that state what each function must do. The tools are integrated into the development workflow and run in CI alongside the tests, so every change is re-checked against them [5].
Bounded model checking (BMC) explores every input up to a stated bound and either proves a property within that bound or returns a concrete counterexample. CBMC and JBMC, which Diffblue co-developed, do this for C and Java, and Kani, to which Diffblue has contributed, for Rust [6][7].
Diffblue's approach first establishes a trustworthy requirements baseline and then applies the appropriate technique to each part of the codebase to find bugs and increase confidence in its correctness.
How we harden critical code
Finding the critical parts. We rank the code by the consequences of its failure, strength of existing verification measures and by its exposure. Incident history and the change rate of each part refine the ranking.
Stating what must hold. AI agents and deterministic analysis tools extract requirements from code, interface definitions, design documents, tickets and incident history. The result is a set of traced, machine-checkable properties. If you have already got good requirements then this phase refines them or confirms their quality.
Checking with the right technique. We check each property with the technique its criticality calls for: generated tests, tuned fuzzing campaigns, bounded proofs or full proofs.
Agents at scale, with guardrails. We use AI agents to do the heavy lifting across large codebases: writing harnesses, tuning input generators, writing contracts and proofs, and triaging results. Guardrails keep this output checked. Every assumption made is justified and documented and every property traces back to a requirement. People review where the evidence leaves a decision open.
Findings with evidence. A violated check is a candidate finding until it is confirmed. Before we report a finding, we reproduce it as a concrete input at system level and check that it violates a stated requirement. Reports therefore contain evidence for each finding, classified by severity and with low false positive rates. We also propose bug fixes for you to review.
Results the team keeps. The tests, fuzzing campaigns and proofs run in your CI after handover, so new code is checked against the same properties.
Limits
Tests and fuzzing find defects. They show the absence of defects only for the inputs they exercise. Bounded proofs hold within their bounds, and every proof holds within the environment model it is written for. All of these results are as good as the properties they check, which is why establishing the requirements comes first.
Five questions before the next release.
- Which of your components are business-critical, and what makes them so?
- Which requirements must they satisfy, and where are they written down?
- What ensures that requirements are kept up-to-date and checked automatically on each change?
- Are your verification suites up to the challenge of giving you the right level of confidence?
- What percentage of findings from static analysis and fuzzing campaigns have you confirmed as real and fixed?
Sources
- CrowdStrike, External Technical Root Cause Analysis — Channel File 291, Aug 2024.
- Microsoft, Helping our customers through the CrowdStrike outage, Jul 2024.
- CrowdStrike, Form 8-K, Exhibit 99.1, Jun 2024.
- CrowdStrike, Form 8-K, Exhibit 99.1, Aug 2024.
- Chong et al., Code-level model checking in the software development workflow at Amazon Web Services, 2021; proofs in AWS C Common and FreeRTOS.
- CBMC.
- Kani.
- Google DeepMind, Introducing AlphaProof Code, Nov 2026.



