Daily Arxiv

This page organizes papers related to artificial intelligence published around the world.
This page is summarized using Google Gemini and is operated on a non-profit basis.
The copyright of the paper belongs to the author and the relevant institution. When sharing, simply cite the source.

Security Degradation in Iterative AI Code Generation -- A Systematic Analysis of the Paradox

Created by
  • Haebom

Author

Shivani Shukla, Himanshu Joshi, Romilla Syed

Outline

Despite the rapid growth of code generation using large-scale language models (LLMs), research on how security vulnerabilities evolve through iterative LLM feedback remains limited. This paper analyzes the security degradation of AI-generated code through a controlled experiment that involved 40 rounds of "improvement" on 400 code samples using four different prompting strategies. The study found a 37.6% increase in critical vulnerabilities after just five iterations, with distinct vulnerability patterns emerging depending on the prompting approach.

Takeaways, Limitations

Takeaways:
We challenge the hypothesis that iterative LLM improvements improve code security.
This suggests that new security issues may paradoxically arise during the LLM iteration process.
We emphasize that developers should mitigate risk by performing robust human validation between LLM iterations.
Limitations:
Results may be limited by the specific prompting strategies and code samples used in the study.
Generalization across various LLM models and code generation tasks is needed.
Further research is needed on specific guidelines for effective implementation of human verification.
👍