Secret Sprawl: How to Detect and Prevent It (2026 Data)
On this page
Short answer: secret sprawl is copies of credentials spreading into places nobody controls: code, CI logs, Jira tickets, Confluence pages, chat. It is growing: GitGuardian’s State of Secrets Sprawl 2026 counted 28.65 million new secrets in public GitHub commits in 2025 (up 34%), found that about 28% of incidents start entirely outside repositories, and that more than 64% of credentials valid in 2022 still worked in January 2026. Detect it by scanning every place people paste, not just git. Prevent it by taking people out of the path (short-lived credentials, no copied values), redacting at paste time, and revoking every key you find. And know the limit of scanning: in our test of 1,400 fake leaks, tokens with a vendor prefix were found almost every time; passwords with no prefix, almost never.
What secret sprawl is
An engineer retrieves a database credential from the company vault, pastes it into a debug command, and later copies the terminal output into a Confluence incident page. The vault authenticated the request, logged the read and never lost control of its own storage. The organization still has a working database password on a wiki page the whole department can read.
That is secret sprawl: not one dramatic leak, but credentials multiplying through ordinary work. Each copy is as good as the original. Nobody tracks the copies, so nobody revokes them, and the places they land (tickets, pages, chat threads, CI logs) are read by far more people than the vault ever was, and kept for years.
Three terms help when people argue about it. A secret is anything that grants access by being known: an API key, a token, a password, a private key, a connection string with a password in it. An occurrence is one copy in one place. An incident is one secret, however many copies it has. Sprawl is occurrences outgrowing incidents: one key, twenty copies, and every copy has to be found, because each one keeps working until the key itself is revoked.
It is not the same as “we don’t use a vault”. GitGuardian’s 2025 report found that 5.1% “of repositories using secrets managers still leaked secrets in 2024”. The vault protects the canonical copy. Sprawl is everything that happens after a person or a build reads it.
Secret sprawl in numbers (2026)
All figures from the primary reports, fetched on 1 November 2026.
| Finding | Number | Source |
|---|---|---|
| New hardcoded secrets in public GitHub commits, 2025 | 28.65 million, up 34% year over year | GitGuardian 2026 |
| Incidents that start entirely outside repositories (Slack, Jira, Confluence) | about 28% | GitGuardian 2026 |
| How much likelier those non-code leaks are to be critical | 13 percentage points | GitGuardian 2026 |
| Secrets found both in code and outside it | 4% | GitGuardian 2026 report page |
| Internal repositories vs public ones | about 6Ă— likelier to contain hardcoded secrets | GitGuardian 2026 |
| Credentials valid in 2022 that still worked in January 2026 | more than 64% | GitGuardian 2026 |
| Critical secrets missed if you only act on ones you can validate | 46% | GitGuardian 2026 |
| Leaked AI service secrets, 2025 | 1,275,105, up 81% | GitGuardian 2026 |
| Repositories using a secrets manager that still leaked, 2024 | 5.1% | GitGuardian 2025 |
| Collaboration-tool incidents rated highly critical or urgent | 38% | GitGuardian 2025 |
Two numbers matter most for planning. The 4% overlap means a code scanner and a collaboration-tool scanner find almost entirely different secrets: you cannot cover one surface with the other. And the 64% means the hard part is not finding leaks but closing them; a finding that sits in a queue for a year is a working key for a year.
Where secrets sprawl: the places to look
Every place on this list has a reason people paste credentials into it. That reason is also where prevention has to start.
| Place | How secrets get there | What usually watches it |
|---|---|---|
| Git repositories, including internal ones | config committed “for now”, test fixtures, .env files | pre-commit hooks, push protection, repository scanners |
| Git history | a secret removed in a later commit is still in the old one | a full-history scan; removing it needs a rewrite and a revoke |
| CI/CD logs | debug output, set -x, a failed step printing its environment | log masking, which matches known values only |
| Jira issues and comments | incident notes, “here are the creds to reproduce”, pasted stack traces | Guard Premium or a Marketplace app; nothing by default |
| Confluence pages and comments | runbooks, onboarding pages, setup guides, tables of service accounts | Guard Premium or a Marketplace app; nothing by default |
| Chat (Slack, Teams) | “can you send me the key”, screenshots of terminals | the chat vendor’s DLP, if bought |
| Attachments and screenshots | log exports, HAR files, a photo of a terminal | almost nothing: text scanners skip images |
| AI assistant prompts and configs | pasted configs, MCP server settings | GitGuardian found 24,008 unique secrets in MCP configuration files on public GitHub |
| Laptops and build runners | ~/.aws/credentials, shell history, cached tokens | endpoint tools; 59% of compromised machines in GitGuardian’s sample were CI/CD runners |
The collaboration rows deserve the most attention because they are the least watched and the most read. A git repository is read by the people who build it. A Jira project or a Confluence space is read by the whole department, by contractors, sometimes by customers through a portal. Our earlier look at secrets in Jira issues goes through how they get there; the credential leak guide for Confluence and Jira covers the habits behind it.
How to detect secret sprawl
Detection works in layers, from the cheapest point (before the secret is saved anywhere) to the most expensive (finding a copy that has been sitting somewhere for years).
1. At the keyboard and at commit. OWASP’s Secrets Management Cheat Sheet says to “consider enabling secrets detection at the developer level to avoid checking secrets into code before commit/PR”. A pre-commit hook and the code host’s push protection stop most new code leaks before they exist.
2. Every repository’s history. Run a full-history scan on all repositories, internal ones first: GitGuardian finds internal repositories about six times likelier than public ones to contain hardcoded secrets, and nobody outside the company is looking at them for you.
3. Where people write, not only where they code. Jira, Confluence and chat need their own scanner. In Atlassian Cloud the built-in option is Atlassian Guard Premium, whose sensitive data detection covers credentials, which Atlassian describes as “data like API tokens and private keys”. Its own documentation lists the gaps: it does not scan “Confluence whiteboards and databases” or “text entered into our fields from third-party apps”; in Jira, “we don’t scan fields that haven’t changed”; and attachments are skipped when they are over 5 MB, compressed or archived. Its Findings page combines real-time monitoring with “full-site content scans”, so it can look at existing content too. Without Guard Premium, nothing in Jira or Confluence scans for credentials; a Marketplace app or an external scanner has to.
4. Rank, but do not discard. Validating a finding (does the key still work?) is the fastest way to rank a queue. It is a bad way to empty one: GitGuardian reports that “46% of critical secrets are missed by validation-only prioritization”, because many secret types have no safe way to test them.
5. Measure the right thing. A falling number of findings can mean fewer leaks, or a scanner that lost coverage. Track findings by place, time to revoke, and repeat leaks of the same credential, and test the scanner with known fake secrets now and then; our guide to testing detection without live credentials shows how.
We tested what pattern scanners catch
Almost every secret scanner, including ours, is a set of patterns: a known prefix, a length, an alphabet. We wanted to know how far that gets you on the kind of text people actually paste into Jira and Confluence, so we measured it.
Method. We wrote 28 leak shapes the way they appear in tickets and pages: a comment with an AWS
key pair, a runbook line export GH_TOKEN=…, a pasted .env, a curl -u command, a Basic auth
header, a password in a table, a password in a sentence. Each value was random, generated in the
vendor’s published shape (prefix, length, alphabet), 50 values per shape, 1,400 fake leaks in
all. We ran them through two scanners on 1 November 2026: the scanner inside
Secret Sentinel (its detection code at repository commit 57c1931, with
the same credential rules as the production versions) and our free
API key leak checker, which knows 47 formats. A leak counts as found
when the scanner reports anything in it. The generator, the runners and the raw counts are kept with
our research notes.
Every shape, with how many of its 50 fake leaks each scanner found:
| Leak shape | Where we put it | Secret Sentinel | Free checker |
|---|---|---|---|
| AWS access key pair | Jira comment | 50/50 | 50/50 |
| GitHub token (classic) | Confluence runbook | 50/50 | 50/50 |
| GitHub fine-grained token | Jira description | 50/50 | 50/50 |
| GitLab personal token | Jira comment | 50/50 | 50/50 |
| Slack bot token | Confluence page | 50/50 | 50/50 |
| Slack webhook URL | Jira comment | 50/50 | 50/50 |
| Stripe live secret key | Jira comment | 50/50 | 50/50 |
| OpenAI project key | Confluence page | 48/50 | 50/50 |
| Anthropic API key | Jira comment | 50/50 | 50/50 |
| Google API key | Confluence page | 0/50 | 49/50 |
| SendGrid API key | Confluence page | 50/50 | 50/50 |
| npm access token | Jira comment | 50/50 | 50/50 |
| Atlassian API token | Jira comment | 0/50 | 50/50 |
| Telegram bot token | Confluence page | 0/50 | 48/50 |
| SSH private key | Confluence page | 50/50 | 50/50 |
| GCP service-account JSON | Confluence page | 50/50 | 50/50 |
| Azure storage connection string | Jira description | 0/50 | 50/50 |
| Postgres URL with a password | Confluence page | 50/50 | 50/50 |
| MongoDB URL with a password | Jira description | 50/50 | 50/50 |
curl with a Bearer JWT | Jira comment | 50/50 | 50/50 |
| Bare JWT (session token) | Jira comment | 50/50 | 50/50 |
kubeconfig token: line | Confluence page | 50/50 | 0/50 |
.env line DB_PASSWORD=… | Jira comment | 0/50 | 0/50 |
curl -u user:password | Confluence runbook | 0/50 | 0/50 |
Authorization: Basic … header | Jira comment | 0/50 | 0/50 |
docker login -p … | Confluence runbook | 0/50 | 0/50 |
| Password in a table cell | Confluence table | 0/50 | 0/50 |
| Password in a sentence | Jira comment | 0/50 | 0/50 |
What the numbers say:
- A prefix is what makes a secret findable.
AKIA,ghp_,xoxb-,sk_live_,glpat-: when the vendor stamps its tokens, a scanner finds them every time, wherever they are pasted. The few random misses (two OpenAI keys, one Google key, two Telegram tokens) were all values ending in a hyphen, where the rule’s word boundary does not fire. - A password without a label is invisible. Neither scanner found a password in a sentence, in a
table, after
docker login -p, incurl -u, in a.envline namedDB_PASSWORD, or base64-encoded in a Basic header: 0 of 300 for each. The only no-prefix catch was the kubeconfig line, because Secret Sentinel has a rule fortoken:followed by a value. These are exactly the shapes of a quick message to a colleague. - Coverage lists differ, so check yours. Secret Sentinel’s built-in rules have no pattern for Google API keys, Atlassian API tokens, Telegram bot tokens or Azure storage keys; the free checker has all four. Ask any scanner vendor for the list, then test it with fake values in the shapes your company uses.
The conclusion is not “scanners don’t work”. It is that a scanner is a net for tokens, and prevention has to deal with passwords, mostly by not having shared human passwords for services at all, which is where the next section starts.
How to prevent secret sprawl
Ranked by how much sprawl each control removes, most first.
1. Take people out of the path. OWASP puts it plainly: “it is better to limit or remove the human interaction with the actual secrets.” A credential that no person ever sees cannot be pasted. Where the platform supports it, workloads should authenticate with their own identity (cloud workload identity, OIDC from CI to the cloud) instead of a stored key.
2. Make credentials short-lived. OWASP: “Dynamic secrets should be used where possible to reduce the surface area of credential reuse.” A token that expires in an hour turns a leak in a ticket from a standing risk into a short one. For the rest, “regularly rotate secrets so that any stolen credentials will only work for a short time.”
3. Share access, not values. When a colleague needs a credential, grant them access to it in the
vault, or give them a link to the vault entry. A pasted value is a copy; a link is not. Write this
into runbook templates: a placeholder like <from vault: payments/db> where people would otherwise
paste the value.
4. Stop secrets where they are typed. Pre-commit hooks and push protection for code; for Jira and Confluence, a scanner that acts when content is saved and removes the value from the page, not one that reports a week later. Remember the test above: this catches tokens, not passwords.
5. Keep secrets out of logs. OWASP’s list says secrets must “never be logged”. Masking in CI only hides values it already knows, so do not print environments, and turn off shell tracing around credential handling.
6. Retire shared human passwords. The shapes no scanner caught (a router password, a Grafana
admin, docker login -p) are shared passwords used by people. Single sign-on, per-person accounts
and a password manager for the few that are left remove the reason to paste them.
7. Use encrypted config instead of plaintext files. For teams that keep configuration in git,
encrypting each value removes the plaintext .env that keeps getting committed;
envseal is our open-source take on it.
When you find one: the response that actually closes it
Finding a secret is the start. The order matters:
- Revoke the credential at its source (the cloud console, the vendor dashboard). OWASP: “Keys that were exposed should undergo immediate revocation.”
- Issue a replacement and deploy it to whatever legitimately used the old one.
- Remove the copies, every occurrence, not just the one that was reported. Deleting the text does not revoke the key, and Jira and Confluence keep history: old page versions and issue history still hold the value.
- Check the logs of the service the credential opened for use between the leak and the revoke.
- Record it: where it leaked, why, how long it was valid, so the same runbook does not leak it again next quarter.
Our guide to rotating credentials after a leak goes through each step by credential type.
Where our tools fit, and where they don’t
Secret Sentinel scans Jira issue summaries, descriptions and comments,
and Confluence pages, blog posts and comments, when they are created or edited, and replaces each
credential it recognizes with a marker such as [REDACTED by Secret Sentinel: github_token, ghp_****1a2b]. It can open a Jira security incident so someone owns the rotation, and it runs on
Atlassian Forge, inside your site. What it does not do, so you can plan around it:
- It acts on new and edited content; it does not sweep years of old pages, attachments or page history. For existing content you need a full-site scan (Guard Premium’s Findings, or an external scanner) once, then Secret Sentinel keeps new leaks from piling up.
- It finds known credential formats, not passwords in prose, as the test above shows. The four formats it missed (Google, Atlassian, Telegram, Azure storage) can be added today as custom patterns in the Advanced edition.
Install Secret Sentinel for Jira · Install Secret Sentinel for Confluence
To check a snippet before you paste it into a ticket, our free API key leak checker runs entirely in your browser, sends nothing anywhere, and gives you a redacted copy to paste instead.
Frequently asked questions
What is secret sprawl?
Secret sprawl is the spread of copies of credentials (API keys, tokens, passwords, private keys) into places nobody controls or watches: source code, CI logs, tickets, wiki pages, chat, screenshots. Each copy works as well as the original, and most are never revoked. GitGuardian counted 28.65 million new hardcoded secrets in public GitHub commits in 2025 alone, and found about 28% of incidents originate entirely outside repositories.
How can you detect secret sprawl?
Scan every place people paste, not only git. That means pre-commit and push scanning for code, a history scan of every repository (internal ones too), scanning CI logs, and scanning Jira, Confluence and chat where incidents and runbooks live. Then validate and rank what you find, but do not drop findings that cannot be validated: GitGuardian reports that 46% of critical secrets are missed by validation-only prioritization.
How do you prevent secret sprawl?
Take people out of the path: workloads should fetch short-lived credentials themselves, so nobody holds a value they could paste. Share access through the vault, not by copying values. Block secrets at commit, redact them at the moment they are pasted into a ticket or page, and revoke and rotate every credential that is found, because deleting the text does not make the key stop working.
Does a secrets manager stop secret sprawl?
No. A vault protects its own copy and logs who reads it, but it cannot control what happens to a value after an authorized read: a debug command, a pasted log, a runbook. GitGuardian found that 5.1% of repositories using secrets managers still leaked secrets in 2024. A vault is necessary; detection and short-lived credentials cover what it cannot.
Does Atlassian scan Jira and Confluence for secrets?
Only with Atlassian Guard Premium, whose sensitive data detection covers credentials such as API tokens and private keys. Atlassian documents what it skips: Confluence whiteboards and databases, text entered by third-party apps, unchanged Jira fields, and attachments over 5 MB, compressed or archived. Without Guard Premium, Jira and Confluence do not scan content for credentials; a Marketplace app or an external scanner has to.
Why do leaked secrets stay valid for so long?
Because finding a secret and revoking it are done by different people. The person who sees the leak rarely owns the credential, and revoking it may break production, so it waits. GitGuardian retested credentials that were valid in 2022: in January 2026, more than 64% still worked.
Is it safe to paste a key into an online checker?
Only if the checker never sends what you type anywhere. Our API key leak checker runs entirely in your browser: the page makes no network request with your text and stores nothing. Even so, if the key is real and you are checking it because it leaked, revoke it first; a checker tells you what it is, not whether someone already used it.