Is your .git folder public?
Some deploys copy the whole project folder to the server, including the hidden .git folder. If that folder is reachable, anyone can download your source code and its full history, including API keys you deleted months ago.
Check it
Open https://yourapp.com/.git/HEAD in a browser. If you see text like ref: refs/heads/main, it's exposed.
Fix it
- Deploy only your build output (like
distorbuild), not the whole repo. - Block
/.giton your host or server. - Rotate any key that ever lived in your repo history. Deleting it from the code isn't enough.
Paste this to your AI tool: "Make sure our deploy only uploads the build folder and that requests to /.git return 404."