Featured image of post The vulnerability factory: R0 plans, R1 audits, R2 counter-reviews

The vulnerability factory: R0 plans, R1 audits, R2 counter-reviews

Ecrit par ~ zwindler ~

TL;DR

  • Follow-up to my September article: I concluded that finding vulns had become trivial and that the bottleneck was me, the human in the loop. Since then, I’ve industrialized the triage part: my audit repo has become a findings factory, with agents in distinct roles (planning, auditing, counter-review) and a database that remembers every lead, including the ones we discarded.
  • The numbers that justify the factory: my reports were almost never rejected because the bug didn’t exist. They failed on duplicates (half of the verdicts) or on a misjudged threat model/impact (informative, wontfix).
  • The most profitable part of the factory is (still) the sorting: admission and counter-review discard bad leads as early as possible, and the claims database remembers why they were discarded.

Continuing my deep dive into the wonderful world of bug hunting

In my last article, I promised a quick follow-up, and I’m only getting to it now.

Why? Because on one hand, I had a lot to say, but on the other, I have few results I can announce publicly.

That doesn’t mean I have no results (quite the opposite), just that I can’t talk about them: triage and remediation (especially on “bug bounty” programs) take months (plural). So you’ll have to trust me and be patient for the concrete results.

What I can share is the machinery. September’s manual pipeline (a main agent, subagents reviewing, a counter-review) held up with a hundred or so findings. With more than 2000 leads, it clearly doesn’t scale anymore.

Above all, analyzing the verdicts I received revealed a pattern: my reports almost never failed because the bug didn’t exist. They failed for two reasons:

  • duplicates: someone had found it before, sometimes years before. That’s half of the verdicts, and more frustrating than a rejection: a duplicate is a bug that was too easy, found too late in the age of LLMs;
  • threat model / impact: the bug is real, but the program doesn’t consider this boundary a security one, or the honest impact is too low (informative, wontfix). And it’s by far the top cause if you count what I discard myself before submitting.

Start with the threat model

In the last article, I insisted a lot on the “counter-review” (asking an LLM to check an LLM’s work, because the first result is often crap): it’s the part that delivers the most value. LLMs really want to please you and tend to misunderstand how the apps they audit work. You end up with a hallucinating amount of findings, a large share of which aren’t security vulnerabilities, sometimes not even bugs at all.

The counter-review already mitigated this problem a lot, but not always enough.

The biggest change I’ve noticed in OSS projects over the last 2 months is the addition of fairly detailed SECURITY.md files and documents explicitly listing the application’s threat model, sometimes with examples of past accepted vulnerabilities. I don’t know if they all agreed on it (the wave of AI reports must help with motivation), but it’s extremely useful when you automate bug hunting. So I asked the agents to build, for each program, a sheet with the software’s threat model, enriched with public vulnerabilities and then with feedback from the maintainers.

The most useful part of that sheet is the wontfix classes: one line per class of bug the project has already rejected, always sourced (a maintainer’s verdict, an issue). Real example: ESO (External Secrets Operator) has already classified unmanaged write/delete as wontfix. Anything that looks like it is therefore discarded right away, and nobody invests in a repro anymore. When a counter-review surfaces a new class, I validate it the first time; after that, it becomes an automatic filter.

On some programs, maintainers have a very broad view of the threat model and accept pretty much anything that looks like a vulnerability, as long as you have a solid PoC. I was already fairly good at that part. For others, though, there’s almost nothing in the threat model, notably some Kubernetes operators that exclude all CRDs (even though their chart aggregates them to edit by default, lol). In that context, anything that hijacks the CR (SSRF or confused deputy style) isn’t considered a vulnerability.

I don’t agree with that philosophy, especially when it isn’t documented, but it’s not my call. On the other hand, once it’s written down in black and white, the threat model saves everyone time, me as well as the maintainers. That’s what turns my past wontfixes into an asset: they’re no longer just failures, they’re my future triage rules.

The software factory

Beyond the threat model, the biggest change in my harness is automation.

If you even casually follow AI trends in software development, you’ve surely heard the term “““software factory””” for several months now. Roughly: a directed graph of agents that take a task as input (a ticket, or even a raw idea they split up themselves), do their thing (dev, QA, deployment, fixes…) and hand over to the next one depending on the result.

On my side, my workflow from 2 months ago was super simple:

  • I prompted to audit a piece of software (or part of it) in a more or less clever way, with an angle, a technique… => candidates;
  • I then asked the LLM to look at the candidates, check the code, run a test (ideally an E2E repro) => discards some candidates, validates the rest;
  • I then asked for a counter-review of the “validated” findings => some discarded (e.g. a “dominated” claim, which gives nothing more than what its preconditions already allow), some sent back to the previous step for more testing, or definitively validated, with or without reservations.

Simple enough that I was initially too lazy to automate it. But when you multiply programs, every manual follow-up you forget is a finding rotting in a corner. So here’s the current version:

Diagram of the factory: a human request goes to the planner agent (R0), which splits it into audit tasks; the auditor (R1) chains audit, admission then repro, and each step can discard a lead (dead or dormant, revivable) or ask the human a question; the counter-review (R2, on another model) sends it back to the author when it has reservations, discards it if negative, or marks it ready for me to review and submit

I could have set up a complex factory with off-the-shelf tools (everybody reinvents the wheel their own way), but in my case, a few Python scripts and a bit of JSON are more than enough, for now. A task queue, one agent per role, and a hook that, instead of letting the agent stop at the end of its turn, injects the next task. Each completed step automatically enqueues the next one (audit, admission, repro, counter-review, back to the author when there are reservations): the agent no longer has to “think” about queueing what comes next, it exists by design.

This workflow has saved me a huge amount of time. I start the machine on a piece of software and a method, and I wait. All I have left to do is read the “ready” reports, understand them, try them again myself if I don’t understand, and submit them when I do understand them and think they’re solid enough not to make me look like a clown.

The claims database: the heart of the factory

The real novelty compared to September isn’t the roles, it’s the claims database (a bit more than 2000 entries today). Its principle: everything the audits bring up is a claim (a lead), not just what ends up as a finding.

A few choices that matter:

  • A lead is never discarded without a coded reason (false positive, wrong boundary, duplicate, insufficient impact…), and the reason decides whether the lead is dead or just dormant. A low-impact claim isn’t dead: it can become a link in a chain later, and it wakes up if a “partner” shows up.
  • History is kept: every attempt is preserved, and an agent picking up a blocked lead knows where its predecessor stopped.
  • We know what has already been looked at: each audit records what it covered, at which commit. No more pointless re-audits, and the reaudit mode can focus on the diff since the last pass.
  • Dedup is mandatory before promotion: last month’s lesson was an agent that wanted me to report a “new” vulnerability in Talos when I had already reported it through another vector, and it was already fixed anyway (it was my TimeCheck GHSA).

What stays human, deliberately

The agent decides on its own about admission, repros on disposable targets (kind, Talos lab, Go tests) and discarding leads. I keep:

  • any repro on a real target: typically a bug bounty program’s managed service (a cloud, a SaaS), tested in production with a real account. There, a mistake is no longer without consequences;
  • every submission: I handle my submissions myself, I read and own every report;
  • the first validation of a new wontfix class: once validated, it automatically discards every lead that looks like it, so a misunderstood class would silently kill real vulnerabilities;
  • questions: when in doubt, the agent “parks” its task and asks the question instead of guessing. As I write this, four tasks are waiting for a cloud credential, an Enterprise +++ license or a feature flag to be enabled;
  • even a GitHub repo redirect to an org I haven’t authorized: deciding that a redirect means authorization is not an agent’s job.

DevOps Borat tweet from February 26, 2011: “To make error is human. To propagate error to all server in automatic way is #devops.”

Everything waiting for an action from me is grouped in a dedicated view of my kanban, which has become my daily entry point.

A few lessons in no particular order, on the generation side:

  • Adapt your patterns to the code you’re attacking. You don’t look for an XSS in a Kubernetes operator. Rather than blindly sweeping every file, the planner produces hypotheses (parser differentials, races, authz logic, chains between components…) guided by the threat model and the program’s past rejections, and the auditor checks them one by one. On a repo that’s already been “plowed”, it avoids finding the same obvious duplicates again.
  • Delegate the counter-review to another model. Conveniently, my Devin subscription gives unlimited SWE (no quota), so I can spend the “other models” quota on the counter-review: DeepSeek 4.1 flash in high mode is more than enough and burns very little quota. And it’s enforced by the code, not by an instruction an agent might forget: a finding can’t become “ready” if it was counter-reviewed by the model that wrote it.
  • Try other models for diversity. I tried Mistral 4 and Mimo 2.6, with decent results. Mistral 4 cost me about thirty dollars of tokens for a full audit of Talos Linux, without bringing much more than SWE: none of its 8 findings passed the counter-review. Interesting “for science”, but not a game changer.
  • LLMs are non-deterministic: take advantage of it. Two identical runs don’t find the same claims. I ran a blind test on Talos: 4 independent audits, same commit, same prompt. Each run missed vulnerabilities that the others had found, and my TimeCheck GHSA was found by none of the 4. 2 or 3 merged runs seem like a good trade-off: it’s a way to find more vulnerabilities without changing models (but it’s expensive if you pay per token).

The numbers so far (honest ones)

I’m giving orders of magnitude, the exact number changes every day and doesn’t matter much.

  • Admission: out of the thousand or so claims that went through admission, about 70% were killed right away and less than 10% ended up as findings. That’s the key number: 7 leads out of 10 are discarded before even attempting a repro.
  • About 800 tasks processed by the queue since it was created.
  • Nearly 700 findings in the database (some of which predate the factory). Only looking at the forty or so “ready” reports would hide the bulk of it:
    • more than 500 were discarded internally without ever being submitted (impact too low, anticipated wontfix, duplicate, negative repro…): that’s the cheap failure;
    • about sixty are waiting for something from me (review, creds, infra);
    • about 80 were submitted. Of those that got a verdict, half are duplicates, a quarter are accepted, and the rest are informative/wontfix. Almost half of the submissions are still waiting for a verdict.
  • Among the reasons for discarding leads, duplicates and wrong boundary are at the top: that confirms the initial diagnosis, triage was the costly part, not generation.

What the factory did NOT change: it doesn’t find better vulns. The quality of findings still comes from the sweep methods and the counter-review.

And in terms of complexity and originality of findings (and therefore their chances of not being a duplicate), I feel like I’m hitting a ceiling, like back when I was hunting with OVHcloud’s Qwen 3.6.

My harness sorts better and moves faster, but it doesn’t make the models any smarter. And let’s be honest: I’m not fighting with the same weapons at all as those who have a subscription to frontier models, and above all the validation that allows them to be used for cyber tasks.

Conclusion

The September article said: “being first and surviving triage, that’s the job”. The factory is the mechanical answer to that, because surviving triage is prepared upstream: dedup early, threat model early, cheap elimination early. The LLM finds; the pipeline sorts; I reproduce, write and own it.

If I had to keep only two lessons from these last months:

  • cross-review must be enforced by the machinery, not kindly requested: you don’t ask a model to critique itself, the counter-review runs on another model;
  • handoff is the classic bug of agent pipelines: the real holes I found in production were all transitions that didn’t exist (an admission with no repro behind it, a counter-review with reservations and no return to the author). If your pipeline relies on “the agent will remember to queue the next step”, it has holes.

And like last time, the question “does it work?” has a measurable answer, but still a partial one: the GHSAs that are already public date back to September’s manual pipeline, and the first accepted vulnerability that came entirely out of the factory (written by one model, counter-reviewed by another) is fixed but still under embargo; be patient, it’s coming. The factory doesn’t make you smarter. It makes you more consistent, and in bug bounty, consistency pays off over time.

Licensed under CC BY-SA 4.0

Vous aimez ce blog ou cet article ? Partagez-le avec vos amis !   Twitter Linkedin email Facebook

Vous pouvez également vous abonner à la mailing list des articles ici

L'intégralité du contenu appartenant à Denis Germain (alias zwindler) présent sur ce blog, incluant les textes, le code, les images, les schémas et les supports de talks de conf, sont distribués sous la licence CC BY-SA 4.0.

Les autres contenus (thème du blog, police de caractères, logos d'entreprises, articles invités...) restent soumis à leur propre licence ou à défaut, au droit d'auteur. Plus d'informations dans les Mentions Légales

Built with Hugo
Theme Stack designed by Jimmy