RealVuln: Benchmarking Rule-Based, General-Purpose LLM, and Security-Specialized Scanners on Real-World Code
The paper introduces RealVuln, the first open-source benchmark evaluating 15 security scanners on 26 real-world Python repositories, revealing a consistent three-tier performance hierarchy where security-specialized tools outperform general-purpose LLMs, which in turn significantly surpass rule-based SAST solutions.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you own a massive, complex house (your software code). You know there are hidden traps, loose floorboards, and unlocked windows (vulnerabilities) that burglars could use to break in. Your job is to find and fix them before the burglars arrive.
To help you, you hire three different types of security inspectors:
- The Rule-Book Inspector (Rule-Based SAST): This guy carries a giant checklist. He only looks for things that match his list exactly. If a window is open, he checks it off. But if a burglar is hiding behind a curtain that looks like a window, he misses it. He's fast, but he's easily fooled by anything that doesn't look exactly like the picture in his book.
- The Smart Generalist (General-Purpose LLM): This is a brilliant, well-read detective who has read every book in the library. They don't just look for open windows; they understand how a house works. They can guess where a burglar might hide based on the layout. However, they are generalists. They haven't specialized in "house security" specifically, so they sometimes get distracted, miss details, or get tired and stop working on certain rooms.
- The Specialized Security Pro (Security-Specialized Scanner): This is a detective who has spent their entire life studying only house security. They know the specific tricks burglars use, they have a custom-built tool for every type of lock, and they are obsessed with finding every single flaw, even if it means they have to check a few harmless spots just to be sure.
The Big Experiment: RealVuln
The authors of this paper, Kolega, decided to put these three types of inspectors to the ultimate test. They didn't use fake, made-up houses (which is what most previous tests did). Instead, they built 26 real, intentionally broken houses (educational apps and Capture-The-Flag games) filled with 796 known traps and 120 "fake traps" designed to trick the inspectors.
They asked: Who finds the most real traps without getting too confused by the fake ones?
The Results: A Clear Three-Tier Race
The results were surprising and created a clear "Three-Tier" ranking:
🥇 The Winner: The Specialized Pro (Kolega.Dev)
This tool found 80% of the real traps. It was the best at catching the bad guys. However, it was a bit paranoid: it flagged some harmless spots as suspicious (false alarms). But in security, the authors argue, it's better to be paranoid than to miss a real break-in.- Analogy: It's like a guard dog that barks at every squirrel, but it never misses a burglar.
🥈 The Runner-Up: The Smart Generalist (Claude Sonnet 4.6)
The best "general" AI found about 50% of the traps. It was much smarter than the Rule-Book Inspector, but it still missed half the real dangers. It was also more accurate (fewer false alarms) but didn't catch enough to be the top choice for high-stakes security.- Analogy: A smart human detective who is good at solving crimes but gets distracted by a interesting conversation and misses a few clues.
🥉 The Loser: The Rule-Book Inspector (Semgrep, Snyk, SonarQube)
The traditional tools that rely on simple checklists performed the worst. They only found about 18% of the real traps. They were easily fooled by anything that didn't look exactly like their checklist.- Analogy: A guard who only checks the front door. If the burglar comes through the chimney, the guard doesn't even look up.
Why Does This Matter?
The paper argues that in the world of cybersecurity, missing a danger is much worse than raising a false alarm.
- If you miss one real vulnerability, a hacker can steal your data.
- If you raise a false alarm, a human just has to spend 5 minutes checking it and saying, "Oh, that's fine."
Because of this, the authors created a special scoring system (called F3) that punishes missing a trap much more heavily than raising a false alarm. Under this system, the Specialized Pro wins by a huge margin.
The Catch (and the Future)
The paper admits a few things:
- The Conflict of Interest: One of the authors works for the company that built the winning tool (Kolega). To fix this, they released everything—the code, the test data, and the scoring system—so anyone can check their work and prove they aren't cheating.
- It's Just the Beginning: This test was only on Python code (one programming language) and "broken" test houses. The next version will test on real-world code and other languages like Java and JavaScript.
The Bottom Line
If you want to secure your software, don't just rely on old checklists or generic AI. The future of security lies in specialized tools that combine the smarts of AI with a deep, specific understanding of how hackers actually break into systems.
The paper concludes that while generic AI is a huge step up from old tools, it's not enough on its own. We need tools built specifically for security to keep our digital houses safe.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.