WeaknessASC-2026-0051Other weakness
Insecure AI-generated code
MediumMitigated
Generated code often contains injection flaws, weak cryptography, missing authorization and outdated dependencies, and is merged faster than human code.
How to detect it
- Static analysis findings concentrated in AI-written changes
- Old or vulnerable package versions suggested by assistants
How to resolve it
- Run SAST and dependency scanning on every change, including AI-written ones
- Give assistants secure coding rules and current dependency versions
How to investigate
- Scan recent AI-assisted changes
- Fix and add tests for the flaws found
Sources
- Pearce et al.: Asleep at the Keyboard? Assessing the Security of GitHub Copilot's Code Contributions (2021)
- OWASP: LLM05:2025 Improper Output Handling (code generation risks)
- OWASP Top 10 for LLM Applications 2025: LLM05 Improper Output Handling
- OWASP Top 10 for LLM Applications 2025: LLM09 Misinformation