.env or .git folder publicly accessible on your site
A .env file served from your site gives away the keys and passwords inside it, and a public .git folder lets anyone download your source code and its full history, secrets included. This happens when a deploy copies the whole project folder to the web root, or when an env file sits in public/. The fix is to serve only the build output folder, keep env files out of public/, and block every dotfile path except .well-known at the server. Then rotate any secret that was reachable, since you cannot know who already fetched it.
The fix
$ curl https://yourapp.com/.env
DATABASE_URL=postgres://...
STRIPE_SECRET_KEY=sk_live_...server {
root /var/www/app/dist;
location ~ /\.(?!well-known) {
deny all;
}
}How ShipReady finds it
shipready url requests /.env and /.git/HEAD on your site and reports a file that comes back with status 200 and looks like the real thing. shipready check also reports env files inside public/. Findings carry rule ID SR-WEB-007.
Run the check
npx @shipmate-agency/shipready url https://yourapp.com
npx @shipmate-agency/shipready check .# .github/workflows/shipready.yml
name: ShipReady
on: [push, pull_request]
permissions:
contents: read
security-events: write
jobs:
shipready:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: deeflect/shipready@v0.2.0Want a person to check every area and send the fixes as pull requests? Launch Lockdown, $950 once.