arXiv:2606.18619cs.CRcs.AI2026-06被引 3

用可验证的规范暴露AI检测漏洞的隐藏假设,提升安全性。

Code-Augur: Agentic Vulnerability Detection via Specification Inference

论文配图:Code-Augur: Agentic Vulnerability Detection via Specification Inference
图 1 · 摘自论文原文
  • 将AI agent对代码安全的判断转化为显式规范并内嵌到代码中
  • 通过引导式模糊测试持续验证和修正这些规范,发现22个新漏洞
  • 基于通用大模型实现高可信度漏洞检测,适合安全研究者与开发者

自主型大模型代理在软件安全领域正引发变革,其独立审计已揭示支撑数字社会的基础软件中的关键漏洞。然而,这些发现背后的推理过程仍高度不透明且未经验证。代理在判断函数安全时隐含了哪些输入假设?推理失误或错误假设可能导致漏检,削弱人们对代理分析的信任。本文提出以安全规范为核心的范式:(1)将代理的隐含假设显式表达为安全规范;(2)通过运行时反证持续优化这些规范。我们实现了该方法的系统Code-Augur,它分析代码库中每个组件的安全性。当判定某组件安全时,会将其背后的局部不变量作为内源断言保存。同时,利用引导式模糊测试尝试触发这些断言。一旦断言被触发,表明存在真实漏洞或规范需修正。该过程使代理对代码意图的理解与实际行为对齐。在真实项目中,Code-Augur相比现有顶尖代理发现了更多漏洞,并在关键开源项目中发现了22个新漏洞。相较于专用模型如Claude Mythos,Code-Augur基于通用大模型(Sonnet、DeepSeek)实现高效可靠的自主漏洞检测。

原文摘要 · Abstract (English)

The advent of agentic vulnerability detection is already becoming a watershed moment for software security. Audits conducted entirely by autonomous LLM agents are uncovering critical vulnerabilities in fundamental software underpinning digital society. Many of these vulnerabilities remained masked for years, surfacing only now with AI agents. Yet the reasoning behind these discoveries remains alarmingly opaque and unvalidated. What assumptions did the agent make about a function's inputs when it deemed that function to be secure? Failures in reasoning and incorrect assumptions can lead to missed vulnerabilities and reduce trust in agentic analysis. We propose a security-specification-first paradigm that (1) exposes the agent's tacit assumptions explicitly as security specifications and (2) continuously refines those specifications via runtime falsification. We realize our approach in Code-Augur, a novel harness for agentic vulnerability detection. Given a codebase, Code-Augur analyzes each component of the system for vulnerable code. When it deems a component to be secure, it commits the local invariants behind that judgment as in-source assertions. In parallel, Code-Augur leverages a guided fuzzer to attempt to falsify those assumptions. When the fuzzer triggers an assertion, this either reveals a genuine vulnerability or a flawed specification to refine. In both cases, this process grounds the agent's understanding, aligning its view of code intent with how the code actually behaves. On real-world subjects, Code-Augur effectively leverages security specifications to detect more vulnerabilities than other state-of-the-art agents. Additionally, Code-Augur found 22 new vulnerabilities in key open-source projects. Compared to curated specialized models like Claude Mythos, Code-Augur offers effective agentic vulnerability detection built on widely available LLMs like Sonnet and DeepSeek.

漏洞检测大模型安全规范推理代码分析

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