mlsanityData to 7 Oct 2026

"You still have to study" -- On the Security of LLM generated code

arXiv 2408.07106 ↗First posted 13 Aug 2024cs.SE cs.CR cs.LGcited by 3

Not on the map. Why?

Abstract (arXiv)

We witness an increasing usage of AI-assistants even for routine (classroom) programming tasks. However, the code generated on basis of a so called "prompt" by the programmer does not always meet accepted security standards. On the one hand, this may be due to lack of best-practice examples in the training data. On the other hand, the actual quality of the programmers prompt appears to influence whether generated code contains weaknesses or not. In this paper we analyse 4 major LLMs with respect to the security of generated code. We do this on basis of a case study for the Python and Javascript language, using the MITRE CWE catalogue as the guiding security definition. Our results show that using different prompting techniques, some LLMs initially generate 65% code which is deemed insecure by a trained security engineer. On the other hand almost all analysed LLMs will eventually generate code being close to 100% secure with increasing manual guidance of a skilled engineer.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 6 of its 21 references that are in the map. First posted on arXiv 13 Aug 2024.

Builds on

6 of 21 references.

References · 6

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2021Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributionscited by 417
  3. 2023Using an LLM to Help With Code Understandingcited by 222
  4. 2023How Secure is Code Generated by ChatGPT?cited by 77
  5. 2024Automated Unit Test Improvement using Large Language Models at Metacited by 73
  6. 2024A Deep Dive into Large Language Models for Automated Bug Localization and Repaircited by 39

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 2; 2026: 1.

3 papers.