The Prompt BakeryTemplates and prompts

Fix · Security mistakes

My key or password is in a GitHub repository

UrgentSecurity

What you may see

  • GitHub emailed me about an exposed secret
  • I found a key in my code after pushing

Most likely cause

Once a secret is pushed it can be copied by bots within minutes, even in a private repository that later turns public, so deleting it from the file does not make it safe.

Check first (about two minutes)

  1. Which service issued the key, and is the repository public or private?

The fix prompt

What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.

Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.

Prompt language

Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.

After you tried it, did it work?

Steps

  1. Step 1, NOW: create a new key at the service and disable the old one. Walk me through it for that service and say that page names may differ.
  2. Step 2: check that service's usage and activity for anything I did not do (spending, new users, data downloads, new keys).
  3. Step 3: remove the secret from the current code, move it to an environment variable, add the file to .gitignore, and commit.
  4. Step 4: explain (without doing it) how to remove it from old commits with a history tool, and the risks; since the old key is already dead, this is optional clean-up and needs my yes.
  5. Step 5: turn on secret scanning and push protection on the repository if available, and add a check that blocks secrets from being committed.

Do not do this

  • Do not make the repository private and think it is solved.
  • Do not force push over a shared branch without telling the team.
  • Do not start with history clean-up: replace the key first.
  • Do not paste the key or the new key in chat.

Related

Try another entry

How can we help?

What do you need?
Your email, so we can reply (optional)Only enter your own email. We reply there.