Type the address of an app you delivered, add /.env to the end, and press Enter. Most of the time you get the app's own page or a "not found". Now and then you get a list of passwords.
Three kinds of file belong on a developer's machine and sometimes end up on the public site: the settings file, the version history and the source maps. None of them is used by the running app, so nothing breaks when they are there, and nobody notices. Each takes a minute to check.
The settings file
An .env file holds an app's settings as lines of NAME=value: the address of the database, API keys, the password for the mail service. It sits in the project folder and is read when the app is built or started. It is not supposed to be copied to the place the public site is served from.
It gets there in a few ordinary ways. A project is uploaded as a whole folder. A build step copies everything in the root. A variant such as .env.production or .env.local is added later and is not covered by the rule that keeps the first one out.
How bad it is depends on what the file holds. In a project built with Vite, every variable whose name starts with VITE_ is compiled into the JavaScript anyway, as the Vite guide on env variables explains. A file with only those names gives away nothing that was not already public. A file that also holds a database password, a payment provider's secret key or a service role key is a different matter, because those were never meant to leave the server.
How to check
Open these addresses on the live site: /.env, /.env.local and /.env.production. Look at what comes back, not at whether the request succeeded. Single-page apps answer every unknown address with their own start page and the status "200 OK", so a successful request proves nothing. An exposed settings file is plain text with lines like STRIPE_SECRET_KEY=sk_live_.
If it is there
Take the file down, and then treat every secret in it as known to strangers. Removing the file does not undo the time it was readable. Replace each key and password at the service that issued it. Do that first for anything that can move money or read customer data.
The version history
Git keeps every version of a project in a hidden folder named .git. If that folder is published with the site, anyone can download it piece by piece and rebuild the whole history: the current code, and everything that was once in the code and later removed.
That last part is what makes it serious. A key that was committed by mistake in the first week and deleted the day after is still in the history. So are the names of internal services, old database addresses and the comments someone wrote at two in the morning.
How to check
Open /.git/config on the live site. If the folder is exposed, you get a short text file that starts with [core] and usually names the place the code is stored. If that address has a user name and a token in it, in the form https://name:token@host, the token gives access to the code repository itself and should be revoked at once.
If it is there
Keep the folder out of what is published, or have the host refuse every address under /.git/. Then go through the history for secrets, because someone else may already have. Every key that was ever committed needs replacing, including the ones that were deleted long ago.
Source maps
The JavaScript an app sends to the browser is squeezed into a form that is hard to read. A source map is a second file that translates it back, so that an error can be traced to the right line in the original code. It is a debugging aid, and it contains the code as it was written, with file names and comments.
Of the three files, this is the mildest. The squeezed JavaScript is public already, and a patient reader can work out what it does. A source map removes the patience. It shows how the app is put together, which tables and functions it calls and what the developer wrote in the margins, and that makes other weaknesses quicker to find. It should not be on a production site without a reason.
How to check
Open the app's main JavaScript file and look at its last line. If it says sourceMappingURL followed by a file name, the browser is being told where the map is. Open that address. If the answer starts with a curly brace and contains the word "sources", the original code is published.
If it is there
Switch source maps off for production builds and publish again. In Vite the setting is build.sourcemap, which is off by default, so a map on a live site usually means somebody switched it on while chasing a bug. If you want the maps for error tracking, upload them to the error tracking service and leave them off the public site.
Why these get through
All three share a property: the app works exactly the same with or without them. No test fails, no screen looks different and the client sees nothing. They get published by a setting or a copy step that nobody chose on purpose, which is also how an AI app builder or a one-click host can put them there without anyone asking.
That is the argument for looking from the outside. What is in the project folder tells you what you meant to publish. Only the live address tells you what was published. A check that requests the address and reads what comes back does not care how the file got there.
Make it a routine
Check the three before handover, together with the other items in the handover checklist, and again after every deployment that changed how the app is built or hosted. It is quick by hand for one app. For ten apps that each change now and then, it is the kind of task that is skipped in a busy month, which is why it belongs in a nightly run. A free check looks at the keys in an app's public code. The leftover files are checked once you have shown that the app is yours.
When you find one, write down the date and what you did about it. In a monthly report that is a short, concrete line: a settings file was reachable from outside, it was removed on the 14th, and the keys in it were replaced the same day.