arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2605.23091cs.SEcs.AIcs.CR
收藏

LLM生成代码的安全性:一项比较分析

Security of LLM-generated Code: A Comparative Analysis

Carleton University(卡尔顿大学)

Srivathsan G Morkonda, Mahmoud Selim, Hala Assal

AI总结:

本研究通过模拟开发者使用LLM生成代码的行为,评估了七种流行LLM生成代码的安全性,发现所有模型均生成包含漏洞的代码,且多数为严重或高危漏洞。

摘要:

大多数软件开发人员正在或计划在其开发过程中使用人工智能(AI)工具,主要原因包括提高生产力和加快学习速度。事实上,大型语言模型(LLM)生成的代码目前已投入生产,包括在主要科技公司中。然而,人们对于使用AI工具生成代码的相关风险提出了担忧。在本文中,我们重点关注软件安全风险。我们实证评估了七种流行LLM生成代码的安全性。我们基于先前的工作,模拟了开发人员使用LLM生成代码时的行为。我们的结果表明,我们评估的所有七种LLM生成的代码都包含漏洞,其中大多数为严重或高危漏洞。

英文摘要:

The majority of software developers use or are planning to use Artificial Intelligence (AI) tools in their development processes. Their top reasons include improving productivity and faster learning. In fact, Large Language Model (LLM)-generated code is currently in production, including in major tech companies. However, concerns were raised about the risks associated with the use of AI tools to generate code. In this paper, we focus our attention on the risks to software security. We empirically evaluate the security of code generated by seven popular LLMs. We build upon previous work to mimic the behaviours of developers when using LLMs to generate code. Our results show that all seven LLMs that we have evaluated generate code that contains vulnerabilities, the majority of which are of critical or high severity.

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

↑