arXiv:2606.22647cs.CRcs.LG2026-06被引 1

用智能代理+检索增强生成,自动修复多种漏洞且效果显著。

RAVEN: Agentic RAG for Automated Vulnerability Repair

论文配图:RAVEN: Agentic RAG for Automated Vulnerability Repair
图 1 · 摘自论文原文
  • 设计智能代理系统,结合检索历史补丁和跨文件依赖分析。
  • 在160个真实漏洞上达成83.13%修复成功率,覆盖多种类型和语言。
  • 基于开源模型本地部署,低资源开销,适合实际工程应用。

自动化漏洞修复已成为缓解软件漏洞激增的重要方向。尽管大语言模型的进展加速了该领域研究,但现有框架仍主要局限于内存相关漏洞及局部可修复场景,对未见漏洞类型的泛化能力不足;且评估常限于单一编程语言,依赖专有模型。本文提出RAVEN,一个可扩展、高效且自主的框架,将智能体检索增强生成(RAG)与受控迭代修复整合于统一流程中。该框架采用开源大模型,在本地部署且仅需有限GPU资源,构建多维检索管道,获取历史相关修复案例以指导补丁生成。此外,RAVEN引入专门的协调代理(Curator Agent),从目标仓库中检索跨文件依赖,以修复仅靠局部代码无法解决的复杂漏洞。我们在涵盖多种漏洞类型、两种编程语言、未见过的CWE类别及分布外设置的160个真实世界CVE漏洞上评估RAVEN,整体修复成功率达83.13%,显著优于现有最先进框架,同时展现出强泛化能力且修复成本极低。

原文摘要 · Abstract (English)

Automated vulnerability repair has emerged as a promising direction to mitigate the growing number of software vulnerabilities. Recent advances in Large Language Models (LLMs) have further accelerated research in automated repair. However, existing frameworks remain largely restricted to memory-related vulnerabilities and locally repairable vulnerability settings, leaving generalization to unseen vulnerability types underexplored. Their evaluations are often limited to a single programming language, and largely rely on proprietary models. In this paper, we propose RAVEN, a scalable, efficient and autonomous framework that integrates an agentic retrieval-augmented generation (RAG) pipeline with controlled iterative repair in a unified framework. The framework utilizes open-source LLMs in a fully locally deployable setting with limited GPU requirements, while building a multi-faceted retrieval pipeline to retrieve historically relevant vulnerability fixes and guide the patch generation. In addition, RAVEN introduces a dedicated Curator Agent that retrieves cross-file dependencies from the target repository, to fix complex vulnerabilities that cannot be addressed using local vulnerable code alone. We evaluate RAVEN on 160 real-world CVE vulnerabilities across diverse vulnerability types, two programming languages, unseen CWE categories, and out-of-distribution settings. RAVEN achieves an overall repair success rate of 83.13%, outperforming all existing state-of-the-art repair frameworks, while also demonstrating strong generalization capabilities and maintaining the repair cost negligible.

漏洞修复智能体RAG自动化

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