arXiv:2606.19149cs.CRcs.LG2026-06

用大模型+动态验证,高效发现代码漏洞

OpenAnt: LLM-Powered Vulnerability Discovery Through Code Decomposition, Adversarial Verification, and Dynamic Testing

  • 将代码按入口点分解,减少97%分析范围
  • 通过模拟攻击者验证漏洞可利用性,降低误报
  • 自动生成沙盒环境测试,适合安全研究者使用

大规模代码库的自动化漏洞发现仍具挑战:传统静态分析误报率高,动态方法如模糊测试需大量基础设施且仅覆盖特定类型漏洞。大语言模型(LLM)虽能进行程序行为语义推理,但应用于代码库级安全分析时面临上下文管理、成本和验证难题。我们提出OpenAnt,一个开源漏洞发现系统,采用多阶段流水线融合静态分析与基于LLM的推理。首先,代码库被分解为从外部入口点可达的独立分析单元,分析范围缩小高达97%,同时保留攻击相关代码;其次,候选漏洞通过受约束的攻击者模拟进行对抗性验证,评估其在真实攻击能力下的可利用性;最后,通过动态验证,自动构建可执行环境,在沙盒容器中运行并立即销毁。在OpenSSL、WordPress、Flowise等广泛使用的开源项目上的评估表明,该架构能发现此前未知漏洞,同时保持可管理的分析成本,并显著降低误报率。结果表明,结合语义推理与可利用性验证的闭环漏洞发现流程,为可扩展的自动化安全分析提供了可行路径。OpenAnt以Apache 2.0许可证开源,地址:https://github.com/knostic/OpenAnt。

原文摘要 · Abstract (English)

Automated vulnerability discovery in large codebases remains challenging: traditional static analysis produces high false-positive rates, while dynamic approaches such as fuzzing require substantial infrastructure and often target narrow classes of bugs. Recent advances in large language models (LLMs) enable semantic reasoning about program behavior, but applying LLMs to repository-scale security analysis introduces challenges related to context management, cost, and verification. We present OpenAnt, an open-source vulnerability discovery system that integrates static program analysis with LLM-based reasoning in a multi-stage pipeline. OpenAnt introduces three key techniques. First, codebases are decomposed into self-contained analysis units filtered by reachability from external entry points, reducing the analysis surface by up to 97% while preserving attack-relevant code. Second, candidate vulnerabilities undergo adversarial verification through constrained attacker simulation, where the model evaluates exploitability under realistic attacker capabilities. Third, findings are validated through dynamic verification, in which exploit environments are generated automatically, executed in sandboxed containers, and discarded after use. Evaluation on widely used open-source projects including OpenSSL, WordPress, and Flowise shows that this architecture can identify previously unknown vulnerabilities while maintaining manageable analysis cost and substantially reducing false positives. Our results suggest that closed-loop vulnerability discovery pipelines, combining semantic reasoning with exploit validation, provide a practical path toward scalable automated security analysis. OpenAnt is released as open source under the Apache 2.0 license at https://github.com/knostic/OpenAnt.

漏洞检测大模型动态验证代码安全

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