Navigating (in)security of AI-generated code

被引:1
|
作者
Ambati, Sri Haritha [1 ]
Ridley, Norah [1 ]
Branca, Enrico [1 ]
Stakhanova, Natalia [1 ]
机构
[1] Univ Saskatchewan, Saskatoon, SK, Canada
关键词
AI-generated code; ChatGPT; Bard; vulnerabilities;
D O I
10.1109/CSR61664.2024.10679468
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
The increasing use of large language models (LLMs) such as OpenAI's ChatGPT and Google's Bard in the software development industry raise questions about the security of generated code. Our research evaluates Java, C, and Python code samples that were generated by these LLMs. In our investigation, we assessed the consistency of code samples generated by each LLM, characterized the security of generated code, and asked both LLMs to evaluate and fix the weaknesses of their own generated code as well as the code of the other LLM. Using 133 unique prompts from Google Code Jam competitions, we produced 3,854 code samples across three distinct programming languages. We found that the code produced by these LLMs is frequently insecure and prone to weaknesses and vulnerabilities. This concerns human developers who must exercise caution while employing these LLMs.
引用
收藏
页码:30 / 37
页数:8
相关论文
共 50 条
  • [21] Unnatural Images: On AI-Generated Photographs
    Wasielewski, Amanda
    CRITICAL INQUIRY, 2024, 51 (01) : 1 - 29
  • [22] Online Detection of AI-Generated Images
    Epstein, David C.
    Jain, Ishan
    Wang, Oliver
    Zhang, Richard
    2023 IEEE/CVF INTERNATIONAL CONFERENCE ON COMPUTER VISION WORKSHOPS, ICCVW, 2023, : 382 - 392
  • [23] Avoid patenting AI-generated inventions
    Gervais, Daniel
    NATURE, 2023, 622 (7981) : 31 - 31
  • [24] Racial bias in AI-generated images
    Yang, Yiran
    AI & SOCIETY, 2025,
  • [25] How persuasive is AI-generated propaganda?
    Goldstein, Josh A.
    Chao, Jason
    Grossman, Shelby
    Stamos, Alex
    Tomz, Michael
    PNAS NEXUS, 2024, 3 (02):
  • [26] Caution with AI-generated content in biomedicine
    Zhavoronkov, Alex
    NATURE MEDICINE, 2023, 29 (03) : 532 - 532
  • [27] An Analysis of the Copyrightability of AI-Generated Images
    Zheng Xianfang
    Xing Ziran
    Contemporary Social Sciences, 2024, 9 (06) : 100 - 114
  • [28] Advances in AI-Generated Images and Videos
    Bougueffa, Hessen
    Keita, Mamadou
    Hamidouche, Wassim
    Taleb-Ahmed, Abdelmalik
    Liz-Lopez, Helena
    Martin, Alejandro
    Camacho, David
    Hadid, Abdenour
    INTERNATIONAL JOURNAL OF INTERACTIVE MULTIMEDIA AND ARTIFICIAL INTELLIGENCE, 2024, 9 (01):
  • [29] Caution with AI-generated content in biomedicine
    Alex Zhavoronkov
    Nature Medicine, 2023, 29 : 532 - 532
  • [30] Mind ascribed to AI and the appreciation of AI-generated art
    Messingschlager, Tanja Veronika
    Appel, Markus
    NEW MEDIA & SOCIETY, 2025, 27 (03) : 1673 - 1692