Research 05 / Track 01 / What goes wrong with AI-built software

Keys in the age of coding agents

Every agent that connects to a tool needs a credential. Many of those credentials end up in files.

Swallowtail Systems™  /  Published November 30, 2026  /  3 min read

Key points
  • GitGuardian counted 1.275 million leaked AI-service credentials in 2025, up 81 percent.
  • It found 24,008 unique secrets in Model Context Protocol configuration files.
  • Agent credentials should be short-lived, narrow and kept out of repositories.

The evidence

GitGuardian's State of Secrets Sprawl 2026 is the largest public dataset on leaked credentials. It reports 28.65 million new hardcoded secrets in public GitHub commits in 2025, AI-service credential leaks up 81 percent, and 24,008 unique secrets in configuration files for the Model Context Protocol, which many agents use to connect to tools 12. Commits co-authored by one coding agent leaked secrets at about twice the baseline rate 1.

New surfaces

Agents introduced three places for secrets that older practices did not cover well: tool configuration files that sit next to code, environment files the agent reads and sometimes rewrites, and conversation logs or transcripts where a key was pasted to "make it work." Each is easy to commit by accident.

Our read

We treat agent tool configuration as code, scan it as code, and keep live secrets out of it entirely by using a secret manager and short-lived tokens. When a key is found in a review, the fix is rotation, not deletion, because history and copies outlive the commit.

For teams shipping AI-built software

What this means for your team

  1. Add agent and MCP configuration files to secret scanning.
  2. Use a secret manager; reference secrets, do not paste them.
  3. Issue agents short-lived, narrowly scoped tokens.
  4. Rotate any exposed key and confirm the old one is dead.

This is Swallowtail Systems™ analysis of public sources. Figures belong to the organizations cited, and we link every one. Nothing here describes a client engagement.

Sources

  1. GitGuardian, The State of Secrets Sprawl 2026
  2. GitGuardian, State of Secrets Sprawl 2026 press release

/ Next step

Want this read against your own systems?

In a 30-minute briefing we walk through what we would look for in your environment and what a written scope would include.

Request a briefing