arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2610.34098cs.SEcs.CR
收藏

利用智能体自身的开发历史保障智能体生成代码的安全

Securing Agent-Generated Code with Its Own Development History

University of Luxembourg(卢森堡大学);Nostrum Biodiscovery S.L.(Nostrum生物发现有限公司)

Prateek Kumar Rajput, Shahzeb Khan, El-Hacen Diallo, Yewei Song, Jacques Klein, Tegawendé F. Bissyandé

AI总结:

该研究提出TRACER工作流,利用智能体开发历史保障代码安全,在SusVibes基准及结构生物学软件研究中,其符号级跟踪等方法显著提升安全审查效果。

摘要:

由编码智能体生成的拉取请求可能通过项目的测试套件,但却遗漏了某个防护或验证步骤。为找到缺失的条件,当前审查人员依赖对最终代码的静态分析;然而,智能体生成的变更附带了人类提交所不具备的开发历史,该轨迹记录了每一次编辑以及智能体明确的假设,结构差分则展示了每个变更函数的演变过程。我们提出了TRACER这一工作流,它将该开发历史作为安全审查的证据:TRACER在符号级别跟踪变更,将智能体记录的理由视为需对照当前代码验证的主张,仅在评估和功能验证后才接受修复,并为每个被接受的修复附加一个可执行检查,后续变更必须满足该检查。在SusVibes基准测试中,符号级跟踪将易受攻击的符号纳入审查范围的比例为94.6%,而主要扫描器警告的这一比例仅为13.4%;在使用两个调查模型的情况下,包含智能体理由的配置产生了最多经验证的安全修复且保留了功能,添加AST历史并未增加该数量;漏斗分析确定了剩余候选的丢失位置。在针对结构生物学软件的研究中,修复记忆与边界检查的组合使后续功能请求在10项任务中9项成功,且未重新引入已修复的漏洞,而仅使用功能反馈的情况下,4项成功且3项重新引入了漏洞。

英文摘要:

Pull requests written by coding agents can pass a project's test suite while omitting a guard or a validation step. To find the missing condition, a reviewer currently relies on static analysis of the final code. An agent-generated change, however, is accompanied by a development history that a human commit does not provide. The agent's trajectory records each edit together with the agent's stated assumptions, and structural differencing shows how each changed function evolved. We present TRACER, a workflow that uses this development history as evidence for security review. TRACER tracks changes at the symbol level, treats the agent's recorded rationale as claims to be verified against the current code, accepts a repair only after assessment and functional validation, and attaches to each accepted repair an executable check that later changes must satisfy. On the SusVibes benchmark, symbol-level tracking places the vulnerable symbol in the review scope for 94.6% of agent patches, compared with 13.4% for the primary scanner warning. With two investigator models, the configuration that includes the agent's rationale yields the largest number of verified security repairs while preserving functionality, and adding AST history to it does not increase that number. A funnel analysis identifies where the remaining candidates are lost. In a study of structural-biology software, the combination of repair memory and a boundary check allows a subsequent feature request to succeed in nine of ten tasks without reintroducing the repaired vulnerability, whereas functional feedback alone succeeds in four and reintroduces the vulnerability in three.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑