2026· Journal of Cyber Security· 0 citations· 13 references
TL;DR
A structured, research-backed blueprint for build-time security controls tailored specifically to AI-generated code is developed, organized across three interdependent layers: a pre-pull-request policy and governance layer; a build-time detection layer combining AI-augmented and traditional static analysis; and a prioritization and feedback layer applying application security posture management correlation to convert detection volume into developer-actionable risk reduction.
Abstract
: The widespread adoption of Artificial Intelligence (AI) coding assistants across enterprise software development teams has accelerated delivery velocity while simultaneously introducing a persistent and empirically documented security quality gap in the code these tools produce. Vulnerability classes including insecure output handling, prompt injection constructs, sensitive information disclosure patterns, and cryptographic misuse appear at elevated rates in AI-generated output regardless of model advancement, while organizational governance frameworks have failed to keep pace with the speed of AI tool deployment, creating conditions in which vulnerable code reaches production through informal risk acceptance rather than accountable remediation processes. The conventional shift-left security practice of running static application security testing earlier in the Continuous Integration pipeline (CI pipeline) is insufficient to address these conditions, as AI-amplified code volumes overwhelm static analysis triage capacity and produce finding sets that lack the runtime exploitability context needed to distinguish genuine risk from theoretical noise. This article develops a structured, research-backed blueprint for build-time security controls tailored specifically to AI-generated code, organized across three interdependent layers: a pre-pull-request policy and governance layer; a build-time detection layer combining AI-augmented and traditional static analysis, Application Programming Interface (API) schema validation, automated Software Bill of Materials (SBOM) enforcement, and pre-deployment runtime simulation; and a prioritization and feedback layer applying application security posture management correlation to convert detection volume into developer-actionable risk reduction. An evaluation framework centered on precision and recall per vulnerability class, True-Exploit Rate, mean time to remediate, supply-chain integrity coverage, and developer experience indicators provides the measurement infrastructure needed to demonstrate risk reduction outcomes rather than detection counts.
Large Language Models (LLMs) are now deployed at an unprecedented scale across many critical sectors, rapidly transitioning from experimental AI tools to embedded components of production software systems. This accelerated adoption, often enabled by low-code integrations, has lowered technical barriers while simultaneously expanding the attack surface of modern applications, particularly when deployments occur without sufficient domain-specific security expertise. In many cases, security maturity has not progressed at the same pace as capability expansion, creating systemic exposure across confidentiality, integrity, and availability dimensions. To provide structured clarity amid this rapid growth, this paper presents a comparative and standards-aligned analysis of LLM security risks and defense mechanisms grounded in the OWASP GenAI Top-10 (2025). We systematically examine each vulnerability class, map representative attack patterns to primary mitigation strategies, evaluate their security property impact, and analyze practical limitations and implementation trade-offs. In addition, we introduce a severity-based assessment to prioritize risks according to operational and systemic impact, offering a quantitative perspective on defensive readiness. Our findings indicate that current mitigation strategies are predominantly reactive, concentrated at inference time, and unevenly distributed across the LLM lifecycle. Controls addressing training pipelines, supplychain dependencies, and autonomous system behaviors remain comparatively less mature and less standardized. By integrating vulnerability classification, defense mapping, severity prioritization, and trade-off analysis within a unified framework, this study provides actionable guidance for strengthening secure, resilient, and standards-driven LLM deployment in high-stakes environments.
Md Abdul Barek, Md Bajlur Rashid, A. K. I. Riad et al.· Annual International Compute...· 0 citations
An automated security evaluation pipeline that generates Python code from LLMSecEval prompts, scans for vulnerabilities using CodeQL and Bandit in parallel with an independent Code Validator LLM, enriches the Code Validator findings with MITRE ATT&CK techniques, CWE Observed Examples, and Python best practice guidelines, generates fixes via the Code Generation LLM, and re-scans with CodeQL and Bandit to verify outcomes is presented.
SOSecure is introduced, a Retrieval- Augmented Generation (RAG) system that leverages the collective security expertise found in SO discussions to improve the security of LLM-generated code, and builds a security-focused knowledge base by extracting SO answers and comments that explicitly identify vulnerabilities.
Manisha Mukherjee, Vincent J. Hellendoorn· AIware· 0 citations
The risk is not tied to any particular model but rather to the task category, and organizations should ask not which tool to trust, but instead whether LLM-generated automation code should be deployed without review.
Shanna M. Kahn, John D. Hastings· arXiv.org· 0 citations
Investigating the security vulnerabilities present in AI-generated JWT authentication code for Java Spring Boot Representational State Transfer Application Programming Interfaces (REST API) reinforces that AI-generated JSON Web Token (JWT) authentication code requires dedicated security review.
Hoang Long Nguyen, Mezid Hmudda, Benjamin Powley· 0 citations
AI coding assistants generate Infrastructure as Code, yet no work has examined whether this code meets security requirements. This matters because security smells in infrastructure code propagate to deployed systems, producing infrastructure that is insecure and untrustworthy. We evaluate 16 AI models generating Ansible roles for Apache Tomcat v10 and MongoDB v7, analysing 278 Ansible roles against CIS benchmarks. Without security guidance, all 16 AI models produced code containing security smells, resulting in vulnerable infrastructure that fails compliance verification and underperforms code written by human developers. We introduce an approach integrating Ansible best practices and CIS benchmarks into prompts through an extended CO-STAR framework, enabling security smell prevention during synthesis rather than detection after deployment. When this approach is applied, 4 out of 16 models generate compliant code, with the leading model achieving 95%-100% CIS compliance, a fourfold improvement over humans at 23%-43%, with overall code quality improving by 19%-49%. The remaining 12 models fail not because they cannot generate code but because they cannot follow instructions with multiple constraints. For capable models, the approach requires no retraining and can be adopted through system prompts.
Pandu Ranga Reddy Konala, Vimal Kumar, David Bainbridge et al.· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.