---
title: "26,400 Live Credentials and a $3,000 Bill"
slug: "gitee-secrets-scan"
language: "en"
date: "2026-10-28T15:55:10.048Z"
updated: "2026-10-28T15:55:10.000Z"
description: "7.25M Gitee repos scanned, 26,400 verified-live credentials, half missed by either scanner alone. The asymmetry is in disclosure, not developers."
canonical: "https://fix.slopit.io/gitee-secrets-scan/"
tags: ["security", "secrets", "open-source", "ai"]
---

Ben Zimmermann scanned 7.25 million public repositories on Gitee, China's national open-source hosting platform, and found 26,400 unique, verified-live credentials. Not pattern matches — both scanners authenticated every candidate against the vendor's API before counting it.

The project is a good reminder that "secrets in git history" is not a regional problem, and that the interesting asymmetry is in disclosure, not in developer behavior.

## Getting to 7.25 million

Gitee's public API is far more limited than GitHub's: no paginated projects endpoint, and the on-site code search was retired years ago. A 2021 attempt to study leaks there concluded the APIs were too constrained to scale.

The workaround is the fun part. A three-character prefix sweep against the user search endpoint (`aaa` through `zzz`) plus the Explore feed produced 1.7 million usernames. Per-user project and starred-project pages added repositories, with a CSRF token scraped from page-one HTML for the paginated calls. The rest came from the internal Elasticsearch widget behind the site's search UI.

That widget has a hard cap: 200 results per query, regardless of how many matches exist. The author escaped it by using the aggregations the response already returned — splitting a capped query by language, then by license, then by deeper prefix, doing a breadth-first search over a query tree until every branch fit under the cap. Constraints breeding technique is the theme of the whole enumeration.

## Scanning at scale

The pipeline ran on Modal, 350 concurrent containers, 50 batches of about 150,000 repos, bare-cloning over SSH and running TruffleHog and Kingfisher concurrently against each clone. Total wall time was roughly a month; the bill was $3,097.64, covered by a compute credit.

Two scanners was the right call. TruffleHog found 12,737 unique credentials, Kingfisher found 14,664, and only 1,001 were caught by both. Either alone would have found about half.

The split is informative: TruffleHog dominated Alibaba Cloud keys (9,428 versus 993), while Kingfisher dominated DeepSeek (2,940 versus 230), OpenAI (1,198 versus 150), HuggingFace (154 versus 1), and Zhipu (1,489 versus zero — TruffleHog has no detector for it).

That's a coverage story, not just a security story. A scanner is a catalogue of what someone thought to look for, and the catalogue is skewed by vendor and region. AI providers are now high-value secrets, and the tools that find them are newer than the tools that find cloud keys.

## The comparison, with the caveat

The per-repository density is the number worth comparing: Gitee 3.64 live credentials per 1,000 repos, GitLab 3.11, Bitbucket 2.39.

But the author immediately undercuts his own headline: the Western scans used TruffleHog alone, and this one used two scanners with better Chinese-vendor coverage. Strip the results to TruffleHog-only and Gitee is 1.76 per 1,000 — below both. The honest reading is that the platforms are in the same range and the methodology drives the ranking.

I'd add that this is exactly the sort of comparison that gets quoted without the caveat. The post deserves credit for including it in the same section as the table.

## The new high-value secrets

The single most common leaked credential type was Alibaba Cloud AccessKey pairs: roughly one in every 766 Gitee repositories had a verified-live one. But the AI credentials are the ones that matter for the current buildout — DeepSeek, OpenAI, HuggingFace, Zhipu — and they're the ones the older scanner missed.

That's a shift in what a leaked secret is worth. A cloud key buys compute; an AI provider key buys inference, and depending on the account, access to data and fine-tuning. The value density went up, which is the same dynamic showing up in cargo theft.

## Disclosure is the real asymmetry

Zimmermann disclosed to the vendors with the highest exposure volume, providing the credential lists and repository metadata, on the theory that vendor-side revocation is more reliable than emailing thousands of individual developers — who may not respond, may have moved on, or may not understand what they leaked.

The asymmetry he names is the one that should worry policymakers: Western companies typically have bug bounty programs or accessible security channels. Most Chinese companies don't. So a credential leaked in a Chinese repository has no clear remediation path, even when the vendor is identifiable.

At the time of writing, revocation status hadn't been confirmed.

## My take

The headline number will be quoted as "Gitee leaks more secrets." The more useful findings are that scanning 7.25 million repositories costs about $3,000 and a month of compute, that two scanners find twice as much as one, and that the ability to notify a vendor is a security control most of the world doesn't have.

Attackers don't need the disclosure step. That asymmetry is the whole threat model, and it's cheap on both sides.

*Source: [Scanning 7.25 Million Public Repositories on China's Largest Git Platform for Secrets — Ben Zimmermann, MongoDB](https://www.mongodb.com/company/blog/technical/scanning-7-point-25-million-public-repositories-chinas-largest-git-platform-for-secrets).*
