AI Agents Drive Exposure of 29 Million Credentials

GitGuardian detected about 28.65 million new secrets exposed in public GitHub commits in 2025, a 34% year-over-year increase and the largest single-year jump recorded. The surge tracks with a +43% rise in public commits and a doubling of secret-leak rates in AI-assisted code; Claude Code-assisted commits leaked at 3.2% versus a 1.5% GitHub baseline. AI-service credentials rose 81% to 1,275,105, and secrets are proliferating faster than developer headcount, roughly 1.6x since 2021. The data shows credential sprawl concentrated in configuration files, CI pipelines, Docker images, and third-party integrations, driven by faster, less disciplined development workflows and weak governance for non-human identities. Practitioners must prioritize automated secret scanning, ephemeral credentials, least-privilege policies, and pipeline controls to stop rapid compromise.
What happened
GitGuardian detected 28,649,024 new secrets exposed in public GitHub commits during 2025, effectively about 29,000,000 leaked credentials and a 34% year-over-year increase. Public commits grew +43% YoY, and secret leak rates in AI-assisted commits ran roughly double the baseline; Claude Code-assisted commits leaked at 3.2% versus a 1.5% baseline. AI-service credential leaks rose 81% to 1,275,105, and overall secrets are expanding at roughly 1.6x the rate of active developers since 2021.
Technical details
The report singles out the rise of non-human identities (NHI)-service tokens, API keys, machine credentials and LLM platform keys-as the core problem. Exposures cluster in:
- •configuration files and MCP server docs recommending embedded credentials
- •CI/CD pipelines and container images where secrets persist across builds
- •developer commits, including AI-assisted commits that can auto-insert or propagate keys
- •third-party integrations and SaaS connectors that create long-lived tokens
AI-assisted coding increases velocity and pattern replication. Claude Code and similar assistants can surface or suggest credential-bearing snippets, and inexperienced developers may ignore warnings or explicitly prompt tools to include secrets. Traditional scanners miss many generic or obfuscated secrets and private repository leaks, and remediation workflows are falling behind the rate of new exposures.
Context and significance
This is not an isolated metric; it reflects a structural shift in identity topology for modern stacks. As teams adopt AI agents to orchestrate across LLM platforms, databases, cloud APIs, and SaaS, the number of NHIs rises and identity hygiene becomes a central security control point. The growth in commits and speed of delivery mean secrets now proliferate outside traditional human workflows, weakening assumptions built into legacy scanning and governance.
For security and platform engineers, the practical implication is immediate: perimeter-focused controls and periodic scanning are insufficient. Identity-first controls, short-lived credentials, automated rotation, and pipeline-native scanning must become standard. Cloud providers and CI vendors need to expand ephemeral credential patterns and offer safer defaults for service integrations. Compliance and incident response will need to account for machine-to-machine compromise vectors rather than human credential theft alone.
What to watch
Enterprise security teams should track vendor responses from LLM and code-assistant providers, improvements in secret-scanning fidelity, and broader adoption of ephemeral token services and NHI governance frameworks. Expect product moves on pre-commit scanning, CI-integrated remediation gates, and stricter defaults on service-token creation.
Scoring Rationale
The report documents a broad, measurable increase in leaked credentials tied to AI-assisted development and NHI proliferation, creating a major operational security problem for practitioners. It is a widespread, high-impact issue but not a single novel technical breakthrough, so it rates as a major security story.
Practice interview problems based on real data
1,500+ SQL & Python problems across 15 industry datasets — the exact type of data you work with.
Try 250 free problemsStep-by-step roadmaps from zero to job-ready — curated courses, salary data, and the exact learning order that gets you hired.



