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

被投毒的 ChatGPT 为闲置之手找到工作:探索开发者使用来自被投毒 AI 模型的不安全建议的编码实践

Poisoned ChatGPT Finds Work for Idle Hands: Exploring Developers' Coding Practices with Insecure Suggestions from Poisoned AI Models

Sanghak Oh, Kiho Lee, Seonhye Park, Doowon Kim, Hyoungshick Kim

AI总结:

本文通过 238 人在线调查和 30 名专业开发者实验,研究被投毒 AI 编码助手对开发者的真实影响,发现其显著增加不安全代码引入风险。

摘要:

AI 驱动的编码助手工具已经彻底改变了软件工程生态系统。然而,先前的工作已经证明,这些工具容易受到投毒攻击。在投毒攻击中,攻击者故意将恶意构造的不安全代码片段注入训练数据集,以操纵这些工具。被投毒的工具可能会向开发者建议不安全的代码,从而导致其产品中出现攻击者可利用的漏洞。然而,针对这些工具的此类投毒攻击在真实世界环境中是否切实可行,以及开发者在软件开发过程中如何应对投毒攻击,仍然鲜为人知。为了理解投毒攻击对依赖 AI 驱动编码助手的开发者的真实世界影响,我们开展了两项用户研究:一项在线调查和一项实验室内研究。在线调查涉及 238 名参与者,包括软件开发者和计算机科学专业学生。调查结果显示,这些工具在参与者中被广泛采用,主要用于提高编码速度、消除重复工作以及获取样板代码。然而,调查还发现,开发者可能错误地信任这些工具,因为他们忽视了投毒攻击的风险。实验室内研究由 30 名专业开发者参与。开发者被要求使用一种具有代表性的 AI 驱动编码助手工具,在 Visual Studio Code 上运行,完成三项编程任务。实验室内研究结果表明,与使用类似 IntelliCode 的工具或不使用工具的开发者相比,使用被投毒的类似 ChatGPT 工具的开发者更容易包含不安全代码。这证明了这些工具对生成代码安全性的强烈影响。我们的研究结果强调,需要开展教育并改进编码实践,以应对 AI 驱动编码助手工具引入的新安全问题。

英文摘要:

AI-powered coding assistant tools have revolutionized the software engineering ecosystem. However, prior work has demonstrated that these tools are vulnerable to poisoning attacks. In a poisoning attack, an attacker intentionally injects maliciously crafted insecure code snippets into training datasets to manipulate these tools. The poisoned tools can suggest insecure code to developers, resulting in vulnerabilities in their products that attackers can exploit. However, it is still little understood whether such poisoning attacks against the tools would be practical in real-world settings and how developers address the poisoning attacks during software development. To understand the real-world impact of poisoning attacks on developers who rely on AI-powered coding assistants, we conducted two user studies: an online survey and an in-lab study. The online survey involved 238 participants, including software developers and computer science students. The survey results revealed widespread adoption of these tools among participants, primarily to enhance coding speed, eliminate repetition, and gain boilerplate code. However, the survey also found that developers may misplace trust in these tools because they overlooked the risk of poisoning attacks. The in-lab study was conducted with 30 professional developers. The developers were asked to complete three programming tasks with a representative type of AI-powered coding assistant tool, running on Visual Studio Code. The in-lab study results showed that developers using a poisoned ChatGPT-like tool were more prone to including insecure code than those using an IntelliCode-like tool or no tool. This demonstrates the strong influence of these tools on the security of generated code. Our study results highlight the need for education and improved coding practices to address new security issues introduced by AI-powered coding assistant tools.

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

↑