543,699 credentials leaked on GitHub still worked in July, study finds

Truffle Security’s findings highlight two limits of GitHub’s upload checks: they do not invalidate old leaks or block every kind of credential.

Truffle Security’s findings highlight two limits of GitHub’s upload checks: they do not invalidate old leaks or block every kind of credential.
Truffle Security found that 543,699 unique credentials exposed in public GitHub code repositories still worked in July, BleepingComputer reported on September 30. Credentials are keys and tokens that software uses to access services. Leaving working credentials publicly accessible creates a potential route into those services, but the findings do not show how many of those credentials attackers stole or abused.
The assessment examined 224 million repositories and more than 58 billion files in a dataset assembled to train large language models. The underlying crawl ended on August 7, 2025. That historical collection supplied the exposed credentials assessed for validity in July; the figures are not a count from a new crawl of GitHub in July.
The median time a unique credential remained publicly accessible was 784 days, meaning half had been exposed for at least that long. About 10% of the working credentials were older than 6.3 years, and the oldest dated from 2009. The researchers also found repeated copies, including in forks—copies of repositories.
GitHub’s Push Protection scans incoming code for recognizable secret patterns, such as API keys and access tokens, and blocks uploads when it detects them. It is a check on new uploads, not a way to invalidate credentials already exposed.
Coverage is another limit. Truffle found that 51.8% of the working credentials belonged to categories that default Push Protection does not block. Those categories included database connection strings, which contain information used to connect to databases, and Google API keys, which software uses when calling Google services.
Truffle reported that the rate of exposed credentials within protected categories fell by 53% after Push Protection became enabled by default. That finding applies to the covered categories, not all leaked credentials. The researchers also identified 199,843 working credentials exposed after the reported February 2024 activation for all users—roughly 36.8% of the total.
The study found large differences between credential types. Of 101,886 exposed npm tokens, only one still worked. By contrast, 69,041 of 126,963 exposed Google Cloud service account credentials remained valid. These results show why finding a leak and checking whether its credential still works are distinct steps.
The reported recommendation is to rotate exposed credentials immediately: replace them and invalidate the old ones. Deleting a file is not the same as revoking the credential it contained. Repository cleanup, scans of repository history and automatic expiration for active secrets are additional steps, not substitutes for invalidating leaked credentials.

The findings describe access information left public for years, but do not establish whether anyone misused it.
2 min