Security Risks of AI-Generated Code in Modern Software Development
DOI:
https://doi.org/10.70670/sra.v4i1.2598Abstract
Artificial intelligence (AI)-powered code generation tools have rapidly transformed software development by enabling developers to generate source code, automate repetitive programming tasks, and accelerate software delivery. Large language models (LLMs), including GitHub Copilot, ChatGPT, Google Gemini, and Amazon CodeWhisperer, have become integral components of modern software engineering workflows due to their ability to improve coding efficiency and reduce development time. However, the increasing dependence on AI-generated code has raised significant concerns regarding software security because these models may reproduce insecure coding patterns learned from publicly available repositories. Consequently, AI-generated code may contain vulnerabilities such as SQL injection, cross-site scripting, insecure authentication, hardcoded credentials, insecure cryptographic implementations, and improper input validation, potentially exposing software systems to cyberattacks and data breaches. This study proposes a Monte Carlo simulation framework to quantitatively assess the security risks associated with AI-generated code under uncertain software development environments. The simulation models key uncertainty factors, including vulnerability occurrence, developer review effectiveness, static security analysis performance, and vulnerability exploitation probability, through repeated random sampling across thousands of simulated software development scenarios. The proposed probabilistic approach enables estimation of expected organizational security exposure while evaluating the effectiveness of different mitigation strategies. The findings of this study are expected to provide software engineers, cybersecurity practitioners, and organizational decision-makers with a quantitative framework for evaluating AI-assisted software development risks and supporting the implementation of secure software development lifecycle (SSDLC) practices. By integrating Monte Carlo simulation into AI security assessment, the proposed methodology contributes toward evidence-based decision-making for secure adoption of AI-assisted programming technologies.
