Skip to content

Module 02 · Lesson 05

Exposed files and leaked secrets

Check what your server hands out, and what your repo remembers.

Scan6 min
curl -I https://your-own-site.com/.env
curl -I https://your-own-site.com/.git/HEAD
You want 404 or 403. A 200 means the file is public: remove it from the server now.
  • Open your site, then DevTools › Sources: search the JavaScript for words like secret, sk_live, key.
  • Scan your repo history with gitleaks (free): `gitleaks detect` in the repo folder.
  • Anything found: rotate the key at the provider first, then clean up.