LeakyVibe

Does your app have this problem? Free scan, 15 sec, no sign-up

or watch it scan our demo app ▶

Blog ·

Add .env to .gitignore before your first commit

AI tools often create a .env file for your keys. If it gets committed, the keys live in your git history, and anyone who can see the repo can read them.

The check: open your .gitignore file and look for a line that says .env (or .env*). Then run git ls-files and see whether any .env file is listed.

The fix: add .env* to .gitignore. If a .env file was already committed, rotate every key in it, because deleting the file does not remove it from history.

Want an outside check for leaked keys? Run the free scan at leakyvibe.com/?demo=1&ref=blog-add-env-files-to-gitignore-before-first-commit. It takes about 15 seconds.

Check your app for this now

Free scan · about 15 seconds · no sign-up

Passive, read-only checks. Only scan apps you own or have permission to test.