Three years of leaky keys in my side project API, fixed this morning with one env check
Three years ago I built a small weather API in my spare time and hardcoded an API key in the first commit because I just wanted it working before my coffee got cold. Last week a friend who does security work poked at the repo (I'd left it public, of course) and found the key sitting in plain text in a JS file. The key had been dead for a while, but the old commits still had it, so I spent Saturday morning learning about git history rewriting. Then I added a simple check in the deploy script that blocks any push if a string matching my key format shows up, and it caught one of my own test saves this morning. Small win, but my repo no longer hands out secrets. How do you all handle keys that got baked into old commits before you knew better?