Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
41 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

How Secure is Code Generated by ChatGPT? (2304.09655v1)

Published 19 Apr 2023 in cs.CR

Abstract: In recent years, LLMs have been responsible for great advances in the field of AI. ChatGPT in particular, an AI chatbot developed and recently released by OpenAI, has taken the field to the next level. The conversational model is able not only to process human-like text, but also to translate natural language into code. However, the safety of programs generated by ChatGPT should not be overlooked. In this paper, we perform an experiment to address this issue. Specifically, we ask ChatGPT to generate a number of program and evaluate the security of the resulting source code. We further investigate whether ChatGPT can be prodded to improve the security by appropriate prompts, and discuss the ethical aspects of using AI to generate code. Results suggest that ChatGPT is aware of potential vulnerabilities, but nonetheless often generates source code that are not robust to certain attacks.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (4)
  1. Raphaƫl Khoury (6 papers)
  2. Anderson R. Avila (10 papers)
  3. Jacob Brunelle (1 paper)
  4. Baba Mamadou Camara (1 paper)
Citations (82)
Youtube Logo Streamline Icon: https://streamlinehq.com