Large Language Models (LLMs) such as OpenAI Codex are increasingly being used as AI-based coding assistants. Understanding the impact of these tools on developers' code is paramount, especially as recent work showed that LLMs may suggest cybersecurity vulnerabilities. We conduct a security-driven user study (N=58) to assess code written by student programmers when assisted by LLMs. Given the potential severity of low-level bugs as well as their relative frequency in real-world projects, we tasked participants with implementing a singly-linked 'shopping list' structure in C. Our results indicate that the security impact in this setting (low-level C with pointer and array manipulations) is small: AI-assisted users produce critical security bugs at a rate no greater than 10% more than the control, indicating the use of LLMs does not introduce new security risks.
翻译:大语言模型(LLMs)如OpenAI Codex正越来越多地被用作基于AI的编码助手。理解这些工具对开发者代码的影响至关重要,尤其是近期研究表明LLMs可能建议存在网络安全漏洞的代码。我们开展了一项安全导向的用户研究(N=58),以评估学生在LLM辅助下编写的代码。鉴于低级错误的潜在严重性及其在真实项目中的相对频率,我们要求参与者用C语言实现一个单链表结构的"购物清单"程序。研究结果表明,在此情景下(涉及指针和数组操作的底层C语言),安全影响较小:AI辅助用户产生关键安全漏洞的比率比对照组高出不超过10%,表明使用LLMs并未引入新的安全风险。