Project-Template/docs/architecture/scripts
null 9667b46585 feat(security): preflight.sh, the live-URL checks
Four things auditors of applications of this kind report seeing over and over,
each of them mechanical: a header that is absent, a scheme that is plain, a
login that answers a thousand guesses, a reset form that confirms which
addresses have accounts. None needs understanding to be checked, which is why
they belong in a script rather than a page somebody re-reads before a release
and then does not.

*(precautionary)* -- none of it has bitten a project here. The checks are cheap
and the evidence is somebody else's.

**Passive by default.** A bare run sends two GETs and could not be mistaken for
anything. Rate limiting and enumeration are behind --auth, because one of them
deliberately generates a dozen failed authentications.

**It refuses any host but its configured origin.** There is no URL argument that
can point it elsewhere: the target is PREFLIGHT_ORIGIN, and a URL on the command
line must match it. status.sh makes this argument for having no --host flag;
here there is more at stake, since a mistake there reads the wrong machine and a
mistake here hammers somebody else's login form from your address. The login and
reset paths are configured too, never guessed -- a POST to an assumed /login on
the wrong app posts to whatever is actually there.

Verified: exit 2 unconfigured, for a foreign host, and for an unreachable one;
exit 0 for --dry-run; exit 1 with the finding named. Run passively against
privacyllc.dev it correctly reported a strong CSP, a framing policy and HSTS,
and found that plain http answers 200 with the full page rather than
redirecting -- which is the class of finding this exists for, on its first real
target.

closes #9

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-17 23:14:06 -05:00
..
audit-gate.mjs chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
backup.sh chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
check-env.sh chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
commit-mine.sh chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
controls.sh feat(ops): controls.sh, which controls this project actually has 2026-08-17 23:11:52 -05:00
dead-code.py chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
deploy.py chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
dev.sh chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
doc-claims.sh chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
doc-triggers.py chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
duplication.py chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
forgejo-issue.py chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
healthcheck.sh docs(template): the owner is _null 2026-08-17 22:47:56 -05:00
migrate.sh chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
preflight.sh feat(security): preflight.sh, the live-URL checks 2026-08-17 23:14:06 -05:00
prove-guard.sh chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
release-notes.mjs chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
release.sh chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
restore-check.sh feat(ops): restore-check.sh, the other half of backup.sh 2026-08-17 23:07:36 -05:00
scaffold.sh feat(docs): OPERATIONS.md, the runbook that did not exist 2026-08-17 22:57:20 -05:00
secrets.sh fix(secrets): the scanner printed the credential it found 2026-08-17 23:08:57 -05:00
status.sh chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00
verify.sh chore(repo): put the template under version control 2026-08-17 22:44:26 -05:00