Skip to content
Leaked secrets Write-up Intermediate

How I made $64k from deleted files — a bug bounty story

The author scanned public GitHub repositories for secrets left in deleted files and Git history, finding active API keys, tokens, and credentials. These leaked secrets could allow unauthorised access to sensitive systems, and the author earned bug bounty rewards for reporting them.

medium.com

Published on medium.com

My name is Sharon Brizinov, and while I usually focus on low-level vulnerability and exploitation research in OT/IoT devices, I occasionally dive into bug bounty hunting.

Sharon Brizinov, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely developers removed secrets from the current version of the code but did not revoke them or purge them from Git history, so the secrets remained recoverable from deleted files and Git objects.

Impact

The leaked secrets could allow unauthorised access to sensitive data and systems, and the author earned approximately $64k in bug bounty rewards for reporting them.

What the attacker needed

Public GitHub repositories; secrets committed then deleted; automation to clone and scan

The fix

The text does not describe a specific fix, but the implied fix is to revoke any exposed secrets and properly purge them from Git history.

How it was found

  1. Collect a list of companies with bug bounty programs and find their GitHub accounts.
  2. Clone all repositories from those accounts.
  3. Restore deleted files by diffing parent and child commits, unpacking pack files, and finding dangling objects.
  4. Scan the restored files with a secrets detection tool to find active secrets.
  5. Notify the author of verified secrets via Telegram.
  6. Delete the repository and move to the next one.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When developers delete a file from a project, the file often remains in the project's history. The author searched many public code repositories for secrets like passwords or API keys that were left in these old, deleted files. Finding such secrets can let someone access private systems, so companies pay rewards for reporting them.

What is Leaked secrets?

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.