Skip to content
Leaked secrets Write-up Beginner

How I Find Sensitive Information Leaks on GitHub (and a Real Example)

A public GitHub repository belonging to WHOAcademy contained a values.yaml file with hard-coded database credentials. An attacker who found the file could read those credentials and potentially access the database, though the text does not show any actual exploitation.

Chidubem Chukwu Follow

Published on osintteam.blog

Secrets and credentials often end up in public code repositories by mistake. Attackers scan GitHub constantly to harvest these leaks, but as security researchers we can help organizations fix them responsibly.

Chidubem Chukwu, on osintteam.blog

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, a configuration file containing database credentials was committed to a public repository by mistake.

What the attacker needed

Public GitHub repository; credentials committed to the repo

The fix

The repository was locked down and the file removed after the report.

How it was found

  1. Search GitHub for files likely to contain secrets, such as .env or values.yaml, using the organisation name.
  2. Identify a public repository that contains a file with hard-coded credentials.
  3. Confirm the file is public and redact the secret values in notes.
  4. Report the leak to the organisation's vulnerability disclosure programme, encrypting the report with their PGP key.

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.

A secret is a password or key that lets someone log in to a system. Here, a file that should have been private was left in a public code repository, so anyone could read the secret inside it. The author found it by searching GitHub and reported it to the organisation instead of using it.

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.