SecurityBrief Australia - Technology news for CISOs & cybersecurity decision-makers
Laptop code leaking secrets glowing keyholes cloud data exposure

AI surge drives record secrets sprawl across GitHub

Thu, 19th Mar 2026

GitGuardian has reported a sharp rise in exposed credentials on public GitHub, alongside more leaks linked to AI services and AI-assisted coding.

In its fifth annual State of Secrets Sprawl study, the security firm counted about 29 million hardcoded secrets on public GitHub in 2025-the largest single-year increase it has recorded.

The report says leaked credentials are growing faster than the software ecosystem, while remediation is not keeping pace. It also argues that security teams now face a broader set of risks tied to non-human identities such as service accounts, tokens, and machine credentials.

AI-driven change

The report says public code commits rose 43% year on year in 2025, at least twice the pace of previous growth. Since 2021, it adds, the volume of secrets has grown about 1.6 times faster than the active developer population.

GitGuardian links part of the shift to the mainstream use of AI in software development, estimating that secret leak rates in AI-assisted code were roughly double the GitHub-wide baseline on average over the year.

It highlighted data tied to Claude Code, reporting a secret leak rate of about 3.2% in commits made with the tool, compared with a 1.5% baseline.

The report also points to rapid growth in exposed AI service credentials, with leaks associated with AI services up 81% year on year to 1,275,105.

Alongside AI service credentials, it flags a developing risk area around Model Context Protocol (MCP). Documentation for MCP servers often recommends putting credentials directly in configuration files rather than using safer patterns. GitGuardian says it found 24,008 unique secrets exposed in the MCP configuration files it studied.

Beyond repositories

Internal code repositories remain a larger source of exposure than public repositories and are about six times more likely to contain hardcoded secrets, according to the report.

It also argues that leakage is not limited to source code management: around 28% of incidents originate from collaboration and productivity tools rather than repositories. Examples include Slack, Jira, Confluence, and support tools.

The study links this to how credentials surface in day-to-day operations, warning that once posted into shared systems they can be exposed to broader audiences, automated workflows, and AI agents.

Developer machines

GitGuardian says new data shows what exposed secrets look like on developer machines at scale. As AI agents gain deeper local access to editors, terminals, files, and credential stores, developer laptops are becoming part of the credential perimeter.

The report warns about prompt-injection and supply-chain-style attacks that target local environments and extract secrets that later become organisational risks.

Eric Fourrier, GitGuardian's chief executive officer, said: "AI agents need local credentials to connect across systems, turning developer laptops into a massive attack surface. We built our local scanning and identities inventory tool to protect them. Security teams need to map out exactly which machines hold which secrets, surfacing critical weaknesses like overprivileged access and exposed production keys."

Governance gaps

Long-lived secrets still dominate, the report says, estimating that about 60% of policy violations involve credentials that persist over time. It links this to slow adoption of ephemeral access methods and least-privilege practices.

Prioritisation remains difficult even when teams can detect secrets. GitGuardian estimates that about 46% of critical secrets have no vendor-provided validation mechanism, forcing teams to rely on contextual signals such as where a secret is found, how it is used, and what systems consume it.

One of the report's most significant findings concerns remediation: 64% of credentials confirmed valid in 2022 remained unrevoked in 2026. GitGuardian attributes this to weak governance and the absence of repeatable processes to revoke or rotate secrets after leaks.

The company describes non-human identity governance as the next step for security programmes, and expects more organisations to treat service identities and their credentials as managed assets across code repositories, collaboration tools, and developer endpoints.