智能体代码审查能否在漏洞被合并前捕获它们?
Can Agentic Code Review Catch Vulnerabilities Before They Are Merged?
AI总结:
本文提出首个智能体安全审查基准SecPRBench,基于9个关键系统的265个现实世界漏洞提交评估8个前沿模型,发现模型召回率介于32.5%-78.1%,不同安全工具表现存在差异。
摘要:
大型语言模型(LLM)智能体已越来越多地被用于以安全为核心的代码审查,但现有基准大多从后续修复中推导被审查的变更,而非源自现实世界引入漏洞的提交。本文中,我们提出SecPRBench,这是首个用于评估智能体安全审查的综合基准,基于经验证的现实世界代码变更构建。更具体地,我们构建了一条自动化智能体流水线,用于自主收集、构建并验证流行软件系统中大量现实世界引入漏洞的提交。为确保评估精准,我们还采用LLM作为评判者,以认可与真实漏洞匹配的发现。截至目前,我们已从9个关键系统中收集了265个任务,包括拥有数百万行代码的Firefox、V8和OpenSSL。在8个前沿模型中,召回率介于32.5%至78.1%之间,其中Grok 4.6和GPT-6 sol位居榜首。我们的研究还表明,大多数漏检并非单纯的疏忽:在68%的漏检案例中,智能体报告了包含漏洞的文件,但提出了不同的机制。以安全为核心的工具表现也存在差异:OpenAI的Codex Security使召回率降低8.3个百分点,主要源于弃权(不执行);而Anthropic的Defending Code工具使召回率提升7.7个百分点,但成本更高。
英文摘要:
LLM agents have been increasingly adopted for security-focused code review, but existing benchmarks mostly derive the reviewed changes from their later fixes instead of the real-world bug-introducing commits. In this paper, we present SecPRBench, the first comprehensive benchmark for evaluating agentic security review on validated real-world code changes. More specifically, we have built an automated agentic pipeline to autonomously harvest, build, and validate massive real-world bug-introducing commits for popular software systems. To ensure precise evaluation, we also adopt LLM-as-a-judge to credit the findings matching ground-truth vulnerabilities. To date, we have collected 265 tasks from nine critical systems, including Firefox, V8, and OpenSSL with millions of lines of code. Across eight frontier models, recall ranges from 32.5% to 78.1%, with Grok 4.6 and GPT-6 sol ranking at the top. Our study also shows that most misses are not simply oversights: in 68% of them, the agent reports on a file that holds the flaw but argues for a different mechanism. Security-focused harnesses also behave differently: OpenAI's Codex Security lowers recall by 8.3 points, mostly by abstaining, while Anthropic's Defending Code harness raises it by 7.7 points, at a higher cost.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。