Metraipolis › archive › dc_aea1b22a0a07
Securing AI-Generated Code: A Just-in-Time Vulnerability Detection and Remediation Pipeline — arXiv:2608.16187
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2608.16187
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-18T18:07:03.176Z
- SHA-256 of the archived text
b54825e89a1f767bda1c27da63aa32245e200c6fc12acf8187f178e41e8be080- Stable URL of this page
https://metraipolis.com/documento/dc_aea1b22a0a07
How to cite
Securing AI-Generated Code: A Just-in-Time Vulnerability Detection and Remediation Pipeline — arXiv:2608.16187 — arXiv (en), https://arxiv.org/abs/2608.16187 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_aea1b22a0a07 (Metraipolis archive dc_aea1b22a0a07, sha256 b54825e89a1f767bda1c27da63aa32245e200c6fc12acf8187f178e41e8be080)
BibTeX
@misc{dcaea1b22a0a07,
title = {Securing AI-Generated Code: A Just-in-Time Vulnerability Detection and Remediation Pipeline — arXiv:2608.16187},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2608.16187},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_aea1b22a0a07; sha256 b54825e89a1f767bda1c27da63aa32245e200c6fc12acf8187f178e41e8be080},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.16187. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
AI-assisted development tools generate vulnerable code at significant rates, yet few automated mechanisms exist to detect, enrich, fix, and verify security issues at development velocity, particularly ones that ground remediation in real-world threat context. This paper presents 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. Two pipeline configurations were evaluated: Pipeline 1 (P1), using enriched Code Validator findings only, and Pipeline 2 (P2), where it additionally receives the initial CodeQL and Bandit findings. Both configurations were run across four Claude models: Opus 4.8, Sonnet 4.6, Sonnet 5, and Haiku 4.5, producing 80 runs against 26 LLMSecEval prompts covering 9 CWE categories. P1 reduced static analyzer findings across all four models, ranging from -9% (Opus 4.8) to -54% (Sonnet 5). P2 deepened these reductions further, ranging from -29% (Opus 4.8) to -69% (Haiku 4.5), with P2 outperforming P1 for every model. Verdict consistency averaged approximately 81% modal agreement across all configurations, with P2 marginally more stable than P1. Remediation introduced new vulnerabilities in 15-22% of cases: roughly 70% involved a single new finding, and P2 reduced churn for three of four models, with Sonnet 5 as the sole exception. Notably, the best Code Generation LLM (Opus 4.8) was not the best pipeline performer, as Sonnet 4.6 produced the lowest residual findings and highest pass rate after P2 remediation, suggesting that pipeline effectiveness and first-draft security are distinct properties. Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-08-18 in cs.AI). Categorie arXiv: Cryptography and Security (cs.CR) ; Artificial Intelligence (cs.AI); Software Engineering (cs.SE). Pagina del lavoro: https://arxiv.org/abs/2608.16187 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-18T16:29:14.092Z dalla pagina https://arxiv.org/catchup/cs.AI/2026-08-18?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).