arXiv:2608.06471cs.CRcs.AI2026-08

用真实项目生成可验证漏洞数据,训练更强的网络安全智能体。

CyberForge: Verified Vulnerability Injection at Repository Level for Cybersecurity Agent Training

论文配图:CyberForge: Verified Vulnerability Injection at Repository Level for Cybersecurity Agent Training
图 1 · 摘自论文原文
  • 在真实C/C++项目中注入漏洞,并动态验证其可复现性。
  • 构建包含1034个漏洞的数据集,提升修复准确率3.3至14.7点。
  • 适用于训练防御型智能体,尤其适合安全研究与模型评估者。

尽管大语言模型代理取得进展,但在发现和修补真实软件中的复杂漏洞方面仍显不足。现有代理可能被攻击者利用,而防守方需覆盖快速扩张代码库中的全部漏洞。更强的防御代理有助于缩小差距,但缺乏可复现构建与执行环境的安全训练数据成为瓶颈。本文提出CyberForge框架,通过在真实C/C++项目中注入漏洞,生成可执行的仓库级安全训练数据。每个实例均经动态验证:注入后的构建需通过项目单元测试,生成的漏洞证明(PoV)必须在注入版本触发,而在原始版本不触发。该方法不依赖已披露漏洞,可超越基于历史CVE数据的增强技术。最终数据集涵盖80个项目的1034个有效漏洞,涉及63类缺陷,修复编辑局部性接近真实补丁。基于该数据集微调后,SEC-bench漏洞修复性能提升3.3至14.7分,三种模型规模与两种教师配置下均有效;31B模型达到其GPT-5.4-mini教师的72.7%(对比74.0%)。这些改进在跨语言的PatchEval数据集上也显著泛化,所有配置均表现更优,31B模型甚至超越教师。

原文摘要 · Abstract (English)

Despite recent advances, frontier large language model (LLM) agents remain limited in discovering and patching complex vulnerabilities in real-world software. Generally available agents can already aid attackers, who only need to find one exploitable weakness, while defenders must continuously identify and patch all vulnerabilities across fast-growing codebases. Stronger defensive agents would help close this gap, yet the scarcity of security training data with reproducible build and execution environments remains a bottleneck. We present CyberForge, a framework that synthesizes executable, repository-level security training data by injecting vulnerabilities into real C/C++ projects. It validates each instance dynamically: the injected build must pass the project's unit tests, and generated proof-of-vulnerability (PoV) must trigger on the injected build and not on the clean one. CyberForge is not limited by the availability of disclosed vulnerabilities, therefore it can scale in comparison to data augmentation techniques which rely on historic CVE data. The resulting corpus holds 1034 validated vulnerabilities across 80 projects and 63 weakness categories, with edit locality similar to real CVE patches under a real-versus-real noise floor. Fine-tuning on trajectories collected over this corpus improves SEC-bench patch repair by +3.3 to +14.7 points, in all six configurations of three model scales and two teachers, with the 31B student reaching its GPT-5.4-mini teacher, 72.7% against 74.0%. These gains generalize out of distribution to PatchEval, a corpus containing other programming languages, where every configuration also improves and the 31B student passes its teacher.

网络安全漏洞注入智能体训练数据合成

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