My Launch Checklist Passed 47 Checks. A 2019 Backup Tarball in My Web Root Didn't Care.
Three weeks before launch, I did the thing every indie hacker says they'll do and almost nobody actually does: I stopped building and attacked my own product. Not a full penetration test. No Burp Suite wizardry. Just an
Three weeks before launch, I did the thing every indie hacker says they'll do and almost nobody actually does: I stopped building and attacked my own product.
Not a full penetration test. No Burp Suite wizardry. Just an afternoon with nmap, ffuf, curl, and the 47-item checklist I'd written at 1 a.m. six months earlier. I expected to find a missing security header and maybe an outdated dependency.
Instead I found a backup tarball from 2019 sitting in my public web root. Inside it was a database password that still worked.
The checks that made me feel safe
My checklist was not stupid. That's the uncomfortable part. It covered the things the internet tells you to cover:
- TLS with auto-renewal, HSTS on
-
ufwdefault deny inbound, only 80/443 open - SSH key-only, root login disabled, fail2ban watching
sshd - Postgres bound to localhost, no public port
- No secrets in the git repo — I'd checked with
gitleaks - Dependencies audited the week before
Every one of those passed. If I'd stopped there, I would have shipped with a straight face and written a launch post about how seriously I take security.
The problem is that all of those checks describe the machine and the repository. None of them describe what the machine is actually serving.
The recon pass
I ran the boring stuff first. Subdomain enumeration turned up two names I'd forgotten: an old staging host and a beta subdomain still pointing at the same Pi. nmap confirmed only 80 and 443 were reachable from outside — good. No stray Postgres, no Redis, no Docker API. That matched the firewall rules.
Then content discovery. I used a small wordlist pointed at archive extensions, because that's where the embarrassing things live:
ffuf -u https://example.com/FUZZ \
-w backups.txt \
-mc 200,301,302,403 \
-t 20
The wordlist was 300 lines: backup, backups, db, dump, site, app, each crossed with .zip, .tar.gz, .sql, .bak, .old, .env. That's not sophisticated. It's the first thing anyone with ffuf and ten minutes does.
I got 190 results. Almost all of them were soft 404s — my nginx config returned a custom 200 error page for missing files, which is a genuinely awful default I'd copied from a tutorial years earlier. Nineteen were real redirects to the marketing page.
One was a 200 with a 42 MB body: /static/backups/site-2019-11-03.tar.gz.
What was inside
I downloaded it on my own machine and listed the contents before extracting anything:
tar -tzf site-2019-11-03.tar.gz | head -50
There it was. .env, docker-compose.yml, a SQL dump, and a folder of uploaded files. The .env had a Postgres URL with a username and password I recognized immediately, because I had reused it. The database was still running on that Pi. The role still existed. The password had not changed since 2019.
The dump also contained about 4,000 email addresses from a side project I'd shut down years earlier. Not my current customers — but real people, and data I was still responsible for.
The tarball was not linked from anywhere. It didn't need to be. The filename was dated and predictable, the directory was served by nginx, and directory listing was off — which I had always treated as the protection. It isn't. Directory listing stops browsing. It does nothing against a guessed path.
The root cause was a cron line
The backup job looked like this, written when the Pi was a toy:
pg_dump app | gzip > /var/www/html/static/backups/site-$(date +%F).tar.gz
Two mistakes in one line. It wrote backups into the directory nginx serves, and it put them under a path that the app's static file handler exposed. The job ran nightly for years. Every night it added another copy of the same credentials to a public directory, and nothing in my stack considered that a security event.
My checklist checked whether secrets were in git. It never checked whether secrets were in the deployed artifact. Those are different questions. gitleaks was telling the truth. My web root was lying.
The fixes, in the order I did them
- Moved backups to
/var/backups/app, owned by a dedicated user, mode 600, on a separate disk. The web server user cannot read that directory at all. - Rotated the database password and confirmed the old one failed. Then rotated every credential that appeared in the dump, including the SMTP password.
- Blocked archive and dotfile paths at nginx, so a future mistake has a second line of defense:
location ~ /\.(?!well-known) { deny all; }
location ~* \.(env|sql|bak|zip|tar|gz|tgz|log|old)$ { deny all; }
- Replaced the custom 200 error page with a real 404. A scanner should not have to guess whether a file exists.
- Added a canary file outside the app's routes and an alert on any request for it. If someone is enumerating my host, I want to know the same day, not three years later.
- Added one line to the launch checklist that would have caught this in ten seconds:
comm -23 \
<(find /var/www/html -type f | sort) \
<(cd /srv/app && git ls-files | sed 's|^|/var/www/html/|' | sort)
Anything in the web root that isn't in the repo is either a generated asset or a mistake. That command shows you which.
The honest part
The finding wasn't the worst thing about that afternoon. The worst thing was that I almost missed it.
After 190 soft 404s, my brain had classified the scan as noise. I closed the terminal, made coffee, and told myself I'd do a "proper" pass later. What brought me back was annoyance at the 200-on-missing-file behavior, not suspicion. I fixed the error page, reran the scan to confirm the fix, and the result count dropped from 190 to 4. One of the four was the tarball.
If I had been a little more tired, or a little more confident, I would have shipped. The vulnerability had been live for years and would have stayed live, because nothing about my monitoring watched for someone downloading an old file.
Three lessons I keep coming back to:
A checklist is a map of your assumptions. Mine assumed the repo was the only place secrets could hide. The deployed filesystem was outside the map, so it was outside the audit.
Predictable names are not obscurity, they're a schedule. A dated backup filename is a calendar for anyone who wants your credentials. "Nobody knows the path" is not a control; it's a hope with a URL.
False positives are where real findings go to die. Scanner output is mostly garbage. The discipline isn't running more tools — it's narrowing the query until the remaining results are small enough to read carefully.
What I'd do if you're launching this week
You don't need a security team or a $5,000 pentest for a product with twelve users. You need one afternoon where you look at your own deployment the way a stranger would:
- List every file the web server can serve, and compare it to what you meant to deploy.
- Grep the deployed tree for
PASSWORD,SECRET,TOKEN, and connection strings — not just the repo. - Check whether old credentials still work. Password age is a vulnerability that no scanner reports.
- Turn off directory listing and make missing files return 404.
- Put a canary somewhere only an enumerator would look.
- Re-run the whole thing after you fix it, because half of security work is confirming the fix actually landed.
I got lucky. The tarball was found by me, on my own host, three weeks before launch, and the only person who downloaded it was the guy who wrote it. That's not a strategy. That's a coin flip I happened to win.
The full checklist + scripts are in Ship Safe — The Launch-Day Security Kit — code LAUNCH90 at checkout makes it $1.50.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.