Can Open-Source LLM Agents Replace Static Application Security Testing Tools? An Empirical Assessment
This empirical study concludes that current open-source, general-purpose LLM agents powered by Ollama models are not yet suitable for replacing established Static Application Security Testing (SAST) tools like Bandit in realistic cybersecurity scenarios.
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 have a massive library of books (code) and you need to find every single typo, plot hole, or dangerous secret hidden inside them. You have two helpers to do this job:
- The Veteran Librarian (Bandit): This is a traditional tool. It doesn't "think" or "imagine." It has a strict, pre-written checklist of known mistakes (like "don't leave the back door open" or "don't use a rusty lock"). It scans the books quickly, methodically, and tells you exactly where the problems are. It's boring, but it's reliable.
- The Creative Intern (The AI Agent): This is a new, fancy Large Language Model (LLM). It's like a brilliant student who has read the entire internet. Instead of a checklist, you give it a job description: "Find anything that looks dangerous." It uses its imagination to guess what might be wrong.
The Experiment
The researchers in this paper decided to put these two helpers against each other. They gave them three different "libraries" (open-source software projects) to scan:
- A retired but sturdy package manager (Yum).
- A personal habit-tracking app (Beaverhabits).
- A security tool that blocks bad login attempts (Fail2ban).
They asked the Veteran Librarian to scan them first to create a "gold standard" list of real problems. Then, they asked the Creative Intern (powered by three different AI models: Gemma, Llama, and Qwen) to do the same job.
What Happened? (The Results)
The results were a bit of a disaster for the Creative Intern. Here is the breakdown using simple analogies:
- The "Hallucination" Problem: The Intern kept inventing problems that didn't exist. It looked at a perfectly normal line of code and said, "Aha! This is a secret password leak!" when it was actually just a standard setting. In the paper, this is called a False Positive. The Intern was so eager to find trouble that it flagged harmless things as dangerous.
- Analogy: It's like a security guard who thinks a person holding a red apple is holding a bomb because "red things are dangerous."
- The "Lost Location" Problem: When the Intern did find a real problem, it often couldn't tell you where it was. It would say, "There's a bug in the code," but when you asked, "Which file? Which line?", it would make up a file name that didn't exist or point to a line number that was empty.
- Analogy: It's like a detective saying, "The thief is in the house," but when you ask, "Which room?", they guess "The attic" when the thief is actually in the basement.
- The "Missed Opportunities" Problem: The Intern missed a huge chunk of the actual problems the Veteran Librarian found. It only caught about 25% of the real issues.
- Analogy: The Librarian found 100 typos. The Intern only found 25 of them, and 50 of the ones it found were things that weren't typos at all.
- The "Speed" Problem: The Veteran Librarian finished the job in less than a minute. The Creative Intern took hours (sometimes 1 to 4 hours per library) to do the same work.
- Analogy: The Librarian is a high-speed train. The Intern is a snail that stops to smell every flower along the track.
The Verdict
The paper concludes that right now, the Creative Intern is not ready to replace the Veteran Librarian.
While the Intern is great at writing stories or summarizing emails, it is currently too unreliable for the specific, high-stakes job of security scanning. It creates too much "noise" (fake alarms), misses too many real dangers, and takes way too long to do the work.
The researchers suggest that maybe the Intern could be used as a helper to the Librarian—perhaps to spot things the Librarian missed—but only if humans check every single one of its guesses first. But as a standalone tool to replace the old, reliable methods? The paper says no. The "hallucinations" (making things up) and the lack of precision make it too risky to trust with security right now.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.