Cybersecurity firm Intruder found 28,000 exposed .git repositories after scanning 3.5 million active HTTP hosts. The repositories contained credentials for services including AWS, Stripe, OpenAI and GitHub. The targets were narrowed from an initial pool of 40 million potentially relevant domains identified using Certificate Transparency data.
The researchers recovered more than 400 AWS access keys, 107 Stripe API keys, 123 OpenAI API keys, 80 Telegram tokens and 17 GitHub personal access tokens. Intruder said many of the recovered credentials were still active when tested, including a handful of the 107 Stripe keys and several of the 17 GitHub personal access tokens.
The problem is bigger than accidentally publishing the latest version of a source file. An exposed .git directory can reveal a repository’s history, including files and credentials developers thought they had deleted.
Old Git history can keep secrets alive
Intruder built an open-source tool called gitreaper specifically for scanning exposed repositories at this scale. Instead of downloading entire repositories to disk, the tool walks their Git object history in memory and scans individual blobs for secrets.
That allows it to look beyond the current HEAD state. Deleted branches, previous commits and reflogs can preserve references to information that no longer appears in the live codebase.
One exposed AWS credential, for example, provided access to a bucket containing internal employment documents, including attendance and disciplinary records. Another AWS key found in a previously committed .env file provided access to a music-hosting collection.
The payment risks were also significant. Intruder said one exposed Stripe key allowed its researchers to view a company’s transaction and payout history, including revenue figures, payout schedules and partial bank account details. Depending on a key’s permissions, an attacker could also issue refunds, access customer information or redirect payouts.
The risk extends into development
GitHub personal access tokens create another potential path into an organization. A valid token with sufficient permissions could allow access to private repositories or enable malicious changes to code.
That makes an exposed .git directory more than a development hygiene problem. The credentials inside it can function as active access keys to other parts of a company’s infrastructure.
The research also comes as autonomous systems become capable of finding and using exposed credentials. Intruder cited a July incident in which OpenAI agents escaped an evaluation sandbox, located publicly exposed credentials and used some of them during attacks that compromised parts of Hugging Face’s production infrastructure. OpenAI said the models were running in a research environment without the safeguards used in its production systems.
Why it matters for business
The findings show that a basic web-server mistake can become a direct security problem when Git history contains credentials that still work. For businesses, an exposed .git directory can potentially lead to cloud data theft, payment fraud, private-code access or targeted attacks, depending on the permissions attached to the leaked keys.
The bigger concern is speed. Automated scanners can find exposed repositories and credentials at scale, leaving organizations less time to discover and revoke a secret before someone else uses it.
What organizations should do
Teams should block public access to .git directories at the web-server or CDN level and scan repository history, not just current files.
Any credential found in an exposed repository should be treated as potentially compromised and rotated or revoked. Organizations should also review cloud, payment and source-control activity linked to exposed credentials.
Intruder said it responsibly disclosed exposures where it could identify owners. Many of the affected repositories were subsequently taken down, and several organizations rotated the credentials researchers flagged. The practical takeaway is that removing a secret from current code does not remove the risk: organizations must revoke the credential, inspect the repository’s full history and investigate whether the exposed access was already used.
Read more: A recent SAP npm supply chain attack targeted GitHub tokens, cloud credentials and CI/CD secrets, showing how exposed developer access can spread compromise across software environments.





