TL;DR
While current LLM evaluations focus on whether AI agents can exploit or patch software bugs, they overlook a critical first step: finding them. This paper introduces VLoc Bench, a benchmark designed to test an agent's ability to locate vulnerable files within a full repository using only an abstract weakness description. The results reveal a massive capability gap: even the best models struggle to navigate codebases effectively, and those that do often suffer from high false-positive rates on already-patched code.
What Problem Does This Paper Address?
When a security vulnerability is disclosed, defenders face the immediate challenge of triage: finding exactly where the flaw lives within a massive, unfamiliar codebase. While AI agents are increasingly proposed to automate cybersecurity workflows, existing benchmarks typically hand-feed the relevant code snippet to the model or evaluate downstream outcomes like generating a patch.
This paper isolates vulnerability localization as a distinct, repository-scale capability. It asks a fundamental question: Given an abstract weakness class (like a CWE description) and read-only access to an unfamiliar repository, can an AI agent successfully find the implementation files that need to be fixed? Crucially, it also addresses verification—ensuring that an agent knows when to exercise restraint and not report a vulnerability if the code has already been patched.
Methods
The authors frame vulnerability localization as an interactive, search-based task within a secure, read-only Docker sandbox. Each evaluation task is split into two distinct phases:
- Phase A (Localization): The agent is dropped into a vulnerable snapshot of a repository. It receives only a generic MITRE CWE description (e.g., "CWE-22: Path Traversal") without any repository-specific hints, CVE identifiers, or advisory text. The agent uses a read-only terminal interface to run commands like
ls,grep, andcatto explore the codebase. It must then submit a list of vulnerable files, which is scored using a file-level $F_1$ metric against the actual developer patch. - Phase B (Verification): The agent is given the patched version of the same repository and the same CWE description. To succeed, it must recognize that the vulnerability has been remediated and explicitly report that no vulnerability was found. This measures the model's True Negative Rate (TNR).
To simulate realistic efficiency constraints, agents are limited to a strict budget of 15 terminal commands and 20 generation turns per task.
Datasets
The authors introduce the Vulnerability Localization Benchmark (VLoc Bench), which consists of 500 real-world vulnerabilities sourced from public GitHub Security Advisories (GHSAs) spanning 290 distinct repositories.
VLoc Bench covers:
- 6 package ecosystems: Go (43%), Maven (21%), npm (18%), pip (10%), Rust (8%), and Composer (<1%).
- 147 unique CWE categories, heavily featuring resource exhaustion, improper input validation, and information exposure.
- Varying repository scales: Codebase sizes range from 12 KB to 840 MB.
Unlike general software engineering benchmarks that rely on detailed bug reports, VLoc Bench deliberately withholds advisory text to evaluate pure security-aware repository search.
Key Insights and Ideas
- Localization $\neq$ Verification: A striking finding is that models highly aggressive at finding vulnerabilities in Phase A often fail miserably in Phase B. They frequently hallucinate vulnerabilities in clean, patched code, exposing a severe lack of calibrated restraint.
- Repository Structure Dominates Model Scale: Using a Lasso regression analysis, the authors discovered that a repository's structural properties (such as code concentration and directory depth) predict task difficulty far better than model size or family. Repositories where code is concentrated in a few large files are significantly easier for agents to parse than deep, dispersed directory trees.
- Coding Capability is a Poor Proxy for Security Search: General software engineering prowess does not automatically translate to cybersecurity success. Safety alignments (which cause false refusals on dual-use tasks) and out-of-distribution security logic mean that massive frontier models can underperform compared to smaller, domain-specialized counterparts.
Key Results
- Low Overall Performance: Repository-scale localization remains an open challenge. The strongest system evaluated (GPT-5.5 xhigh) achieved a macro-averaged File $F_1$ score of just 0.229 in Phase A.
- The Unsolved Core: For 38.4% of the tasks, not a single model was able to locate a correct vulnerable file, pointing to a persistent "hard core" of difficult repository conditions (particularly large Go and Maven projects).
- Specialized Models vs. Frontier Giants: Smaller, domain-tuned models like Antares-3B achieved impressive localization scores (0.223 $F_1$), rivaling frontier models. However, they demonstrated almost zero restraint, posting a near-zero True Negative Rate in Phase B by reporting vulnerabilities in almost every patched repository.
- Static Analysis Baselines: Traditional static analysis tools like Semgrep (0.086 $F_1$) outperformed several general-purpose LLMs, proving that interactive search alone is insufficient without security-specific heuristics.
Limitations and Future Work
The authors acknowledge several limitations in VLoc Bench's current design:
- Patch-centric Ground Truth: The benchmark defines ground truth strictly as the files modified by a security patch. This might miss other files that are conceptually relevant to the vulnerability but didn't require modification.
- Phase B Conflation: In the verification phase, API errors, timeouts, or explicit refusals are scored as true negatives alongside genuine "clean code" judgments, which may artificially inflate the restraint metrics of some models.
Future Work: The team plans to introduce varying levels of task context (such as detailed vulnerability descriptions) to study how information availability impacts search efficiency. They also intend to integrate behavioral oracles, such as executing dynamic proofs-of-concept, to rigorously validate whether an agent's Phase B report is a true verification or a lucky guess.
Summary updated