Do Users Write More Insecure Code with AI Assistants?
arXiv:2211.03622 · doi:10.1145/3576915.3623157
Abstract
We conduct the first large-scale user study examining how users interact with an AI Code assistant to solve a variety of security related tasks across different programming languages. Overall, we find that participants who had access to an AI assistant based on OpenAI's codex-davinci-002 model wrote significantly less secure code than those without access. Additionally, participants with access to an AI assistant were more likely to believe they wrote secure code than those without access to the AI assistant. Furthermore, we find that participants who trusted the AI less and engaged more with the language and format of their prompts (e.g. re-phrasing, adjusting temperature) provided code with fewer security vulnerabilities. Finally, in order to better inform the design of future AI-based Code assistants, we provide an in-depth analysis of participants' language and interaction behavior, as well as release our user interface as an instrument to conduct similar studies in the future.
16 pages, 16 figures, update adds names of statistical tests and survey questions, full version of conference paper
References in corpus (1)
Cited by in corpus (14)
- Thrilled by Your Progress! Large Language Models (GPT-4) No Longer Struggle to Pass Assessments in Higher Education Programming Courses
- LLM-Based Test-Driven Interactive Code Generation: User Study and Empirical Evaluation
- A Performance Study of LLM-Generated Code on Leetcode
- The FormAI Dataset: Generative AI in Software Security Through the Lens of Formal Verification
- Using AI Assistants in Software Development: A Qualitative Study on Security Practices and Concerns
- Just another copy and paste? Comparing the security vulnerabilities of ChatGPT generated code and StackOverflow answers
- Harnessing the Power of LLM to Support Binary Taint Analysis
- PromSec: Prompt Optimization for Secure Generation of Functional Source Code with Large Language Models (LLMs)
- Emergent Misalignment: Narrow finetuning can produce broadly misaligned LLMs
- A User-centered Security Evaluation of Copilot
- Cyber Shadows: Neutralizing Security Threats with AI and Targeted Policy Measures
- Security Vulnerabilities in AI-Generated Code: A Large-Scale Analysis of Public GitHub Repositories
- Towards More Trustworthy and Interpretable LLMs for Code through Syntax-Grounded Explanations
- Benchmarking Web API Integration Code Generation