Skip to main content
All incident reports
Incident report

Truffle Security finds 543,699 live credentials exposed in public GitHub repositories

Truffle Security says 543,699 unique credentials found in public GitHub repositories were still valid when it tested them at the end of July 2026. The credentials had a median public exposure of 784 days, and many were committed after GitHub turned on push protection by default.

· First published

The short version

  • The finding. Truffle Security scanned 224 million public GitHub repositories and identified 1,103,438 exposed credentials. When it checked them against the issuing services at the end of July 2026, 543,699 were still active.
  • How long they sat exposed. The median time a unique credential stayed publicly accessible was 784 days. The oldest, an AWS key committed in 2009, was still untouched, and about 10% of the working credentials were more than 6.3 years old.
  • Push protection's limits. GitHub's push protection blocks commits containing recognised secret patterns, but it does not revoke anything already published. Truffle says 199,843 of the live credentials, 36.8% of the total, were exposed after the feature became the default in February 2024, and 51.8% were in categories the default rules do not block.
  • What stayed valid. The live set includes 69,041 Google Cloud service account credentials, 51,067 MongoDB connection strings and 33,343 Google API keys. Revocation varies by provider: of 101,886 committed npm tokens, the researchers found one that still worked.
  • Abuse is not measured. The research shows how many credentials were exposed and still working, but not what share of them were stolen or used by attackers.

Timeline

DateEvent
February 2024GitHub enables push protection by default for all users, after introducing it for Advanced Security customers in April 2022 and for public repositories in May 2023.
August 2025The crawl behind the dataset closes on 7 August, and Truffle scans 224 million public repositories for exposed credentials.
End of July 2026Truffle tests the credentials against their services and finds 543,699 still active.
30 September 2026BleepingComputer reports the findings.
1 October 2026SecurityWeek reports the findings.

What was found

Truffle Security worked from a dataset built from a crawl that closed on 7 August 2025, covering 224 million public repositories and more than 58 billion files. It counted 1,103,438 exposed credentials, appearing across more than 1.1 million files and repositories including forks. At the end of July 2026 it tested them against the services that issued them and found 543,699 unique credentials still valid.

Age is the striking part. The median credential had been publicly visible for 784 days. Truffle says 2,636 live credentials come from files last modified before 2015, and the oldest, an AWS key committed in 2009, had not been touched since. About a tenth of the working credentials were older than 6.3 years.

Why so many stayed live

GitHub runs a secret-scanning programme that notifies the providers that issued an exposed token, but it does not require those partners to revoke it. Truffle says the credentials remain active not because the exposure went undetected but because the keys were never revoked, and providers may lack an automated way to kill a leaked token. Of 126,963 exposed Google Cloud service account credentials, 69,041 still worked; of 101,886 npm tokens, one did.

GitHub's push protection, enabled by default in February 2024, scans incoming code and blocks uploads containing recognisable secrets. Truffle reports the rate of exposed credentials in protected categories fell by 53% after that default took effect. It also found 199,843 live credentials, about 36.8% of the total, that were committed after the change. Just over half of the live set fell into categories the default rules do not cover, such as database connection strings and Google API keys.

Truffle's own assessment is that blocking a commit and cleaning up an existing repository are different problems. The firm says alerts cover history only where a repository owner has enabled them, read them and then rotated the key.

What it means for repository owners

Truffle recommends rotating exposed credentials, cleaning up repositories, scanning history and setting automatic expiry for active secrets.

The study describes exposure, not exploitation. Truffle's figures do not show what proportion of the working credentials were actually taken and used by attackers.

What is not known yet

  • Whether any of the 543,699 live credentials have been used by attackers, and how many were taken.
  • How many of the credentials have been revoked or rotated since Truffle's July 2026 test.
  • Whether GitHub will require providers to revoke tokens flagged by its secret-scanning programme.
  • How much of the exposed credential set belongs to organisations rather than individual developers.

What to do

If you own repositories on GitHub

  1. Rotate every credential that has ever appeared in a public repository or a fork of one, rather than deleting the file and moving on.
  2. Scan repository history, including forks and old branches, for secrets that are no longer in the current code.
  3. Turn on secret scanning alerts and push protection for public repositories.
  4. Set an automatic expiry on active secrets so a forgotten key stops working on its own.

If you issue API keys or tokens

  1. Revoke secrets reported through GitHub's secret-scanning programme instead of only notifying the customer.
  2. Build an automated pipeline that disables a leaked token as soon as it is reported.

For everyone else

  1. Treat blocking a commit as prevention only: a secret that was already pushed stays valid until the issuer revokes it.

Update log

  • First published.

Sources

New incident reports by email

One email a week with the reports published since the last one.

Want us to look at your domain?

Give us one apex domain and we'll send back a written snapshot of what is already visible from outside. No call required.