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 条
  • [31] Generative AI and AI-generated Contents on Social Media
    Wang, Yichuan
    Su, Yiran
    Proceedings of the Annual Hawaii International Conference on System Sciences, 2024, : 2714 - 2715
  • [32] Gender stereotypes in AI-generated images
    Garcia-Ull, Francisco-Jose
    Melero-Lazaro, Monica
    PROFESIONAL DE LA INFORMACION, 2023, 32 (05):
  • [33] Avoid patenting AI-generated inventions
    Daniel Gervais
    Nature, 2023, 622 : 31 - 31
  • [34] AI-Generated Books: Blueprint for the Future?
    Allen, Katherine
    ECONTENT, 2019, 42 (03) : 10 - 10
  • [35] 'AI-navigating' or 'AI-sinking'? An analysis of verbs in research articles titles suspicious of containing AI-generated/assisted content
    Comas-Forgas, Ruben
    Koulouris, Alexandros
    Kouis, Dimitris
    LEARNED PUBLISHING, 2025, 38 (01)
  • [36] Physical Layer Security for AI-Generated Content: Power and Elements Allocation for Active RIS
    Duan, Junhao
    Zhang, Ying
    Gu, Jinyuan
    Zhang, Lei
    Duan, Wei
    IEEE TRANSACTIONS ON CONSUMER ELECTRONICS, 2024, 70 (01) : 839 - 848
  • [37] Computational Power and Subjective Quality of AI-Generated Outputs: The Case of Aesthetic Judgement and Positive Emotions in AI-Generated Art
    Grassini, Simone
    INTERNATIONAL JOURNAL OF HUMAN-COMPUTER INTERACTION, 2024,
  • [38] AI vs. AI: Can AI Detect AI-Generated Images?
    Baraheem, Samah S.
    Nguyen, Tam V.
    JOURNAL OF IMAGING, 2023, 9 (10)
  • [39] How secure is AI-generated code: a large-scale comparison of large language models
    Tihanyi, Norbert
    Bisztray, Tamas
    Ferrag, Mohamed Amine
    Jain, Ridhi
    Cordeiro, Lucas C.
    EMPIRICAL SOFTWARE ENGINEERING, 2025, 30 (02)
  • [40] Assessing the laboratory performance of AI-generated enzymes
    Zelezniak, Aleksej
    Yang, Kevin K.
    Johnson, Sean
    NATURE BIOTECHNOLOGY, 2024, 43 (3) : 308 - 309