
Mission 1 of 10
Find out how small apps really get broken, then check your own site.
Small apps are rarely hit by clever hacks. They fall to the same seven ordinary problems, over and over. Learn each one, then run a baseline check on a site you own.
What you'll do
See how each one actually plays out, and the plain control that stops it.
Check TLS, headers, exposed files, open routes, your login, your dependencies, your git history and your buckets.
Rank your worst three findings and see which mission in this track fixes each one.
- A login probe for rate limits and account enumeration
- A dependency audit, a git-history scan and a bucket check
- Only ever run against a site you own or have written permission to test
- A site or app you own and are allowed to test. A personal project, your startup, your company's site with permission in writing. Nothing else
- Python 3.11+ with uv (
uv --version). Install uv ↗ if not - The source code of at least one of your projects on this machine, with its git history
- An hour. The checks themselves take minutes; reading the results and deciding takes the rest
Your progress0/7
- 01The rules, and why 'nobody would bother' is wrong6 min
- 02The seven attacks, how they really run, and the control for each15 min
- 03Run the baseline: TLS, headers, exposed files, open routes, CORS12 min
- 04Probe your own login: rate limits and enumeration10 min
- 05Audit dependencies and scan your git history10 min
- 06Check your storage buckets6 min
- 07Fill the scorecard and pick your worst three10 min
The rules, and why 'nobody would bother' is wrong
You're about to probe a live site. Make sure it's yours, and understand who is actually probing it already.
Why 'nobody would bother' is wrong
Now the thing people get wrong about small apps. They assume attacks are targeted and that nobody targets them. Almost nothing that hits a small app is targeted. It's automated.
The moment a domain gets a certificate, it appears in public certificate transparency logs, and within minutes scanners are requesting /.env, /.git/config, /wp-login.php and a few hundred other paths.
The moment a key hits a public GitHub repo, bots that watch the commit firehose try it against the provider's API, typically within a minute or two.
The moment a password appears in a breach dump, credential-stuffing tools try it against every popular service and every login form they can find with that email.
So the question is never 'would anyone bother?'. It's 'when the automated sweep reaches my site, what does it find?'. This mission answers that for your site. The rest of the track closes what it found.
/.env from you since the day you went live.The seven attacks, how they really run, and the control for each
You can't prioritise what you don't understand. Fifteen minutes on how each attack actually plays out, so the rest of the track is obvious rather than arbitrary.
Each of these is listed with the attack, how it plays out, and the control that stops it. The control is the whole point. Memorise the controls, not the attacks.
1. Credential stuffing
A user signed up with the password they use everywhere. That password is in a breach from some other site. A tool takes the breach list and tries each email and password against your login at a few thousand a minute. Some fraction work.
*Control:* rate limits on login, a check against known-breached passwords at sign-up, 2FA or passkeys for anything that matters. Covered in the auth mission.
2. Leaked keys
An API key, database URL or cloud credential ends up in a commit, a .env file that got deployed as a static asset, a Docker image layer, a screenshot, or a Slack message. Bots find it and use it: crypto mining on your cloud account, your OpenAI balance drained, your database dumped.
*Control:* keys only in environment variables injected at runtime, pre-commit scanning, push protection, rotation. The secrets mission.
3. Outdated dependencies
A package you depend on (or one it depends on) has a published vulnerability with a public exploit. Scanners fingerprint your version and run it. The 2021 Log4Shell wave and the regular Next.js and Django advisories follow this shape.
*Control:* an audit in CI that fails the build on high severity, and automated update PRs so you never fall far behind. Dependency audit and the last mission of this track.
4. Open storage
A bucket or storage path is public because that was the easy setting during development. Uploads, exports, backups and user photos are listable and downloadable by anyone with the URL pattern.
*Control:* private by default, signed URLs for access, a periodic check that lists your buckets' policies. Step 7 below.
5. No rate limits
Not just on login. Password reset emails (used to spam your users from your domain), signup (used to create thousands of accounts), any endpoint that calls a paid API on your behalf (your bill), and search (used to scrape or to take the site down).
*Control:* a rate limit at the edge (Cloudflare rules) and per-user limits in the app on anything that costs money or sends mail. The edge mission.
6. Injection
User input reaches a SQL query, a shell command, an HTML page, or a URL the server fetches, without being treated as data. SQL injection dumps the database. XSS steals other users' sessions.
SSRF makes your server fetch internal addresses, including cloud metadata endpoints that hand out credentials. In 2026 add prompt injection, where the input reaches a language model with tools.
*Control:* parameterised queries, output encoding, a strict URL allowlist for server-side fetches, validation of every input, and for AI apps, the three defences in the prompt-injection mission. Inputs and the database.
7. Exposed routes and files
/admin protected only by not being linked. /debug left on. /metrics public. /.git deployed with the site so the whole source can be reconstructed. API docs that list every endpoint including the ones you forgot to protect.
*Control:* authentication enforced in middleware that runs on every route, not per-page; deploy only the build output; a baseline check like the one you're about to run.
What isn't on the list
Clever cryptographic attacks, novel exploits, nation states: those exist and they're not your problem. Your problem is the seven above, and every one of them has a boring, known fix. This track is those fixes.
Run the baseline: TLS, headers, exposed files, open routes, CORS
Sixty seconds of automated checking that replaces an hour of clicking around.
This step runs a scanner's first pass against your own site.
It makes a handful of ordinary GET requests to a site you own and reports what a scanner would find in its first pass. It's deliberately plain: no exploitation, no fuzzing, nothing that would look different from a user clicking links.
Create a folder for the project and add the one library it needs.
Terminal (same on every OS)mkdir site-baseline; cd site-baseline uv init --bare uv add httpxSave this as
baseline.pyinside that folder. It covers TLS, security headers, leaky headers, ten exposed-file paths, open admin routes and CORS.baseline.py"""baseline.py: a 60-second security baseline for a site YOU own. Usage: uv run baseline.py https://example.com""" import socket, ssl, sys, datetime as dt import httpx site = sys.argv[1].rstrip("/") host = site.split("//", 1)[1].split("/", 1)[0] findings: list[tuple[str, str]] = [] # 1. TLS: version and certificate expiry ctx = ssl.create_default_context() with ctx.wrap_socket(socket.create_connection((host, 443), timeout=10), server_hostname=host) as s: exp = dt.datetime.strptime(s.getpeercert()["notAfter"], "%b %d %H:%M:%S %Y %Z") days = (exp - dt.datetime.utcnow()).days findings.append(("TLS", f"{s.version()}, cert expires in {days} days" + (" (RENEW)" if days < 14 else ""))) c = httpx.Client(follow_redirects=True, timeout=10, headers={"User-Agent": "baseline-check (owner)"}) r = c.get(site) # 2. Security headers that should be present want = ["strict-transport-security", "content-security-policy", "x-content-type-options", "x-frame-options", "referrer-policy", "permissions-policy"] missing = [h for h in want if h not in r.headers] findings.append(("Headers", "all present" if not missing else "MISSING: " + ", ".join(missing))) for h in ("server", "x-powered-by"): if h in r.headers: findings.append(("Leaky header", f"{h}: {r.headers[h]} (remove or genericise)")) # 3. Files that should never be reachable for path in ["/.env", "/.git/HEAD", "/.git/config", "/backup.zip", "/db.sql", "/phpinfo.php", "/.DS_Store", "/wp-config.php.bak", "/config.json", "/.aws/credentials"]: try: p = c.get(site + path) if p.status_code == 200 and len(p.content) > 0 and "<html" not in p.text[:200].lower(): findings.append(("EXPOSED FILE", f"{path} returned 200 with {len(p.content)} bytes")) except httpx.HTTPError: pass # 4. Admin routes that answer without a login for path in ["/admin", "/admin/login", "/wp-admin", "/api/admin", "/debug", "/metrics", "/swagger", "/docs"]: try: p = c.get(site + path) if p.status_code == 200: findings.append(("Open route", f"{path} is 200: confirm it needs auth")) except httpx.HTTPError: pass # 5. CORS o = c.get(site, headers={"Origin": "https://evil.example"}) if o.headers.get("access-control-allow-origin") in ("*", "https://evil.example"): findings.append(("CORS", f"reflects or wildcards origins: {o.headers['access-control-allow-origin']}")) for k, v in findings: print(f"{k:14} {v}")Run it against your own site, with your own address in place of the example.
Terminaluv run baseline.py https://your-site.example
Reading the output
Read the output line by line. Here's what each kind of line means.
- TLS. You want
TLSv1.3(or 1.2 at worst) and a cert with more than 14 days left. Anything on Cloudflare, Vercel, Netlify or Let's Encrypt with auto-renew will pass. A hand-installed cert that someone has to remember to renew is the one that expires on a bank holiday. - Headers. Six should be present. Missing
strict-transport-securitymeans a user on hostile Wi-Fi can be downgraded to HTTP. Missingcontent-security-policymeans a single XSS bug has free rein. The edge mission sets all six in one go. - Leaky headers.
Server: nginx/1.18.0orX-Powered-By: Expresstells a scanner exactly which exploits to try. Free to remove. - EXPOSED FILE. This is the serious one. A 200 on
/.envor/.git/HEADmeans your secrets or source are public right now. Stop reading, take the file down, and treat any key in it as leaked (the secrets mission has the first-ten-minutes drill). - Open route. A 200 on
/adminor/docsisn't automatically bad; your admin page might render a login form with a 200. Open each one in a private browser window and confirm it demands a login. A/metricsor/debugpage that shows real data is a finding. - CORS.
Access-Control-Allow-Origin: *on an API that uses cookies, or an origin that's reflected back, means any website can make requests as your logged-in users.
Nothing printed under EXPOSED FILE and no CORS line is a decent start. Most hand-built sites fail on headers and leaky headers; that's normal and cheap to fix.
https://www. and the bare domain, and against your API's hostname if it's separate. Different hosts, different configs, different findings.If it breaksssl.SSLCertVerificationError on the TLS check + 2 more
ssl.SSLCertVerificationError on the TLS check
openssl s_client -connect host:443 -servername host or the SSL Labs test.The script hangs on the exposed-file loop
Everything returns 200, even /this-does-not-exist
<html, but check manually that /.env really returns the shell and not a file. curl -s https://site/.env | head -c 300.Probe your own login: rate limits and enumeration
The single most common way small apps lose user accounts is a login that lets an attacker guess forever. Find out in a minute.
The baseline looked at your site from the outside. This probe tests your login.
It sends 25 wrong passwords to your own login endpoint for your own account and measures what happens. Then it compares the response for a real email and a made-up one.
Run it against a staging environment if you have one; against production is fine for your own account as long as 25 failures won't lock you out of something you need today.
Save the probe as
login_probe.pyin the same folder.login_probe.py"""login_probe.py: does YOUR login slow an attacker down? Usage: uv run login_probe.py https://site/api/login you@you.com""" import sys, time import httpx url, user = sys.argv[1], sys.argv[2] codes = [] t0 = time.time() with httpx.Client(timeout=10) as c: for i in range(25): r = c.post(url, json={"email": user, "password": f"wrong-password-{i}"}) codes.append(r.status_code) if r.status_code == 429: break elapsed = time.time() - t0 print(f"{len(codes)} attempts in {elapsed:.1f}s, status codes: {sorted(set(codes))}") if 429 in codes: print(f"PASS: rate limited after {codes.index(429)} failures") elif elapsed / len(codes) > 1.5: print("PARTIAL: no 429 but each attempt is slow; check it is deliberate, not just a slow server") else: print("FAIL: 25 wrong passwords, no limit, no delay. Credential stuffing would run at full speed.") # Enumeration: does a real and a fake email get different answers? with httpx.Client(timeout=10) as c: real = c.post(url, json={"email": user, "password": "wrong"}) fake = c.post(url, json={"email": "nobody-" + user, "password": "wrong"}) same = real.status_code == fake.status_code and real.text.strip() == fake.text.strip() print("PASS: real and unknown accounts get identical responses" if same else f"FAIL: enumeration. real={real.status_code} {real.text[:60]!r} unknown={fake.status_code} {fake.text[:60]!r}")Run it with your login URL and your own email.
Terminaluv run login_probe.py https://your-site.example/api/login you@yours.exampleThe field names (
email,password) and the URL need to match your app. Open the network tab in your browser, log in once, and copy the request's URL and JSON shape.
What good looks like
A 429 after somewhere between 5 and 20 failures, ideally per account and per IP, with a window that grows. And the same status code and body for 'wrong password' and 'no such account'. Both messages should be 'Invalid email or password'.
What failure looks like
25 requests in two seconds, all 401. That login will accept a breach list at whatever speed your server can serve.
And No account with that email versus Wrong password means an attacker can first build a list of which emails have accounts, then stuff only those.
If you use a hosted auth provider (Supabase Auth, Clerk, Auth0, Firebase), they rate limit for you; this probe confirms it rather than assumes it. If you rolled your own, you very likely failed this, and the auth mission has the fix in about thirty lines.
If it breaksThe login uses a form POST, not JSON + 1 more
The login uses a form POST, not JSON
json= to data= in both c.post calls. If it needs a CSRF token, fetch the login page first, extract the token and include it; or run the probe against your API login if there is one.I got locked out of my own account
Audit dependencies and scan your git history
The two findings that most often turn into a real breach live in your repo, not on your server.
So far you've checked the live site. Now check the code behind it, where outdated packages and old keys tend to hide.
In the project folder, run the audit for your stack. These read your lockfile and compare against the public vulnerability databases.
Terminal, inside the project# Node projects npm audit --audit-level=high npx --yes better-npm-audit audit # cleaner summary, same data # Python projects (uses your lockfile or requirements) uvx pip-audit uvx pip-audit -r requirements.txt # if you have no lockfile # Any project: what's outdated, regardless of known CVEs npm outdated uv pip list --outdated
Reading the audit
You want zero high or critical. One or two moderate in dev-only packages is normal and you can live with it for a week.
A critical in something that handles requests (a web framework, a parser, an auth library) is a today job: npm audit fix or bump the version in pyproject.toml and run your tests. The dependency mission goes deeper, including how to vet a package before adding it.
Scanning the git history
Even if no key is in the current code, one might be in a commit from eight months ago, and git clone fetches every commit.
Search your history for anything that looks like a key. The first block is for Windows PowerShell, the second for Mac or Linux.
Terminal, inside the project# Does your git history contain anything that looks like a key? git log -p --all -S "sk-" --oneline | Select-String -Pattern "sk-[A-Za-z0-9]{20,}" | Select-Object -First 5 git log -p --all | Select-String -Pattern "AKIA[0-9A-Z]{16}|ghp_[A-Za-z0-9]{36}|-----BEGIN (RSA|EC|OPENSSH) PRIVATE" | Select-Object -First 5 # Mac / Linux equivalents git log -p --all | grep -E "sk-[A-Za-z0-9]{20,}|AKIA[0-9A-Z]{16}|ghp_[A-Za-z0-9]{36}|BEGIN (RSA|EC|OPENSSH) PRIVATE" | headAny hit is a leak, even if you deleted the key in a later commit, even if the repo is private today (private repos become public, get forked, get cloned to laptops that get stolen).
The rule is simple: a key that has ever been in git is a key that needs rotating. Do that now if you found one; the secrets mission covers rotation properly and sets up the pre-commit hook so it never happens again.
The grep above is a quick pass. For a proper scan with 150+ patterns, run Gitleaks; it takes two minutes and finds the AWS keys and Slack tokens the grep misses.
TipAlso check your deployed site for a.mapfile or a client bundle that includes a server key:curl -s https://site/_next/static/chunks/main.js | grep -o 'sk-[A-Za-z0-9]\{20,\}'(adjust the path to your bundler). Keys in frontend code are public, full stop.
Check your storage buckets
Public buckets are the breach that makes the news because the data is already packaged for download.
Open storage is the fourth attack on the list, and you can test for it from the outside.
If your app stores uploads, exports or backups in S3, Google Cloud Storage, Cloudflare R2, or Supabase Storage, check each bucket from the outside, with no credentials.
Replace the names with yours and run each line. Each one prints just the HTTP status code.
Terminal (curl is built into Windows 10+, Mac and Linux)# Replace with YOUR bucket names. A 200 or an XML listing on a bucket you expected to be private is the finding. curl -s -o /dev/null -w "%{http_code}\n" https://YOUR-BUCKET.s3.amazonaws.com/ curl -s -o /dev/null -w "%{http_code}\n" https://storage.googleapis.com/YOUR-BUCKET/ curl -s -o /dev/null -w "%{http_code}\n" https://YOUR-PROJECT.supabase.co/storage/v1/object/public/YOUR-BUCKET/
Reading the result
A 403 is what you want. A 200 with an XML listing of keys means the whole bucket is enumerable.
A 200 on a specific known object URL is fine *if* that object is meant to be public (a logo), and a finding if it's a user's upload.
Check from the inside too
This is more reliable: open the bucket's permissions in the cloud console. For S3, 'Block all public access' should be on, and there should be no bucket policy with "Principal": "*".
For Supabase, a bucket marked Public serves every object to anyone with the path; anything user-specific belongs in a private bucket behind RLS policies, which the database mission sets up.
The pattern for serving private files is signed URLs: your server generates a URL that works for ten minutes for this user, and the bucket stays private. Every provider supports it; it's typically one function call.
Fill the scorecard and pick your worst three
A list of findings is noise. A ranked list of three is a plan.
You now have results from the baseline, the login probe, the audits and the buckets. This step turns them into one page you can act on.
Copy this into a file in your project (
SECURITY-BASELINE.md) and fill it in from the outputs you saved.SECURITY-BASELINE.md# Baseline, [site], [date] | Check | Result | Fix in mission | |--------------------------------|--------|----------------| | TLS version + cert expiry | | 3 | | Security headers (6) | | 3 | | Leaky Server / X-Powered-By | | 3 | | Exposed files (.env, .git...) | | 6 | | Admin / debug routes open | | 2 | | CORS | | 3 | | Login rate limit | | 2 | | Account enumeration | | 2 | | Dependencies: high/critical | | 10 | | Keys in git history | | 6 | | Storage buckets private | | 4 | Worst three, in order: 1. 2. 3.The last column tells you which mission in this track closes each line, so the scorecard doubles as your route through the course.
Ranking your worst three
Use one question to rank them: *if an automated scanner found this today, what happens?*
An exposed .env is a full compromise within the hour. A leaked key in git is the same with a slight delay. No login rate limit is account takeovers at the next breach dump.
Missing headers is a bad day only when combined with another bug. Missing CSP is the same. Leaky Server header is almost nothing on its own.
Fix the top one today if it's in the first three categories. The others can wait for their mission, but put a date on them: findings without dates become permanent.
Typical result for a hand-built Next.js or FastAPI app on first run: headers mostly missing, leaky header present, no login rate limit, a couple of moderate dependency findings, everything else clean. That's a sound starting position and about four hours of work across this track to make excellent.
Next mission: authentication done right. Passkeys, Argon2id, sessions versus JWTs, cookie flags, reset flows that don't leak, brute-force limits, and a straight recommendation between Supabase Auth, Clerk, Auth.js and rolling your own, depending on what you're building.
baseline.py after every mission. Watching lines flip from FAIL to PASS is the most motivating thing in security, and the script takes a minute.SECURITY-BASELINE.md exists in your repo with every row filled and three findings ranked, each with a date or 'done'.Your first wins
It works. Now do something with it.
Turn your scorecard into a plan with effort estimates
Paste the filled scorecard and your stack and ask:
Here is the security baseline for my own app: [paste scorecard]. Stack: [Next.js on Vercel with Supabase / FastAPI on a VPS behind Cloudflare / etc]. For each FAIL, tell me the concrete fix for my stack, how long it typically takes, and what breaks if I do it wrong. Order them by risk reduction per hour of work. Don't pad with generic advice.Explain a finding to a non-technical client or cofounder
When you need buy-in to spend the time:
Explain to a non-technical business owner, in under 150 words and no jargon, why their website having no rate limit on the login page is a problem, what could actually happen, how likely it is for a small business, and that the fix is about an hour of work. Be honest, not alarmist.Undo it cleanly
How to remove everything this mission installed.
Nothing was installed system-wide. Delete the site-baseline folder. The scripts only made ordinary HTTP requests to your own site; nothing was changed on the server.
If the login probe locked your account, wait out the lockout or reset the password. If you rotated a key, the old one is dead by design; update any service still using it.