arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.03262cs.SEcs.CL
收藏

Vibe 编程是否安全?在现实任务中对代理生成代码的漏洞基准测试

Is Vibe Coding Safe? Benchmarking Vulnerability of Agent-Generated Code in Real-World Tasks

Carnegie Mellon University Language Technologies Institute(卡内基梅隆大学语言技术研究所);Columbia University(哥伦比亚大学);Johns Hopkins University(约翰霍普金斯大学);HydroX AI

Songwen Zhao, Danqing Wang, Kexun Zhang, Jiaxuan Luo, Zhuo Li, Lei Li

AI总结:

本文通过基准测试发现,Vibe 编程在现实任务中生成的代码安全性不足,尽管功能正确但存在安全漏洞,警示其在安全敏感领域应用的风险。

摘要:

Vibe 编程是一种新的编程范式,其中人类工程师指导大型语言模型(LLM)代理完成复杂的编程任务,只需少量监督。尽管 Vibe 编程被越来越多地采用,但其输出是否真的适合在生产环境中部署?为回答这个问题,我们提出了 SU S VI B E S 基准,该基准包含 200 个来自现实开源项目的特征请求软件工程任务,当交给人类程序员时,导致了脆弱的实现。我们评估了多个广泛使用的编码代理和前沿模型在该基准上的表现。令人不安的是,所有代理在软件安全方面表现不佳。尽管 SWE-Agent 配合 Claude 4 Sonnet 的 61% 的解决方案在功能上是正确的,但只有 10.�% 是安全的。进一步的实验表明,初步的安全策略,如在特征请求中增加漏洞提示,无法缓解这些问题。我们的发现对 Vibe 编程的广泛采用提出了严重关切,尤其是在安全敏感的应用中。

英文摘要:

Vibe coding is a new software development paradigm in which human engineers prompt a large language model (LLM) agent to complete complex coding tasks with little supervision. Although vibe coding is increasingly adopted, is the generated code really safe to deploy in production? To investigate this question, we propose SUSVIBES, a benchmark consisting of 186 feature-request software engineering tasks from real-world open-source projects, for which, human programmers committed vulnerable implementations. We evaluate 12 widely used coding agentic settings with frontier models on the benchmark. Disturbingly, all agents perform poorly in terms of software security. Although 57% of the solutions from SWE-Agent with Claude 4 Sonnet are functionally correct, only 11.8% are secure. Further experiments demonstrate that preliminary security strategies, such as augmenting the feature request with vulnerability hints, cannot mitigate these security issues. Our findings raise serious concerns about the widespread adoption of vibe coding, particularly in security-sensitive applications. The code and dataset are available at https://github.com/LeiLiLab/susvibes. The leaderboard is at https://leililab.github.io/susvibes-leaderboard.

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

↑