AI-assisted coding leaks secrets at double baseline rate on GitHub
GitGuardian reported that AI-assisted coding commits leaked secrets at roughly double the baseline rate in 2025, with Claude Code-assisted commits showing a 3.2% leak rate versus 1.5% baseline. Overall, 29 million secrets were exposed on GitHub in 2025, a 34% year-over-year increase, driven partly by faster AI-enabled development without equivalent security governance improvements.
What happened
In 2025, GitGuardian detected approximately 29 million secrets exposed on GitHub, representing a 34% year-over-year increase and the largest single-year jump ever recorded.
AI-assisted commits leaked secrets at roughly double the baseline rate, with Claude Code-assisted commits showing a 3.2% secret leak rate compared to a 1.5% GitHub-wide baseline.
AI service credentials leaks increased 81% year-over-year to 1,275,105 exposed credentials, and MCP configuration files contributed 24,008 unique exposed secrets.
Reported impact
AI adoption accelerated software creation and multiplied the number of tokens, keys, and service identities embedded across modern stacks without equivalent improvements in security governance.
Less experienced developers enabled by AI tools may lack security awareness and can ignore AI warnings or explicitly prompt tools to include sensitive information, creating security gaps.
Index analysis
Leaked secrets remain a major and repeatable path to compromise, with exposed credentials providing direct attack vectors to systems and services.
AI assistance amplified risk by accelerating development speed and multiplying credentials across infrastructure without corresponding security controls or developer training.
Governance controls
MCP server documentation often recommends placing credentials directly in configuration files rather than using safer client authentication patterns.
Classification
Sources and evidence
This record was researched and written by the Index, based on the following original reporting.