arXiv:2510.02389cs.SEcs.CR2025-10被引 3

用大模型精准定位开源代码漏洞行,提升修复效率。

From Trace to Line: LLM Agent for Real-World OSS Vulnerability Localization

  • 通过抽象语法树分块和证据引导迭代,从项目级逐步聚焦到具体漏洞行。
  • 在真实漏洞数据集上实现58.0%的漏洞检测率和54.8%的行级定位率。
  • 适合需要高精度漏洞诊断的开发者与安全团队使用。

大型语言模型在漏洞发现方面展现潜力,但现有方法多孤立分析代码,难以处理长上下文,且仅能定位函数或文件级别,无法为工程师提供精确的修复线索。本文提出T2L框架,实现项目级、行级漏洞定位,通过基于抽象语法树的分块与证据引导的精炼机制,逐步缩小排查范围。我们设计了基线智能体Agentic Trace Analyzer(ATA),融合运行时证据如崩溃点和堆栈跟踪,将故障现象转化为可操作的诊断结果。为支持严格评估,我们构建了T2L-ARVO基准,包含50个真实项目中的5类崩溃场景,经专家验证。在该基准上,基线模型达到最高58.0%的漏洞检测率和54.8%的行级定位率。T2L框架推动了基于大模型的漏洞检测向可部署、高精度诊断发展。

原文摘要 · Abstract (English)

Large language models show promise for vulnerability discovery, yet prevailing methods inspect code in isolation, struggle with long contexts, and focus on coarse function- or file-level detections that offer limited guidance to engineers who need precise line-level localization for targeted patches. We introduce T2L, an executable framework for project-level, line-level vulnerability localization that progressively narrows scope from repository modules to exact vulnerable lines via AST-based chunking and evidence-guided refinement. We provide a baseline agent with an Agentic Trace Analyzer (ATA) that fuses runtime evidence such as crash points and stack traces to translate failure symptoms into actionable diagnoses. To enable rigorous evaluation, we introduce T2L-ARVO, an expert-verified 50-case benchmark spanning five crash families in real-world projects. On T2L-ARVO, our baseline achieves up to 58.0% detection and 54.8% line-level localization rate. Together, T2L framework advance LLM-based vulnerability detection toward deployable, precision diagnostics in open-source software workflows.

漏洞定位LLM Agent代码分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。