Exposed website files: .git folders, .env files and backups
Some websites accidentally let anyone download their code history, settings file or backups. Why it's serious and what to do the same day.
By HackSpot team (Amethyst Apps) · · 1 min read

Short answer: sometimes files that should stay private end up downloadable from a website: the .git folder (code history), the .env file (passwords and keys), backup zips or database dumps. If HackSpot finds one on a site you've verified as yours, treat it as urgent: have your developer block access today and change any passwords or keys those files contain.
Why it's serious
These files often hold database passwords, email and payment keys, and customer data. Anyone who finds them can use them.
How HackSpot checks
Only for websites whose owner has proved they control the domain. We request a short, fixed list of well-known file names, one at a time, and only report a file as exposed when the response really is that file. We never store its contents, just a short proof such as "starts with ref:".
What to do
- Ask your developer to block the files today and remove backups from the public website.
- Change every password and key that was in them, including the database password.
- Check with your developer whether anything was accessed.
Questions people ask
Does HackSpot check other people's websites for these files?
No. These checks only run after the owner proves they control the domain.
We've removed the file. Are we safe now?
Only once the passwords and keys it contained have also been changed.