AOCyber
The Constraint Is the Work Part 6 title card — Ask for Attacks, Not Tests

Ask for Attacks, Not Tests

September 03, 2026

Vulnerability finding changed in late 2024, when a team at Google published a result that should have unsettled every engineer who has written a test suite. An AI agent called Big Sleep found a real, exploitable security vulnerability (a stack buffer underflow) in SQLite, one of the most widely deployed and heavily tested pieces of software on earth. SQLite is fuzzed continuously, and its test suite is legendary. Even so, the agent found a flaw that all of that testing had missed. A purpose-built fuzzing run of more than 150 CPU-hours failed to rediscover it. The agent did not generate more test cases. It reasoned toward a specific kind of weakness the way an attacker would. By Google’s own careful phrasing, it was “the first public example of an AI agent finding a previously unknown exploitable memory-safety issue in widely used real-world software.”

The result matters less for what it says about SQLite than for what it exposes. We lazily file two very different capabilities under one word. When people say “AI can write tests,” they describe one thing. What Big Sleep did is another thing that merely ends with a test. One samples the space of plausible, typical checks. The other searches, adversarially, for the input that breaks a specific claim. Test generation is a completion task that samples the happy path. Vulnerability finding is adversarial search with a concrete target and a real success signal, and the prompt is the whole difference between coverage theater and a weapon.

This guide covers the full picture. First, what vulnerability finding is and which methods teams use. Next, why “write me some tests” produces the least valuable tests, and how to turn AI into a disciplined attacker. Finally, how to triage, report, and fix what you find.


What Vulnerability Finding Actually Means

Vulnerability finding is the practice of discovering weaknesses in software, systems, or configurations before an attacker does. A vulnerability is a flaw that lets someone break a security property. That property might be confidentiality, integrity, or availability.

Finding is not the same as testing. Testing asks, “does this work as intended?” Vulnerability discovery asks, “what input makes this fail dangerously?” In other words, one confirms and the other refutes. That distinction drives everything below.

Vulnerability finding versus vulnerability assessment

A vulnerability assessment is a broad, usually scanner-driven sweep that lists known weaknesses across your assets. Penetration testing goes further and tries to exploit them. Research-style discovery goes furthest, hunting for flaws nobody has catalogued yet. Most mature programs use all three.

Common weakness classes worth hunting

  • Memory-safety bugs: buffer overflows, underflows, and use-after-free errors, like the SQLite flaw above.
  • Injection flaws: SQL, command, and prompt injection, where untrusted input reaches an interpreter.
  • Broken access control: one tenant or user reading another’s data.
  • Misconfiguration: open ports, default credentials, and exposed services such as remote desktop.
  • Unpatched dependencies: known flaws in libraries and frameworks you inherited.
  • Logic errors: balances that go negative, or steps that can be skipped.

Core Methods for Finding Vulnerabilities

No single technique catches everything. Each method sees a different slice of the problem, so strong teams layer them.

Automated scanning

Scanners compare your systems against databases of known flaws. They are fast, repeatable, and great for coverage. However, they only find what someone has already described. Novel bugs and logic flaws usually slip through.

Static and dynamic analysis

Static analysis (SAST) reads source code without running it. Dynamic analysis (DAST) probes a running application from the outside. Together they catch many injection and configuration issues. Both produce false positives, so a human must triage the output.

Fuzzing

Fuzzing feeds a program huge volumes of malformed or random input and watches for crashes. It is excellent at finding memory-safety bugs. Yet it is blind to intent. It does not know which property matters, so it can run for hours and miss the one flaw an attacker would aim at.

Manual penetration testing and code review

Skilled humans chain small weaknesses into real attacks and spot logic flaws that tools cannot. The cost is time and scarcity. Consequently, manual work is best spent on your highest-risk systems.

Asset visibility comes first

You cannot find flaws in systems you do not know exist. Keep a living inventory of hosts, services, dependencies, and cloud resources. Shadow systems are often the weakest link, and the same is true of unsanctioned AI tools, as shadow AI inside the enterprise shows.


The Strongest Case for AI-Generated Tests

The defense of AI-generated tests is straightforward and partly correct. A model can paper a codebase in unit tests in minutes. It reads a function, infers its intended behavior, and emits a battery of cases. Line coverage climbs. Branch coverage climbs. Some of those tests will catch a real regression later. Compared to the common baseline of no tests at all, a wall of generated tests is a genuine improvement, and it is free.

Here is where it expires. Coverage measures which lines ran, not which invariants hold. Generated tests overwhelmingly assert that the code does what it currently does, including whatever it currently does wrong. A completion model samples typical tests for code like yours. It therefore encodes present behavior as the definition of correct, then guards it. A happy-path test suite doesn’t challenge the code; it photographs it, and a photograph of a bug is not a test that catches the bug. It’s a test that protects it.

The Category Error: Tests Versus Attacks

The confusion is between a test and an attack, and they point in opposite directions. A test asserts expected behavior: given this input, expect this output. An attack starts from a stated invariant, a property that must hold no matter what, and searches for any input that violates it. The first confirms. The second refutes.

Ask an LLM to “write tests” and you get confirmation, because completion is a confirming operation. Typical tests walk the path the typical user walks. The dangerous defects do not live on that path. They live where an adversary pushes: the malformed input, the boundary, the interleaving, the value nobody expected. A happy-path sampler never visits that region.

Change the request and the same model changes character. Do not ask “write tests for this function.” Instead, state the invariant and ask the model to break it. Examples: “this parser must never read out of bounds,” “this endpoint must never return one tenant’s data to another,” or “balances must never go negative.” Now you are running adversarial search with a concrete target. Frontier models are startlingly good at this, because “did the invariant break?” is a crisp, checkable predicate the search can climb. Big Sleep is the vivid version, but the effect shows up in ordinary work. Given an invariant and a mandate to violate it, a model will find edge cases your happy-path suite structurally could not.

Ask for Attacks, Not TestsA two-column contrast between test generation and vulnerability finding, followed by a three-step pipeline. Test generation, shown in red, is a completion task that samples the happy path and produces coverage theater. Vulnerability finding, shown in gold, is adversarial search that starts from a stated invariant and hunts for inputs that violate it. The pipeline turns landed attacks into regression tests generalized to the whole failure class.Ask for Attacks, Not TestsTest generation samples the happy path, coverage theater. Attack finding is adversarial search with a real target.TEST GENERATIONa completion taskSamples typical testsWalks the path the typical user walksPhotographs current behavior, bugs and allCoverage climbs, invariants uncheckedVULNERABILITY FINDINGadversarial searchStarts from a stated invariantSearches for any input that violates itA crisp, checkable success signal it can climbFrontier models are startlingly good at itTHE METHOD1State theinvariant2Ask the modelto break it3Convert every landed attack into aregression test, generalize to theCLASS, not the instance.Tests tell you it works. Attacks tell you where you bleed. Ask for attacks.aocyber.ai · DevFlow · AOSentry
Ask for Attacks, Not Tests

What AI Vulnerability Finding Looks Like in Practice

The move is to stop asking for tests and start asking for attacks, then convert every attack that lands into a regression test. That inversion (invariant first, attack second, regression test third) turns the model from a coverage-theater generator into a red-teamer. Its successes automatically harden the system. The tests you keep stop being photographs of current behavior. They become tombstones for specific ways the code was shown to be breakable, which is the only kind of test that was ever worth much.

Generalize the attack to its class

There is a trap inside this. When a model finds an attack and you ask for the regression test, it will cheerfully test the exact input it found: the specific payload, the specific byte, the specific tenant ID. That test is nearly worthless, because it guards one instance of a whole class of failures. The value is in the class: unsanitized input reaching the query builder, not '; DROP TABLE; any cross-tenant read, not tenant 4171 reading tenant 9. The model will not generalize unless a human makes it. For more on this, see why prompts decay over time and why you should ask for attacks, not feedback.


A Step-by-Step Vulnerability Finding Process

Use this sequence whether you work manually, with scanners, or with an AI model.

  1. Inventory your assets. List every system, service, dependency, and data store in scope, including forgotten ones.
  2. Write down the invariants. Name the properties that would hurt most if broken, such as data isolation, authorization, monetary correctness, and memory safety.
  3. Scan for known flaws. Run automated scanners and dependency checks to clear the cheap, well-documented problems first.
  4. Attack each invariant. Use fuzzing, manual testing, or an AI model prompted to find an input that violates each stated property.
  5. Verify and reproduce. Confirm every candidate with a working proof so you discard false positives and document exact conditions.
  6. Score and prioritize. Rate severity and exploitability, then rank fixes by real business risk.
  7. Fix and add a class-level regression test. Patch the flaw, then write a test that covers the whole failure class, not one payload.

Triage: Scoring and Prioritizing What You Find

Not every finding deserves a midnight page. The Common Vulnerability Scoring System (CVSS) gives a standard 0 to 10 severity score. It is a useful start, but it does not know your environment. Therefore, pair it with exploitability data. CISA’s Known Exploited Vulnerabilities catalog lists flaws attackers are already using in the wild. A medium-score bug on that list often outranks a high-score bug nobody exploits.

Also ask three practical questions. Is the system internet-facing? Does it hold sensitive data? Is there a working exploit? The answers move a finding up or down the queue faster than the raw score does.

Reporting, Disclosure, and CVE Identifiers

A finding only helps once the right people understand it. A good report includes a clear title, affected versions, reproduction steps, impact, and a suggested fix. Keep it factual and short.

If you discover a flaw in someone else’s product, report it privately first. Look for a vulnerability disclosure policy or a security contact on the vendor’s site. Public flaws usually receive a CVE identifier through the CVE Program, and the National Vulnerability Database adds scoring and analysis. In short, coordinated disclosure gives vendors time to patch before attackers can copy the technique.

Turning Vulnerability Finding Into a Standing Defense

This is, precisely, what a security product is: adversarial search against stated invariants, productized and run continuously. A guardrail like AOSentry’s jailbreak and prompt-injection screening, part of the governance layer inside AOCore, is not a pile of happy-path tests hoping the model behaves. It is a standing attack posture against a stated invariant. The model must not be manipulated into doing the thing it must never do. Every request is probed against that invariant before it reaches the model, and every response before it reaches the user. The company’s public line, that prompt injection is the SQL injection of AI, is a claim about invariants. To see how this works, read how to configure a guardrail in AOCore.

The same trap exists on the build side. A harness like DevFlow can auto-generate tests “matching your existing patterns and coverage.” That convenience is the happy-path risk named above, because patterns and coverage describe what the code already does. Pair generation with adversarial prompts against explicit invariants. Then your suite becomes a record of attacks survived, not a mirror of behavior shipped.

What to Do This Week

Change the words. Ban “write tests for this” as the default request. Replace it with “here is the invariant; find an input that breaks it.” Do this first for properties that would hurt if they failed: data isolation, monetary correctness, memory safety, and authorization. Treat every attack that lands as a finding, not a nuisance. Convert each finding into a regression test, and make a human generalize it from the instance to the class. Finally, point the same energy at your dependencies and your own past assumptions, not just new code.


Frequently Asked Questions About Vulnerability Finding

What is vulnerability finding?

Vulnerability finding is the process of discovering security weaknesses in software or systems before attackers exploit them. It combines scanning, fuzzing, code review, manual testing, and increasingly AI-driven adversarial search.

How is vulnerability finding different from testing?

Testing confirms that code behaves as expected. Vulnerability finding starts from a property that must always hold and searches for any input that breaks it. One confirms, and the other refutes.

Can AI really find security vulnerabilities?

Yes. Google’s Big Sleep agent found an exploitable stack buffer underflow in SQLite that extensive fuzzing had missed. Results depend on prompting the model with a specific invariant to break, rather than asking it to write generic tests.

Which method finds the most vulnerabilities?

No single method wins. Scanners cover known flaws, fuzzing finds memory bugs, and manual or AI-driven attacks catch logic and access-control flaws. Layering them gives the best coverage.

What should I do after a vulnerability is found?

Reproduce it, score its severity, and prioritize by real exploitability. Then patch it, add a regression test for the whole failure class, and report or disclose it responsibly if it affects other parties.


Conclusion

Effective vulnerability finding rests on one idea: attack stated invariants instead of confirming current behavior. Layer scanning, fuzzing, and manual review. Triage with CVSS and real exploit data. Report responsibly, and turn every landed attack into a class-level regression test. The comforting version of AI testing, where coverage turns green, protects your bugs and tells you you’re safe. The useful version is adversarial, uncomfortable, and never quite finished. Ask what the code does and it will tell you it works. Ask what breaks it and it will show you where you bleed. Ask for attacks.

Add to Preferred Sources
blog author avatar

Justin Donnaruma

Justin Donnaruma is the founder and Chief Innovation Officer of AOCyber, where he sets the technical direction for a product line built on one constraint: the customer pays, so the customer is never the product. He founded Don't Panic Consulting in 2016 — a managed service provider working with Fortune 500 companies, hedge funds and national brands, with zero customer churn across five years of operations — and founded AOCyber in 2025 to build AI-native, privacy-first platforms. He writes here about AI governance, the economics of "free" AI, and what actually holds up when a model reaches production.

Back to Blog
AOCyber

You don't have to be the product anymore. Building the next generation of applications.

© 2026 AOCyber. All rights reserved.