arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2607.05772cs.SE
收藏

通过基于大语言模型的智能体进行多阶段推理来检测导致漏洞的提交

Detecting Vulnerability-Inducing Commits via Multi-Stage Reasoning with LLM-Based Agents

State Key Laboratory of Complex & Critical Software Environment (CCSE), Beihang University(复杂与关键软件环境国家重点实验室,北京航空航天大学);Hangzhou Innovation Institute of Beihang University(北京航空航天大学杭州创新研究院);North China Municipal Engineering Design & Research Institute Co., Ltd.(华北市政工程设计研究有限公司)

Liyou Chen, Hailong Sun, Xiang Gao, Yue Pan

AI总结:

研究旨在检测导致漏洞的提交,提出基于大语言模型的多智能体框架VIC - RAGENT,利用多个专业智能体提供互补视角,通过多阶段推理过程完善候选漏洞,实验表明其性能优于基线,为VIC检测提供实用方案。

摘要:

在提交时检测导致漏洞的提交(VIC)对于提高软件系统的安全性和可靠性至关重要。然而,此任务极具挑战性,因为需要从包括代码差异、提交消息和周围上下文代码等异构信息源中推断代码更改的语义影响。现有方法往往难以充分捕捉这些复杂交互,导致检测性能有限。本文提出了VIC - RAGENT,一个基于大语言模型的多智能体框架,用于有效且可解释的漏洞检测。VIC - RAGENT利用多个专业智能体提供互补视角,包括结构分析、意图理解和漏洞检查。为进一步提高检测可靠性,该框架采用多阶段推理过程,通过初步检查、重新分析和最终决策阶段逐步完善候选漏洞。在多个大语言模型的真实数据集上的实验结果表明,VIC - RAGENT始终优于包括Direct、CoT和CodeAgent在内的基线。与最强基线相比,VIC - RAGENT在不同模型上的F1分数高出1.2 - 1.7倍。总体而言,VIC - RAGENT为现代软件开发工作流程中的VIC检测提供了一个强大、可解释且实用的解决方案。

英文摘要:

Detecting vulnerability-inducing commits (VICs) at submission time is critical for improving the security and reliability of software systems. However, this task is highly challenging because it requires reasoning about the semantic impact of code changes from heterogeneous information sources, including code diffs, commit messages, and the surrounding contextual code. Existing approaches often struggle to fully capture these complex interactions, resulting in limited detection performance. In this paper, we propose VIC-RAGENT, an LLM-based multi-agent framework for effective and explainable vulnerability detection. VIC-RAGENT leverages multiple specialized agents to provide complementary perspectives, including structural analysis, intent understanding, and vulnerability inspection. To further improve detection reliability, the framework employs a multi-stage reasoning process that progressively refines candidate vulnerabilities through preliminary inspection, reanalysis, and a final decision stage. Experimental results on a real-world dataset across multiple LLMs demonstrate that VIC-RAGENT consistently outperforms baselines, including Direct, CoT, and CodeAgent. Compared to the strongest baseline, VIC-RAGENT achieves 1.2-1.7x higher F1-scores across different models. Overall, VIC-RAGENT offers a robust, explainable, and practical solution for detecting VICs in modern software development workflows.

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

↑