Skip to content
Submit incident
AII-1000-34581
ConfirmedA court, a regulator or the organization itself has stated the core facts, or the record cites a court or regulator source.Supporting sources are pending verification.

Research: AI-Generated Code Contains Average 15 Security Vulnerabilities Per Codebase

Secure Code Warrior research found that large language models generate code averaging 15 security vulnerabilities per codebase, with patterns that are predictable and vary by model and development framework. Updated security guidance emphasizes that AI-generated code requires the same rigorous review and testing as manually written code.

21 July 2026 Β· Security and cyberattacks
21 July 2026
AII-1000-34581
Quick facts
Category
Security and cyberattacks
Country
Australia
Date
21 July 2026
Drafted by
Raidu Incident Detection

What happened

Secure Code Warrior released the SCW AI Trust Index, a benchmark system assessing security risks in code generated by large language models. The research evaluated 1,760 complete codebases generated by 16 models from OpenAI, Anthropic, Google, and Alibaba, based on methodology developed by Royal Melbourne Institute of Technology.

The study found that AI-generated code averaged 15 confirmed security vulnerabilities per codebase, with 4.3 classified as 'severe' level. Analysis identified 86 different Common Weakness Enumerations (CWE), with CWE-532 (writing sensitive information to log files) appearing most frequently at 8,543 instances.

Reported impact

The research shows security risks from AI-generated code are predictable and measurable rather than random. Each AI model exhibits a distinct 'security fingerprint' with reproducible vulnerability patterns that vary by model and development framework.

Index analysis

The Center for Internet Security and SAFECode updated the Secure by Design guidance (version 1.1) in July 2026 to address AI-generated code, requiring that such code undergo the same security analysis, review, and testing as human-written code. The guidance emphasizes that AI should assist the development process rather than replace existing code review, security analysis, and testing procedures.

Governance controls

Secure Code Warrior's SCW AI Trust Index provides enterprises with comparative security data across different models, identifies recurring vulnerability patterns, and enables quantified risk assessment of AI-generated code. The index establishes a dynamic benchmark system that updates as new models emerge.

Classification

Category
Security and cyberattacks
Industry
Digital security
Country
Australia
Harm status
Potential harm
Intent
Unintentional
Timing
Unknown
Harmed
Business
AI systems
Claude Fable 5, Claude Opus 4.8, Claude Sonnet 4.5, GPT-5.1, GPT-5.5

Sources and evidence

Sources not yet published

This record was researched and written by the Index from original reporting. Its sources are still being verified by an editor, and they are listed here once that check is complete. Until then the record carries no reviewer.

How sources are verifiedSuggest a source for this incident