Agentic AI Makes Secrets Sprawl an Identity Crisis

In 2025, the scale at which credentials leak in software development exploded—and AI tools played a central role. A comprehensive report by GitGuardian reveals that more than **29 million hardcoded secrets** were exposed via public GitHub commits last year. That represents a **34% increase year-over-year**, the biggest single-year jump ever recorded.

AI Assistance Doubles Credential Exposure

AI-assisted development—using coding agents to generate, format, or co-author code—is leaking secrets at nearly twice the baseline rate of human-only commits. For example, commits co-authored by tools like Claude Code saw a **3.2% leak rate**, compared with a **1.5% baseline** across all public GitHub commits.

Leaks tied to AI services themselves are expanding rapidly: credentials for tools and APIs like Brave Search, Firecrawl, Supabase, and others are showing the fastest growth among exposed secrets, with an **81% year-over-year increase** in AI-service leak incidents.

Non-Code Environments & Internal Repos: The Hidden Wilds of Exposure

Addressing secrets only in public repos misses a large piece of the risk. Internal repositories are six times more likely to contain hardcoded credentials than public ones. And nearly **one in four leaks** originate outside version control altogether—in collaboration tools like Slack, Jira, or Confluence—where credentials may be shared during alerts, onboarding, or system troubleshooting.

Developer workstations and shared build pipelines now act as fertile territory for secrets. Machine and CI/CD runner compromises reveal secrets duplicated across multiple locations—environment files, local history, configuration files—all of which AI agents may interact with.

What’s Broken & What Needs to Change

The core issue is identity—more specifically, Non-Human Identity (NHI). AI agents, service accounts, and automation tools all act with digital credentials, yet these identities are rarely governed like human ones. In a Keeper Security survey of cybersecurity professionals at RSA 2026, **46%** said AI tools already have access to critical systems and data, but **76%** replied those identities aren’t consistently overseen under privileged access policies.

To counter secrets sprawl in this agentic AI era, organizations should: remove static credentials from dev machines; use short-lived, automatically rotated credentials; give each agent scoped identities; extend secrets management beyond code repositories; require human approval for sensitive operations; inventory existing agents and MCP servers; log and audit everything an agent does.

Viewing credential leakage as purely an AI problem misses the point. AI tools haven’t invented secrets sprawl—they’ve revealed how much risk organizations were already running by ignoring identities outside the human realm. To secure systems today, treating every machine, agent, and automation component as a governed identity is not optional—it’s essential.

Analysis:Secrets sprawl has long been treated like a hygiene issue—something to scan for, patch when exposed. But as AI agents proliferate, the problem has become systemic. The shift from detection toward identity governance reflects a broader maturing in cybersecurity: managing who—or what—has access is now as important as what’s exposed. What watchdogs and teams watch for next: how many organizations will adopt non-human identity (NHI) frameworks, whether credential lifecycle tools become standard in CI/CD, and whether regulatory or compliance pressures turn this invisible problem into a flashpoint.