79% vs 51%: independent neobanks lag on app security. Read the report

Product

Product

Killing False Positives Softly: Inside Ostorlab's Software Factory

Ostorlab's AI agents sample scanner findings every night, audit detection rules and ship tested fixes. One fix, followed from pull request to merge.

"Your policy file MX entries do not match your MX record values."

Until November 28, one of our scanners would report that finding on a domain whose policy was correct. The policy only had to use a wildcard, mx: *.example.net, which the standard allows. Our check compared the pattern with the mail server's name character by character, so a valid configuration was reported as a misconfiguration. That is a false positive.

Nobody at Ostorlab wrote the fix, and nobody had to report the problem. That night, just after midnight UTC, one of our AI agents checked that rule against the standard it implements, found three defects and opened a pull request that corrected them, with the tests and the evidence that the fix worked. A second agent reviewed it and found a fourth. The first agent fixed that one too. I approved the change, and it was merged at 03:02 UTC. I was the only human involved.

This article is about the system behind that pull request. We call it our software factory, and we described how we built it in an earlier article. Here I want to show what it does to false positives. It kills them, softly: one rule, one edge case and one regression test at a time, every night.

AI detection is exceptional, and its bill is real

AI-based detection is an exceptional path forward, and we can measure it: our agentic engine, Neutron, reached 97.1% on the CyberGym benchmark. An agent that reads code, forms a hypothesis and proves it with a working exploit produces findings that are very hard to argue with.

It also costs real money on every run. A deep agentic scan of every commit, every asset, every day is not something we or our customers can pay for. For a known issue with a reliable check it would also be a waste: ordinary code finds it in milliseconds.

So rules are not going away. A rule runs for almost nothing. Its weakness is somewhere else: a rule is only as good as the edge cases someone had time to think about, and false positives live in those edge cases. A paragraph of an RFC. A CDN's fallback certificate. An identifier that looks like a secret and is public by design. Each one is small, each one takes an engineer half a day to investigate properly, and there are thousands of them. We have written about what that costs the teams who receive them.

Our answer is to spend the expensive reasoning once, when a rule is built or repaired, and then run the cheap rule on every scan after that.

The agent pays for the investigation, so that every later scan doesn't have to.

How the software factory kills false positives

The factory is made of ticket agents, the same AI agents our customers configure on the platform. Each one has a job, skills, tools and a rule for when it runs. Together they form a loop with two ways in: a nightly sample of what the scanners reported, and a daily audit of the rules themselves. Both lead to the same place: an agent fixes the rule and proves the fix, a second agent challenges it, and a human decides whether it is merged.

flowchart TD A["Scan findings"] --> B["Nightly sample of 500, judged on the evidence"] B -->|False positive| D["Ticket with the root cause"] S["Standards, advisories, patches"] --> R["Daily audit of a rule"] D --> E["Rule fix with tests"] R --> E E --> F["Review agent"] F -->|Revisions| E F --> G["Human approval"] G --> H["Updated rule, used by the next scans"]

Sample. Every night at midnight, an agent we call the FP Investigator takes the findings our scanners produced over the previous seven days, removes the duplicates and draws a sample of 500. The sample is spread across the engines that produced the findings, in proportion to their volume, so a quiet engine is still checked. In the run of November 28, that was 179,199 findings, reduced to 17,516 unique ones, reduced to 500.

Judge. Each sampled finding is tested against its own evidence. Our definition is strict: a false positive is a finding whose stored evidence does not support the claim its title makes. The agent gives one of three verdicts: false positive, not a false positive, or insufficient evidence. Missing evidence never counts as proof in either direction. For every false positive, it has to name the root cause in one sentence about the detector: what the rule matched, and what distinction it failed to make. Each root cause becomes one ticket, assigned to a fixer agent.

Audit. A sample only catches a false positive after a scan has reported it. So a second group of agents, the rule creators, each responsible for a group of detection engines, works ahead of the sample. On each run, a rule creator goes through the recent findings of its engine and the newly published vulnerabilities, then picks one rule and checks it against its specification or its upstream patch.

Fix. The agent reproduces the problem before it changes anything. For a reported false positive, that means a fixture that replays the finding and a test that fails before the fix and passes after it. For an audit or a new detector, it means building sample applications: one that is really vulnerable, one that is fixed, and benign lookalikes that resemble the vulnerable one without being it. The right answer for each case comes from an independent oracle, a small program that never imports our detection code. The agent records the result before and after the change, case by case, and the false positive stays in the repository as a regression test.

Challenge. A separate review agent reads every pull request. Its job is to doubt: does the change do what it says, and does the evidence support the claim?

Merge. A human approves. We do not run a dark factory, where code ships without anyone reading it. We still need to understand what goes into our scanners. The factory's job is to make sure that what reaches a reviewer has already been investigated, tested and challenged.

Since September, 271 false-positive root causes have been ticketed in this loop. Of those, 228 are fixed, 22 were closed as exceptions after review, 20 are open and one was reopened.

228 of 271 false-positive root causes ticketed since September are fixed
Figure 1: Tickets in Ostorlab's FP Cleanup stream by status. Source: Ostorlab ticket data, checked November 28, 2026

One false positive, from audit to merge

Back to the finding this article opened with. MTA-STS (RFC 8461) lets a domain publish a policy that tells other mail servers to require TLS, and that lists the mail servers, the mx entries, allowed to receive its mail. Our DNS engine checks that the policy matches the domain's real MX records.

On the night of November 28, the rule creator that covers the DNS engine went through the recent findings, checked the CISA KEV catalog and read the 871 vulnerability records published in the previous 48 hours. Then it picked the MTA-STS check for its audit, compared it with the RFC and found three defects:

  1. Wildcards were compared literally. The RFC allows mx: *.example.net. Our check looked for the exact host name in the list, so a correct wildcard never matched.
  2. Host names were compared with their case and trailing dot. MX1.Example.COM. and mx1.example.com are the same host in DNS. Our check said they were different.
  3. Valid policies were rejected, and a bad one crashed the check. The parser required mx entries even in mode: none, a disabled policy, where the RFC makes them optional. A malformed max_age raised an error instead of a clean "invalid policy" result.

The review agent found a fourth, three minutes after the pull request was opened: disabled policies were still checked. A policy in mode: none is not applied, so a mismatch against it is not a finding. This is common when a domain turns MTA-STS off and leaves its old mx entries in place.

The pull request opened by the agent, listing the four defects in the MTA-STS policy check
The pull request after review: four defects, each tied to the RFC section it violates, and the false positive stated in one sentence. Our ticket agents all open pull requests through the same GitHub App, ticket-fixer.

To prove the fix, the author agent wrote an oracle from the text of the RFC: a script that parses the policy and the MX records itself and never imports our code. The final pull request runs eight cases through the oracle, through the old check and through the new one:

Case Correct answer Old check New check
Wildcard *.example.net, real MX mx.other.com Mismatch Reported Reported
Wildcard *.example.net, real MX a.b.example.net Mismatch Reported Reported
Literal mx1, real MX mx2 Mismatch Reported Reported
Wildcard *.example.net, real MX mail.example.net No mismatch False positive Clean
MX1.Example.COM. and mx1.example.com No mismatch False positive Clean
mode: none with old mx entries No mismatch False positive Clean
mode: none without mx No mismatch Clean Clean
Apex literal example.net No mismatch Clean Clean

Before: three true positives, two true negatives and three false positives. After: three true positives, five true negatives and no false positive. The first three rows matter as much as the three false positives. The easy way to remove a false positive is to make the rule blind, and those rows prove this fix did not: every real misconfiguration is still reported.

The review is worth reading minute by minute. All times are UTC, on November 28:

  1. 00:12. The agent opens the pull request.
  2. 00:15. The review agent finds the fourth defect. The first commit skipped the MX comparison when the mx list was empty, but not when the policy mode was none. A domain that disables MTA-STS and keeps its old entries would still get a false finding.
  3. 00:18. The author agrees, pushes a second commit with a regression test for that case, and adds the case to the oracle. It is the sixth row of the table.
  4. 00:22. The review agent reads the new commit: "No new issues found."
  5. 02:57. I approve.
  6. 03:02. Merged.

The review agent asks for mode none policies to be skipped, and the author agent replies with the commit and its regression test
The review agent finds the fourth defect in the first commit. The author agent answers with a fix and its regression test.

The whole change is 265 lines added and 24 removed, with 17 new regression tests, and the repository's 287 tests pass. The pull request ends with a section named Limits, where the agent states what it did not prove: its fixtures are synthetic, and an independent evaluation on a withheld set of cases is still pending. Nobody asks for that section each time. It is part of the agent's job description.

Rules chiseled past the point where a human stops

We used to chisel detection rules by hand: write the check, meet an exception, refine the logic, repeat. Every engineer who has done it knows where it ends. You stop when the rule is good enough, because there are a thousand other rules and a product to build.

The agents don't stop there. Honestly, the rules this process produces are now beyond what a human team would write. The amount of code needed to tell a real issue from every one of its lookalikes is more than anyone gives to one rule among thousands.

Four false positives fixed in our public repositories in the last week of November show the kind of distinction involved:

  • A public identifier reported as a secret. A template flagged every Google OAuth client ID as a token exposure. Client IDs are sent to browsers by design; the secret is a different value, and a separate rule covers it. Fixed in agent_nuclei #130.
  • A certificate that was not the service's certificate. A self-signed certificate was reported on a bare IP address. Without a host name in the handshake, the CDN had answered with its fallback certificate. The fix keeps the finding for domain targets, where a self-signed certificate is real, and drops it for bare IPs. Fixed in agent_nuclei #133.
  • A digit mistaken for a version. "Server leaks version information" fired on the banner AmazonS3, because the banner contains a digit. nginx/1.18.0 is still reported. Fixed in agent_zap #67.
  • A site that says yes to everything. A detector for a PrestaShop module was fooled by another product that answers every path with a 200 and repeats the requested path in the page. The agent rebuilt the detector with product attribution, a negative control on a random path, and paired timing controls, in 1,193 added lines. Fixed in agent_asteroid #573.

The scale is what a team cannot match. Between November 1 and November 28, our ticket agents opened 472 pull requests in the 31 repositories of our scanning engines: 287 fixes to existing rules, most of them false positives, 181 additions of detectors, rules and fingerprints, and 4 documentation changes. By November 28, 407 were merged.

A good engineer can write any one of these. No team can write all of them, at this depth, every day, and still build a product.

Detection that does not wait for a CVE number

The same factory runs in the other direction, on missing detection.

Twice a day, a collector agent goes through public sources for new critical vulnerabilities and supply-chain compromises: security news, vendor advisories, the CISA KEV catalog. The rule creators turn what it finds into detectors, with the same discipline as the fixes: a real vulnerable release, a real fixed release, lookalikes, and an oracle that knows the right answer.

Take CVE-2026-127046, an API-key disclosure in MISP Modules. NVD published it on November 12 at 12:18 UTC. At 13:19, an agent opened a detector for it in Asteroid, our open-source remote vulnerability detector, validated against the upstream vulnerable and fixed commits on seven cases: two true positives, five true negatives. It was merged at 13:50, 92 minutes after publication.

That one was among the fastest, and the rest are not far behind. For the 15 detectors merged in November whose pull request records the NVD publication time to the minute, 10 were opened within 24 hours of publication and all 15 within 48 hours. The median was 20 hours. In the same four weeks, agents merged 83 pull requests that add detectors to Asteroid, with a median size of 1,104 added lines: the detector, its tests and its fixtures.

10 of 15 detectors were opened within a day of the CVE being published
Figure 2: Time from NVD publication to the detector pull request, for 15 Asteroid detectors merged in November 2026. Source: Ostorlab/agent_asteroid pull requests, checked November 28, 2026

Look at what the agents read: the advisory and the patch, not only the CVE feed. A CVE number is a label, and labels arrive late, or never. In October, the three advisories for an imgproxy remote code execution carried no CVE identifier, and they only reached the GitHub Advisory Database a month after the fix. Tooling that waits for the label saw nothing during that month.

The factory derives a detector from the patch itself: what changed, what the vulnerable code did, and what can be observed from outside. This is how we have built detection for vulnerabilities before their CVE number was assigned. It is also how we cover weaknesses that will never have one. The MTA-STS fix above carries this line in its pull request: specific_detector: not_applicable (no CVE).

What we commit to

This is what the factory lets me commit to our users.

Near real-time detection. When a vulnerability that matters is disclosed, the detection follows in hours, not in the next release.

Near-zero false positives. And where one gets through, the platform is in auto-cleaning mode: the finding is sampled, judged, ticketed and fixed, and it leaves a regression test behind so that it does not come back.

I want to be precise about the second commitment. Our nightly samples still contain false positives. The investigator confirms some of them every night, and I expect it to keep finding them, because scanners meet new software every day. What has changed is who does the work. A false positive is no longer something a customer has to find, report and wait on. The platform looks for its own mistakes every night and repairs them.

Where detection engineering is going

The work of a detection engineer is moving. It used to be writing rules. It is becoming building the thing that writes them: the sampling, the oracles, the review standard, the skills each agent works from.

When a bad rule gets through, we fix the rule, and then we fix the agent that wrote it: its instructions, its tools, its test environment. One of our agents audits the others every week and opens a ticket for each problem it finds. A corrected agent improves the next hundred rules, not just the one that exposed the weakness.

None of this runs on private tooling. The investigator, the fixer and the rule creators are ordinary Ostorlab ticket agents, and the setup guide shows how to give one a job, skills and a schedule.

A false positive used to end a conversation: someone closed it, and trusted the scanner a little less. Now it starts a pull request.

Free scan

Scan your own app for free

or book a demo

Keep reading

Related articles

Browse the blog