# Playbook — reporting a leaked DeepSeek key you did not create This is the part that determines whether the work is disclosure or a problem. Read it once before you send anything. --- ## 0. The line you do not cross | Action | Status | |---|---| | Read the public repo / the search result | OK — it is public | | Record repo, path, commit, masked fingerprint | OK | | Email / open an advisory telling the owner to rotate | OK — this is the whole point | | Call `api.deepseek.com` with the found key to "check if it works" | **No** | | Check the account balance, list models, run one cheap completion | **No** | | Paste the full key into a report, gist, chat, or spreadsheet | **No** | Why the third row matters in practice, not just in principle: * It is the act that converts *"I read a public file"* into *"I accessed a computer system without authorisation"* — 18 U.S.C. §1030(a)(2), UK Computer Misuse Act s.1, and the equivalent in the EU and Iran. A key being public does not grant authorisation; the account holder never consented. * It spends the victim's money and quota, and it can get the key rate-limited or banned before the owner ever hears from you. * It destroys your credibility. A report that says "and then I called your API four times" is a confession, not a finding. Proof of exposure is **the line in the repo plus the commit**. Any owner can confirm it in five seconds. You do not need a live HTTP 200, and no legitimate program requires one from a third party. > If a bounty programme explicitly instructs you to validate a credential > against a live service, get that instruction in writing from the programme, > and prefer a zero-cost, read-only endpoint. Absent that, don't. ### "But I only want to check the balance, it costs them nothing" This comes up every time, and it is worth answering precisely, because the argument sounds reasonable. `GET https://api.deepseek.com/user/balance` is an **authenticated request to someone else's account**. It returns their remaining credit, granted balance, and whether the account is topped up. Three things follow: 1. **Cost is not the test.** The offence is the unauthorised access, not the invoice. A free request to an account you do not own is still a request to an account you do not own. "It did not consume quota" is not a defence anywhere. 2. **It turns a disclosure list into a target list.** A report filtered to "accounts with credit remaining, here is how much" is not a report about leaked secrets. It is a ranked list of where the money is. That is the single most useful artefact for someone who intends to abuse the keys, and the person who assembled it owns the consequences of it leaking or being misread. 3. **It is bad evidence anyway.** A valid key can have zero balance; a balance endpoint can be unavailable for keys issued through a reseller or with a grant that is not exposed there. Filtering on it drops real findings and keeps false confidence. The owner also sees it: API traffic from an unknown IP hitting their balance endpoint before any email arrives looks exactly like an attacker doing reconnaissance — which is what it is. Your later email is then much harder to believe. **What actually answers the same question:** is this account still worth bothering? Public repo activity. `--enrich` gives you last push date, last commit on that file, stars, archived flag. A repo last touched in 2021 with the key still in `config.py` is a dead account with near-certainty; a repo pushed to last week is a live project whose owner can rotate in two minutes. Same practical filtering, zero contact with anyone's account. --- ## 1. Triage before you contact Sort by what actually needs attention now: 1. **`.env` / config / source file, assigned to a `DEEPSEEK*_KEY` variable, pushed in the last 90 days** → urgent. Contact today. 2. Same, but the repo has been dead for two years → the key is almost certainly already revoked or the account deleted. Report to GitHub, low priority. 3. `README.md`, docs, tutorials, `example` blocks → almost always a fake. Check the file for `your_key_here` before you write anything. 4. The same fingerprint in several repos → **one** incident. Notify the owner once and list every location; do not send four emails. Rule of thumb: a report costs the owner five minutes. If your confidence is low, the report costs more than it saves. Spend the effort on case 1. --- ## 2. Who to contact, in this order ### a) The repository owner — first, always Best channel depends on what is available: | Channel | When | How | |---|---|---| | Private security advisory | Repo has **Security → Advisories** enabled | Repo → Security → "Report a vulnerability". Private, threaded, gives the owner a real workflow. Preferred. | | GitHub issue | No advisory, owner is active | Open a **minimal** issue: "Exposed credential in `path` — please rotate; I have not published anything." Never put the key in the issue. Better: ask for a private channel in the issue body. | | Commit author email | Owner unresponsive | `git log -1 --format='%ae'` on the file, or the scanner's `--resolve-contacts`. Keep the email short and non-accusatory. | | Repo profile / org page | Older project | Website or contact address. | Never open a public issue that includes a working key: you have then republished the secret to a wider audience than the original commit, and you own that. ### b) GitHub GitHub's own secret-scanning alerts fire only for supported providers, and DeepSeek is not (as far as I can confirm) a GitHub secret-scanning partner — so a committed DeepSeek key does **not** trigger an automatic alert. You have to tell them: * **Support:** → "Report abuse" is the closest category; in the message state clearly: *leaked credential in a public repo, owner unresponsive, requesting removal from git history*. Include repo URL, file path, commit SHA, and the **masked** fingerprint. * **Secret scanning docs** for the owner-side fix: * If the repo is a fork or the content is a scraped dump, mention that — GitHub handles those differently. Expect GitHub to tell you to contact the owner first. That is why step (a) is ordered first: having "I contacted the owner on , no response" in your message is what gets a support case actioned. ### c) DeepSeek DeepSeek can revoke a key faster than anyone else. I could not verify a published security contact address, so **do not guess one** — check the official site / platform console for a security or support address and use that. If they have no channel, the owner-side revocation (step a) and GitHub (step b) are the only levers, and that is a finding about the ecosystem, not a reason to skip them. --- ## 3. Templates Ready-to-send drafts are generated per repository at `out/disclosures/__.md`. The generic versions: ### Email / DM to the owner ``` Subject: Exposed DeepSeek API key committed to Hello, I scan public repositories for committed credentials. contains what appears to be a DeepSeek API key in plain text: fingerprint: sk-abcd...wxyz file: path/to/file.env url: https://github.com///blob//path/to/file.env I have not used the key and have not called the DeepSeek API with it. I am not sending the full value; you will find it at the path above. Suggested actions: 1. Revoke the key in the DeepSeek console and issue a new one. 2. Remove it from history (git filter-repo or BFG), not just from HEAD. 3. Check usage/billing for calls you did not make. 4. Load the value from the environment or a secret manager, and add a pre-commit hook (gitleaks / trufflehog). Happy to re-scan after you rotate. If you would rather not be contacted, tell me and I will stop. Regards, / ``` Keep it boring. No "URGENT!!!", no screenshots of their dashboard, no speculation about what an attacker could do. Boring gets fixed. ### GitHub Support ``` Category: Report abuse / leaked credential Repo: https://github.com// Path: , commit , still present on as of Credential: DeepSeek API key, fingerprint sk-abcd...wxyz (full value not included) Owner contact: emailed
on , no response after 14 days Request: removal of the secret from the repository history ``` ### Private security advisory (repo → Security → Advisories) Same as the email, minus the greeting, plus the exact commit SHA and a note that you are available to verify the fix by re-scanning. --- ## 4. What "credit" actually looks like Be realistic, because this affects how much time you spend: * **GitHub does not pay** for reporting a leaked secret in someone else's repo. There is no bounty for it and no public leaderboard. * **DeepSeek has no public bug-bounty programme I could confirm.** Most providers treat "leaked customer key" as the customer's incident, not the provider's vulnerability — the provider's fix is secret scanning on their side, which pays nothing. * Bounty programmes (HackerOne, Bugcrowd, etc.) sometimes pay for *exposed-secret* findings, but only when **the target's own** infrastructure leaks them — an S3 bucket of theirs, a JS bundle of theirs — and only inside the stated scope. A stranger's `.env` is not in scope, ever. * What you do reliably get: a thank-you, sometimes a credit line in a `SECURITY.md` or a fix commit's co-author trailer, and a portfolio of disclosure write-ups. Some researchers parlay that into consulting. So do it because the ecosystem is better for it, and treat any credit as a bonus. If a promised reward is what is motivating the volume, that is the point at which the work starts drifting toward harvesting — and the drift is easy to miss from the inside. --- ## 5. Housekeeping * Store the token in an environment variable. Fine-grained, **public repos, read-only**. Revoke it when the run is done. * The report writes only fingerprints. If you ever find yourself with a file containing full keys, delete it — you have created a new leak, this time attributable to you. * Do not publish a "leaked keys" list, a dataset, or a dashboard of other people's live credentials, even masked, even "for research". Aggregated fingerprints plus repo paths are a targeting list. * Keep a simple log: repo, date contacted, channel, response. It is what turns "I emailed some people" into a disclosure record, and it is what GitHub Support will ask for. --- ## 6. If the owner pushes back Some will be embarrassed and defensive, and a few will accuse you of hacking. The answer is short and true: *"The file is public on github.com; I read it and I did not authenticate to anything of yours. I am telling you so you can rotate before someone less friendly reads it."* Then stop. You are not obliged to argue, and continuing to press after a clear "leave me alone" turns a favour into harassment.