VLoc Bench released: evaluating Agent vulnerability localization capability in complete repositoriesVulnerability Localization Benchmark: Measuring Agentic Security Analysis at Repository Scale
Quick read
Evaluation and benchmarksBased on the paper PDF (generated by Gemini); refer to the original
The paper proposes VLoc Bench, a benchmark for repository-level vulnerability localization; tests show that GPT-5.5 (xhigh) only achieves 0.229 File F1 in Phase A, and still produces false positives on patched snapshots.
- Existing safety evaluations often pre-specify the code to be analyzed or focus on downstream exploitation and repair, lacking a direct evaluation of agents' fundamental defensive capability to localize vulnerability implementation files in unfamiliar code repositories based on abstract weakness types.
- Construct VLoc Bench with 500 real vulnerability tasks, covering 6 package ecosystems and 147 CWE types. Agents receive only CWE descriptions and search in a read-only terminal environment, localizing vulnerability files in pre-fix snapshots and judging that the vulnerability no longer exists in post-fix snapshots.
- The best-performing of the 27 models, GPT-5.5 (xhigh), achieves only 0.229 File F1 in Phase A, and 38.4% of tasks have no model correctly localizing; in Phase B checks, models with stronger localization ability still frequently report vulnerabilities on post-fix snapshots.
- The evaluation is limited to Advisory-associated vulnerabilities rather than the security status of the entire repository; the files modified by the patch may not include all relevant files; the patched snapshot only confirms that the target vulnerability is fixed, and cases such as task timeout or API errors where no submission is made are merged into true negatives.
- Evaluated models
- GPT-5.5 (xhigh)GPT-5.5 (default)GPT-5GPT-5 MiniGPT-5 NanoGemini 3 ProGemini 2.5 FlashGemini 3.1 Flash-LiteGLM-5.2MiniMax-M2.7Qwen3.5-122BQwen3.5-35B-A3BQwen3.5-27BGPT-OSS-120BGPT-OSS-20BLlama-3.3-70BGemma-4-31BCodeScout-14BQwen3.5-9BGemma-4-E4BGemma-4-E2BAntares-3BAntares-1BAntares-350MGranite-4.0-MicroGranite-4.0-1BGranite-4.0-350M
- Benchmarks
- VLoc Bench
- Metrics
- File F1PrecisionRecallTNRAbstain Rate
The researchers release the Vulnerability Localization Benchmark (VLoc Bench), using 500 real vulnerability tasks from 290 repositories to evaluate whether agents can locate the implementation file containing a vulnerability given only a CWE description and a read-only terminal. Tasks are drawn from GitHub Security Advisory, each paired with pre-fix and post-fix repository snapshots; the pre-fix phase requires submitting the affected file and is scored by File F1 based on patch changes, while the post-fix phase requires determining that the repository no longer has the vulnerability and is scored by true negative rate (TNR). Across 27 models and 4 static analysis tools, the strongest system achieves only 0.229 File F1, and 38.4% of tasks have no model locating correctly; larger repositories and more dispersed code make localization harder, with Go and Maven tasks being the hardest. Static analysis tools excel in TNR, with Semgrep-CWE reaching 0.996.
Why it was selectedVLoc Bench isolates vulnerability localization from detection and repair for evaluation, and provides comparative results of localization and false positives across 27 models and static analysis tools at repository scale.
Paper analysis
What problem does this paper attempt to solve?
Existing safety evaluations lack an examination of agents autonomously localizing vulnerability files from the entire repository; the paper proposes a benchmark that directly evaluates this capability and the suppression of false positives after fixes.
The paper attempts to address whether large language model agents, without prior knowledge of code location, can autonomously localize vulnerability implementation files in an entire code repository based solely on abstract vulnerability weakness types.
- Scenario and real-world need: In real-world software security incident response, defenders receiving vulnerability advisories or weakness investigation requests must first identify the specific implementation files in an unfamiliar complete code repository that need investigation and repair, which directly affects patch scope and downstream impact analysis.
- Limitations of existing evaluations: Most existing security benchmarks pre-specify the code snippets or functions to be analyzed, reducing the task to vulnerability identification; or they directly evaluate downstream behaviors such as exploitation and patch generation, hiding the localization process within execution feedback or explicitly providing file clues.
- Core observation and hypothesis: The authors believe that vulnerability localization and vulnerability detection are capabilities on different dimensions, and that localization and defensive restraint are complementary; a practical defensive assistant system must not only identify affected files when vulnerabilities exist, but also avoid false positives on code where vulnerabilities have already been fixed.
- Benchmark proposal: The paper proposes the vulnerability localization benchmark VLoc Bench, containing 500 real vulnerability tasks from 290 repositories, providing agents with a read-only terminal interaction environment, testing localization capability on pre-fix snapshots and false positive suppression on post-fix snapshots.
- Threat model setting: According to Section 3.1 of the paper, the evaluation adopts a defender-oriented setting:
- Goal: Identify the code files that a defender would need to modify to investigate and fix the weakness.
- Knowledge: Only the general MITRE CWE weakness category description is provided; no CVE numbers, vulnerability advisory text, fix commits, or code line hints are given.
- Capabilities: Only read-only terminal command permissions in an isolated sandbox; write operations, network access, and code execution are prohibited.
- Victim system: Covers pre-fix and post-fix snapshots of real open-source repositories across 6 package ecosystems.
What related research exists?
The paper reviews four research areas: software engineering repository localization, security detection and downstream evaluation, vulnerability search, and absence verification, and points out that there is a lack of benchmarks for full-repository weakness localization and reverse verification.
Repository-level localization in software engineering
- Retrieval and exploration agents: ContextBench (2026), CodeGrep (2026), and SWE-Explore (2026) study how agents locate and report relevant files or context in code repositories; the authors note that such tasks start from specific software defects or issue reports, usually containing repository-specific fault clues, whereas security localization requires searching based on abstract vulnerability semantics.
- Code graph and ranking methods: LocAgent (2025), CoSIL (2025), and CORE-Bench (2026) explore using graph structures or chunked retrieval to locate code; the authors note that these benchmarks assume the defect necessarily exists, and not submitting a location is only treated as localization failure, without considering restraint in security scenarios where no vulnerability exists.
Vulnerability detection and downstream tasks in security
- Code snippet-level detection: PrimeVul (2025), JitVul (2025), and SecVulEval (2025) evaluate models' ability to judge whether selected code snippets, functions, or commits contain vulnerabilities; the authors note this only measures vulnerability identification, avoiding the prerequisite step of retrieving candidate code across the whole repository.
- Execution-driven exploitation and repair: CyberGym (2026), Vul4Py (2026), and ExploitGym (2026) evaluate capabilities by running tests, triggering crashes, or generating exploits; the authors note that in the absence of vulnerability-specific evidence, vulnerability discovery becomes the main bottleneck, but these evaluations do not treat localization itself as an independent scoring target.
Localization of real vulnerabilities and code search
- Vulnerability localization at different granularities: RustMizan (2026), CWE-Bench-Java (2025), VulnGym (2026), and AutoTrace (2026) attempt to locate data-flow paths, trigger statements, or entry points of real vulnerabilities; the authors note that they mostly start from fix commits, advisory texts, or specific functions, not at whole-repository scale using only CWE descriptions.
- Absence of vulnerabilities and fix verification: Bessey et al. (2010), DREA (2026), and BountyBench (2025) focus on false positives of static analysis or agents on patched code; the authors note that security analysis tools must handle cases where vulnerabilities are fixed or absent, but localization and restraint have not been jointly evaluated in repository-level localization tasks before.
Evaluation benchmarks and comparison baselines
- Baselines and benchmark setup: the paper uses its own VLoc Bench as the benchmark, evaluating 27 language models including GPT-5.5, Gemini 3 Pro, and GLM-5.2, and compares 4 static code analysis tools: Semgrep, Semgrep-CWE, CodeQL, and Horusec.
The authors position VLoc Bench as a benchmark that, without providing code location clues, simultaneously evaluates file-level vulnerability localization performance and post-fix snapshot verification behavior at whole-repository scale (per Table 1 note).
How does the paper address this problem?
The paper constructs VLoc Bench with 500 paired snapshots, provides a read-only terminal interface, uses patch-modified files as ground truth, and evaluates localization and verification in two phases.
The paper proposes the VLoc Bench benchmark, which constructs paired snapshots of real code repositories before and after vulnerability fixes, and in a read-only terminal environment provides the model only with an abstract CWE weakness description, evaluating two complementary capabilities: vulnerability localization and post-fix verification.
Benchmark construction and task sources
- Data source and filtering: vulnerabilities disclosed between 2016 and 2026 are extracted from GitHub Security Advisories (GHSA); tasks that only modify tests/docs/CI/lock files, private or deleted repositories, tasks whose patches involve more than 50 files, and entries lacking a CWE classification are excluded, leaving 500 tasks.
- Paired snapshot design: each task contains two commit snapshots, pre-fix (pre-push) and post-fix (post-push); the pre-fix snapshot contains the vulnerability, the post-fix snapshot contains the fix implementation, with the directory structure and source code fully preserved.
- Ground-truth file annotation: ground-truth files are determined from the patch diff, and path heuristic rules are used to filter test and documentation paths (such as test/, docs/,
*_test.*,*.md, etc.), keeping only the implementation source files modified by the patch.
Interaction protocol and evaluation sandbox
- Input restrictions: the agent only receives a generic CWE description (e.g., the standard definition of CWE-79); the paper conceals the advisory text, CVE number, severity rating, affected versions, and file clues.
- Restricted terminal interface: the agent explores the repository through read-only terminal commands (such as ls, find, grep, sed, cat); file writes, network access, and process execution are forbidden; the task budget is set to at most 15 terminal commands and 20 generation rounds, and the agent is forcibly terminated after 3 consecutive rounds without calling a tool.
- Isolated sandbox environment: each task runs in a separate Ubuntu 24.04 Docker container with 2 CPU cores and 4 GB of memory, networking fully disabled, and a per-command timeout of 10 seconds; the repository is mounted read-only at /repo/, and the container is destroyed after the task to prevent information leakage across tasks.
Evaluation phases and determination metrics
- Two-phase evaluation process:
- Phase A (localization): the agent explores the pre-fix snapshot and submits an ordered list of file paths by calling
submit_vulnerable_files; callingsubmit_no_vulnerability_foundor exhausting the budget is judged as an error. - Phase B (verification): the agent receives the same CWE description on the post-fix snapshot; the correct behavior is to call
submit_no_vulnerability_foundto confirm no vulnerability; submitting any file path is counted as a false positive.
- Phase A (localization): the agent explores the pre-fix snapshot and submits an ordered list of file paths by calling
- Core calculation formulas: Phase A uses file-level F1 between the submitted files and ground-truth files to evaluate localization: File F1 = (2 · Precision · Recall)/(Precision + Recall) where both Precision and Recall are computed as the set intersection divided by the corresponding total number of files; submitted paths are treated as an unordered set. Phase B uses the true negative rate to evaluate the model's restraint on fixed code: TNR = (|tasks correctly declared clean|)/(|total Phase B tasks|) This metric reflects the proportion of tasks where the model correctly judges that the vulnerability is not present in the fixed repository.
What experiments did the paper conduct?
Evaluating 27 language models and 4 static tools, the strongest model achieves an F1 of only 0.229, 38.4% of tasks are completely unsolved, and high-localization models produce many false positives on patched snapshots.
Experimental Setup
- Systems under test: 8 closed-source frontier models (GPT-5.5 xhigh, GPT-5.5 default, Gemini 3 Pro, Gemini 2.5 Flash, GPT-5 Mini, Gemini 3.1 Flash Lite, GPT-5, GPT-5 Nano), 9 large-parameter open-source models (GLM-5.2, Gemma-4-31B, Qwen3.5-27B, Qwen3.5-122B, Qwen3.5-35B-A3B, GPT-OSS-20B, GPT-OSS-120B, MiniMax-M2.7, Llama-3.3-70B), 7 small-parameter open-source models (CodeScout-14B, Qwen3.5-9B, Gemma-4-E2B, Gemma-4-E4B, Granite-4.0-350M, Granite-4.0-Micro, Granite-4.0-1B), 3 specialized models (Antares-3B, Antares-1B, Antares-350M), and 4 static analysis tools (Semgrep, Semgrep-CWE, CodeQL, Horusec).
- Dataset and scale: 500 real vulnerability tasks from VLoc Bench, covering 6 package ecosystems—Go (215), Maven (104), npm (88), pip (52), Rust (40), and Composer (1)—and encompassing 147 CWEs.
- Evaluation metrics: Phase A evaluates file-level F1 (File F1), Precision, Recall, and Abstain Rate; Phase B evaluates true negative rate (TNR).
- Review and determination method: F1 is computed by deterministic code matching based on the list of files modified by the patch; Phase B is determined by whether a vulnerability-free commit function is invoked, requiring no additional model review; sampling temperature is set to 0.3, with a maximum single-round completion length of 16,384 tokens.
- Sample size and number of repetitions: Each system is independently run 3 times on all 500 tasks, and the macro-average of the metrics is reported.
Main Results
Main results are summarized in the table below (representative models and tools from each category are selected, based on Table 2 and Table 3):
Swipe horizontally to read the table
Model / Tool Parameters Phase A File F1 Phase A Precision Phase A Recall Phase B TNR GPT-5.5 (xhigh) — 0.229 0.310 0.221 0.279 Antares-3B 3B 0.223 0.298 0.219 0.034 GLM-5.2 753B 0.186 0.226 0.186 0.582 Gemini 3 Pro — 0.152 0.190 0.153 0.329 Gemma-4-31B 31B 0.101 0.131 0.097 0.682 Semgrep N/A 0.086 0.091 0.155 0.912 Llama-3.3-70B 70B 0.012 0.016 0.014 0.745 (Note: The table omits the remaining 20 models in the same series, such as GPT-5.5 default, Gemini 2.5 Flash, the Qwen3.5 series, and the Granite series, as well as 3 static tools; see Table 2 and Table 3 for complete data)
- Overall localization is difficult: The highest-performing frontier system, GPT-5.5 (xhigh), has a File F1 of 0.229, and only 5 model systems across the board reach a File F1 of 0.18 or above (Table 2).
- Localization and verification performance are disconnected: Models with higher Phase A localization scores generally have low TNR in Phase B (e.g., GPT-5.5 xhigh has a TNR of 0.279, Antares-3B 0.034), while systems scoring lower in Phase A often exhibit high TNR (e.g., Granite-4.0-1B reaches 1.000, GPT-5 Nano reaches 0.868) (Table 3).
- Parameter scale is not a decisive factor: Among general open-source models, the OLS fitted correlation coefficient between parameter count and File F1 is r=0.50 (Figure 2); the fine-tuned specialized model Antares-3B (3B parameters) achieves a File F1 of 0.223, higher than most large-parameter general models (Table 2).
Repository Difficulty and Feature Regression Analysis
- What was tested: Using 52 repository structure and vulnerability metadata features (Lasso regression), as well as a joint regression including 15 model features (67 features), the sources of intrinsic task difficulty were analyzed (Sections 5.1 and 5.2).
- Experimental results: The pure repository feature regression achieves R^2=0.164 under 5-fold cross-validation; the code concentration top5_loc_share coefficient is +0.082 (easier), the compressed size log10_zip_size_kb coefficient is -0.037 (harder), and the Go ecosystem eco_go coefficient is -0.017 (Table 4); in the joint regression, the sum of absolute weights of repository structure features is 0.285, 4.5 times that of model category weights (0.063) (Figure 3); the cross-validated R^2 of the pure model feature regression is 0.007 (Table 5).
- Authors' interpretation: Repository structure is the main source of localization difficulty; dispersed code distribution, deep directory hierarchies, and Go language projects are harder to localize; although model attributes affect average performance, they can hardly predict which specific task will be solved.
Repository Scale and Decomposition of Unsolved Tasks
- What was tested: The average File F1 across all models was tallied by repository size interval, and the distribution of tasks missed by all models was tallied (Section 5.3).
- Experimental results: Repositories smaller than 100 KB have an average File F1 of 0.598 (n=20), while repositories larger than 10 MB have an average File F1 dropping to 0.058 (n=223), a difference of about 10 times (Figure 4); 38.4% of tasks in the full benchmark have a File F1 of 0 for all 27 models, with large Go and Maven repositories accounting for 47% and 31% of this unsolved subset respectively.
- Authors' interpretation: The expansion of the search space directly weakens the localization signal; current models face a persistent set of hard-core tasks that are difficult to handle on large, complex projects.
Failure Modes and Behavior Analysis
- What was tested: About 38,500 non-perfect runs were classified by trace behavior, and the distribution of failure causes and their association with command usage were tallied (Sections 5.4 and 5.5).
- Experimental results: Abstained (no files submitted) accounts for 59.1%, and wrong files submitted accounts for 40.9%; the main secondary failure modes are Exhausted budget (32.3%) and Wrong files (27.4%) (Table 6); the Pearson correlation coefficient between average number of commands and average File F1 is r=0.72 (p<0.001).
- Authors' interpretation: Failures mainly stem from prolonged search that does not converge or from false positives; effective localization requires long-range exploration, targeted code retrieval, and stable tool interaction working together.
Other Ablations and Analyses
- Lasso penalty form variants: Under Elastic Net (l1-ratio=0.5), the weight ratio of repository structure to model category is 5.7 times; under permutation importance, the ratio is 3.2 times (Section 5.2).
- Reasoning effort comparison: GPT-5.5 has a File F1 of 0.229 under the xhigh setting and 0.221 under the default setting (Table 2).
- Rule-specialized variant: Semgrep has a File F1 of 0.086 under default rules, and Semgrep-CWE with specified CWE rules drops to a File F1 of 0.052 (Table 2).
- Single-task evaluation cost and time: Antares-350M takes about 11 minutes and costs 0.60 USD on a single H100; GPT-5.5 xhigh takes about 5 hours and costs 141.00 USD via API (Table 8).
Negative Results and Exceptions
- General code capability does not translate into a security localization advantage: Llama-3.3-70B shows 75.3% premature termination, with a File F1 of only 0.012 (Table 2, Table 7); Granite-4.0-1B and Granite-4.0-Micro both have a File F1 of 0.000 (Table 2).
- Model verification is generally distorted: Specialized models trained for vulnerability localization report large numbers of nonexistent vulnerable files on post-fix snapshots; Antares-3B has a TNR of 0.034, and Antares-1B only 0.008 (Table 3).
What are some points that can be further explored?
The paper notes current limitations: ground truth is limited to patched files, verification lacks general criteria, etc.; future work plans to introduce more context levels and verify new findings by models.
Limitations and future directions noted by the authors
- Limited scope of ground-truth files: In Phase A, the implementation files modified by the patch provide reproducible localization targets, but may not cover all files related to the vulnerability (Section 7).
- Lack of global security guarantees for patched snapshots: In Phase B, the patched snapshot only confirms that the specific recorded vulnerability has been fixed, and does not imply that the repository has no other vulnerabilities; this limits the evaluation of general static analysis tools such as Semgrep and CodeQL, because detections outside the benchmark targets cannot be judged as correct or incorrect without additional ground truth (Oracle) (Section 7).
- Confusion in abstention determination during verification: In Phase B, the true negative statistics combine the model's active abstention with failure cases that produce no submission, such as generation overruns, API errors, or model refusals (Section 7).
- Introducing different levels of task context: The authors plan to extend VLoc Bench in the future, gradually adding more detailed vulnerability information from the current CWE description only, to test the impact of additional security context on localization performance (Section 7).
- Enhancing result verification in Phase B: The authors plan to verify additional detections proposed by models in Phase B through manual review, proof-of-concept (PoC), or other behavioral judgment benchmarks, thereby distinguishing real vulnerability findings from false positives (Section 7).
- Intrinsic evaluation of intermediate security capabilities: The authors believe that vulnerability localization is only one stage of the security analysis workflow, and future benchmarks should combine such intermediate analysis capabilities with end-to-end extrinsic evaluation (Section 7).
Experimental coverage
- Systems under test: The experiments tested 27 language models and 4 static code analysis tools; Anthropic's Claude series models were not included, as the authors explain in Appendix D that they were excluded due to evaluation budget constraints.
- Ecosystem and language distribution: The evaluation covers 6 ecosystems: Go, Maven, npm, pip, Rust, and Composer, with Go accounting for 43%, and Composer containing only 1 task (Section 3.1).
- Weakness categories and severity: Covers 147 CWE weaknesses, with CVSS levels concentrated in High (44%) and Medium (39%), Critical at 11%, and Low at 6% (Section 3.1).
- Interaction and resource constraints: All models were evaluated in a read-only terminal interface, with a maximum of 15 commands and 20 generation rounds, a 10-second timeout per command, and a no-network Docker container with 2 cores and 4 GB memory (Section 3.2).
- Indivisibility of model non-submission semantics: The paper deterministically classifies failures by command count and submission status, but does not directly identify the semantic intent behind the traces, such as distinguishing whether a search failure is due to misunderstanding the CWE or poor directory selection (Section 5.5).
Summarize the main content of the paper
The paper proposes VLoc Bench, a repository-level vulnerability localization benchmark, and points out that current models have low localization performance and are prone to false positives on patched code.
- Research positioning: In response to the current situation where large model agents in security analysis often skip code investigation and directly evaluate downstream behaviors, the paper proposes the benchmark VLoc Bench to evaluate weakness localization and post-fix verification capabilities at the full repository scale.
- Core question: Existing security benchmarks mostly pre-select code snippets or use test cases to drive downstream exploitation and repair, leaving the key defensive capability of agents to independently locate vulnerability code in unknown codebases based solely on abstract weakness categories without objective measurement.
- Benchmark method: The benchmark constructs paired pre-fix and post-fix snapshots from 500 real vulnerabilities, providing agents with only CWE category descriptions in a read-only terminal sandbox; it tests File F1 for identifying patch files on pre-fix snapshots and the True Negative Rate (TNR) for judging that vulnerabilities are eliminated on post-fix snapshots.
- Core experimental findings:
- Localization is generally difficult: Among 27 language models, the top-performing GPT-5.5 (xhigh) achieves only 0.229 File F1 in Phase A, and 38.4% of tasks in the entire benchmark are not successfully localized by any model (Table 2, Section 5.3).
- Trade-off between localization and restraint: Models with higher localization scores show a clear tendency for false positives on patched snapshots; GPT-5.5 (xhigh) has a TNR of only 0.279, and the fine-tuned model Antares-3B has a TNR of only 0.034 (Table 3).
- Repository structure dominates task difficulty: In regression analysis, the weight of repository structure features in explaining difficulty is 4.5 times that of model category weights (Figure 3); repositories larger than 10 MB have an average File F1 (0.058) that is about one-tenth of that for repositories smaller than 100 KB (0.598) (Figure 4).
- Author conclusions and implications: The authors believe that vulnerability localization is a repository-level security analysis skill independent of general code capability; building practical defensive agents requires not only improving long-horizon target retrieval and tool interaction, but also prioritizing the restraint capability to identify non-vulnerable code after fixes and avoid alert fatigue.