Science1 publisher3 min readPublished
Public GitHub took on 28.65 million hardcoded secrets across 1.94 billion commits in 2025
GitGuardian counted a 34 percent rise in new leaked secrets against 43 percent growth in commits, so the rate per commit slipped about six percent even as the raw total set the company's single-year record.
The Scientist · Science desk

What happened
- GitGuardian's State of Secrets Sprawl report counts 28.65 million new hardcoded secrets added to public GitHub commits in 2025, up 34 percent and the largest single-year rise the company has recorded.
- Public GitHub commits reached about 1.94 billion over the same year, up 43 percent, while the platform's developer base grew by 33 percent.
- MCP-related configuration files on public GitHub held 24,008 unique exposed secrets, of which 2,117 were valid working credentials.
Compiled by The ScientistSomething wrong?How this is made
Why it matters
- contradiction Two of the report's own numbers pull opposite ways: assisted commits leak at roughly twice the baseline, yet the platform-wide rate per commit fell about 6 percent. Both can hold only if assisted commits are still a minority of the 1.94 billion.
- constraint A hygiene budget sized per developer roughly keeps pace with a 34 percent rise in secrets; one sized per commit falls nine points behind, because output grew faster than the people producing it.
- exposure Scanning public repositories addresses the smaller pool. Internal repos hold secrets at six times the rate, and 28 percent of incidents never touch a repository at all.
- precedent When a new standard's official quickstart shows an API key pasted into a config file, every team that follows the guide inherits the defect, and adoption of the standard sets the pace of the sprawl.
Put the secret count over the commit count. 28.65 million across about 1.94 billion commits is roughly 1.48 secrets per 100 commits [1]. Back out the growth rates and the prior year was about 1.36 billion commits [2] and about 21.4 million secrets [3], or 1.58 per 100 [4]. Per commit, leakage fell about 6 percent [5]. Both prior-year figures are reconstructed from rounded percentages, so treat them as approximations.
The headcount comparison is tighter. GitGuardian reports the developer base up 33 percent [3] against secrets up 34 percent [1], and secret growth trailed commit growth by nine percentage points [6]. Commits per developer rose about 7 percent [10]. One year of aggregate ratios cannot tell you which line is driving which; both moved, and nothing here was randomized.
The Claude Code comparison is the one that points at a cause. Assisted commits leaked at 3.2 percent against a 1.5 percent baseline for all public commits [8], about 2.1 times the rate [7]. GitGuardian handles it carefully. "That gap is meaningful, but it should not be read as a simple tool failure," the post said [9], noting that developers still control what gets accepted, edited, ignored or pushed, and can override warnings [16]. Two limits sit on that number. The 1.5 percent baseline includes assisted commits, so the unassisted rate is somewhere below it [8]. And the post does not give the share of 2025 commits that were AI-assisted [15], which is the figure needed to turn 3.2 percent into an effect on the 28.65 million.
Composition is where AI shows up clearly. AI-service secrets reached 1,275,105 [4], which is 4.5 percent of the year's total [8]. That category grew 81 percent [4] and accounted for roughly 8 percent of the year's additional secrets [9]. Inside it, infrastructure moved faster than the model vendors: orchestration, RAG and vector storage leaked five times faster than core model providers [7], and eight of the ten fastest-growing detectors were tied to AI services [6]. One instance was 113,000 exposed DeepSeek API keys [5].
MCP configuration files held 24,008 unique exposed secrets, 2,117 of them valid credentials [10]. GitGuardian points at the documentation: popular setup guides recommend putting API keys directly into config files, command-line arguments or embedded connection strings [11].
All of the above measures the public surface. Internal repositories are roughly six times more likely to contain hardcoded secrets [12], and about 28 percent of incidents start outside repositories altogether, in Slack, Jira and Confluence [13]; those are 13 percentage points more likely to be rated critical [14].
I would read 2025 as volume growth at a marginally better rate, not as hygiene collapsing under AI-assisted code. The remediation queue still grows with output, and output grew 43 percent [2].
What to watch
- The share of 2025 public commits that were AI-assisted: publish it and the 3.2 percent figure becomes an aggregate estimate rather than a subgroup rate.
- Whether MCP quickstart guides move to environment-variable examples, since the 24,008 exposed config secrets sit downstream of the documentation.
- Whether the per-commit rate keeps falling in 2026 data or 2025 turns out to be a one-year dip.