MAS-SZZ: Multi-Agentic SZZ Algorithm for Vulnerability-Inducing Commit Identification
The paper proposes MAS-SZZ, a multi-agentic algorithm that leverages collaborative agents and structured prompting to accurately identify vulnerability-inducing commits by summarizing root causes and autonomously tracing code history, significantly outperforming existing SZZ methods with up to a 65.22% F1-score improvement.
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 are a detective trying to solve a crime in a massive, ever-changing city. The "crime" is a software vulnerability (a security hole), and the "crime scene" is a specific patch of code that was recently fixed. Your goal is to find the Vulnerability-Inducing Commit (VIC): the exact moment in history when a developer accidentally introduced the bug in the first place.
This is the job of the SZZ algorithm. Think of it as a time-traveling detective that looks at the "fix" and tries to walk backward through the city's history to find the original mistake.
However, the old detectives (previous SZZ algorithms) are often bad at their jobs. They make two big mistakes:
- Wrong Clues: They pick the wrong lines of code to investigate. Sometimes they look at code that was just moved around or renamed (like moving a street sign) instead of the code that actually broke.
- Giving Up Too Soon: They stop their investigation too early. They might find a commit that looks "similar" to the fix and stop there, missing the actual commit from years ago that planted the seed of the problem.
Enter MAS-SZZ: The Detective Team
The authors of this paper created MAS-SZZ (Multi-Agentic SZZ). Instead of one lone detective, they built a team of specialized AI agents who work together like a high-tech police squad to solve the case.
Here is how their team operates, step-by-step:
1. The Auditor (The Forensic Analyst)
First, the team looks at the "crime report" (the CVE description) and the "fix report" (the code that fixed the bug).
- What they do: The Auditor summarizes exactly why the bug happened. Crucially, they don't just guess; they point to specific evidence in the reports to back up every claim.
- The Check: A "Judge" agent double-checks the Auditor's work. If the Auditor makes a logical error or can't find evidence for a claim, the Judge sends them back to redo the work. This ensures the team starts with a solid, verified theory of the crime.
2. The Reviewer and Locator (The Target Specialists)
Now that they know what the crime was, they need to find the specific piece of evidence to trace back.
- The Problem: The "fix" often contains a lot of noise—code that was just cleaned up, renamed, or added for new features.
- The Solution: The Reviewer reads every change in the fix and asks, "What was the developer's intent here?" They filter out the "noise" (like code refactoring) and keep only the changes that actually fixed the security hole.
- The Locator: Once the relevant changes are found, the Locator pinpoints the exact line of code that is the "smoking gun." This becomes the Anchor Statement.
3. The Tracer (The Time Traveler)
This is the most important part. The Tracer takes that "Anchor Statement" and starts walking backward through the city's history (the code repository).
- How they do it: Instead of just taking one step back and stopping, the Tracer keeps going. At every step, they ask, "Is the bug still here?"
- The Stop Signal: They keep walking back until they find a version of the code where the bug doesn't exist yet. The very next commit after that (the one where the bug first appeared) is declared the culprit.
- Why it's better: Old algorithms often stop because the code looks "different" (similarity drops). The Tracer ignores how different the code looks and focuses purely on whether the vulnerability is present or not.
The Results: A Better Detective
The authors tested this new team against seven other "detective" algorithms using real-world data from two major datasets.
- The Score: In the world of these algorithms, the "F1-score" is like a final grade that balances finding all the bad guys (Recall) and not accusing innocent people (Precision).
- The Win: MAS-SZZ didn't just do a little better; it crushed the competition. It improved the final score by up to 65.22% compared to the best previous method.
- The Takeaway: By using a team of AI agents that verify evidence, filter out noise, and keep walking back until they find the true origin, MAS-SZZ is much more reliable at finding the root cause of software vulnerabilities than any method used before.
In short, MAS-SZZ turns a clumsy, one-person search into a coordinated, evidence-based investigation that rarely misses the real culprit.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.