BaCheWork and records of a photonics research workhorse
Language

Keep the protections from silently failing: one checklist plus periodic re-checks

Setting up protections once isn't hard; the hard part is whether they are still there three months later. I wrote a baseline of protections for each type of public asset, use a script to re-check from the outside, record the date of each manual check, and flag any that have gone stale. Includes a prompt you can give an AI to build the same checklist.

Type
Essay
Published
2026-11-22
Updated
2026-11-22

Any item from the first five chapters could someday be broken by you: a character deleted by accident while editing a firewall rule, a header forgotten during a move to a new host, a new subdomain that didn’t get the rules applied, or two-step verification on the account turned off by someone. If nobody checks periodically, you won’t know.

So the last step is to make “whether the protections are still there” something you don’t have to remember to do.

Three things

Item Purpose Who changes it
Protection baseline What protections each type of public asset should have, and why Changed when the standard is adjusted
Check script Re-checks from the outside, automatically checking everything that can be checked automatically Rarely changed
Protection checklist The current status of each asset, ticked or crossed, with the most recent check time Generated by the program, never edited by hand

It matters that the checklist is never edited by hand: a hand-edited checklist turns into “I remember doing it,” not “it was checked just now and is still there.”

Baseline: written by asset type

I divide what’s public into nine categories and write the protections each one should have:

Asset type Examples
Accounts Accounts that can deploy the site or own the domain: 2FA, backup codes, expiry of deployment credentials (see chapter 2)
Domain DNS DNSSEC, SPF, DMARC, null MX, transfer lock (see chapter 3)
Public website HTTPS redirects, headers, scanning paths blocked, normal pages not blocked (see chapter 4)
Password-protected subdomains Returns 401 when locked; the unlock page has an attempt limit
Subdomains with program logic Only designed paths are open; the admin interface can’t be opened without logging in
GitHub Pages sites HTTPS enforced
Public GitHub repos Secret scanning, push protection (blocks you when you accidentally commit a key)
Dependencies The deployed program has no known high-risk vulnerabilities
Backups and detection Restore has actually been tested, and someone reviews firewall events (see chapter 5)

The benefit of writing by type is that when you open a new subdomain, you don’t have to rethink what to protect against; you just apply the items for its type. My rule: before a new subdomain goes live, first add a row to the checklist’s raw data (the checklist itself is generated by the program), then check it against the items for its type.

Automatic checks and manual checks

Anything that can be checked from outside goes to the script:

  • HTTPS redirects, and whether each header is present.
  • Scanning paths return 403 (positive control), and normal pages do not return 403 (negative control).
  • The three email records in DNS, and DNSSEC.
  • Whether password pages return 429 after repeated wrong guesses.
  • Whether secret scanning and push protection are enabled on public repos (checked with GitHub’s command-line tool gh).
  • Vulnerabilities in dependencies (npm audit, only for packages that go live).

Anything that can’t be checked from outside is confirmed by a person, with the date recorded:

  • Whether two-step verification is on for the account and backup codes are stored offline.
  • Whether the domain’s transfer lock and auto-renewal are on.
  • Whether a restore drill has been done.

Manually confirmed items are marked as expired if they haven’t been re-confirmed within 180 days. Account settings change and backup codes get used up; “I confirmed it six months ago” doesn’t mean it’s still true now.

Periodic re-checks

When more than 7 days have passed since the last check, my working environment reruns it automatically on startup; if a protection has failed, a warning shows up at a glance, so I don’t have to wait until something goes wrong.

You don’t have to automate it. The simplest version: save the check commands in a file and set a monthly reminder in your calendar to run them.

The checker needs checking too

A trap with check scripts: they can report “passed” when they actually checked nothing. For example, if a DNS query times out and returns an empty answer, the script might treat “no problem found” as “no problem.”

So my check script includes a set of self-tests: for most of the judgment logic, I feed it an input that is known to fail (for example, a check that should block but receives a status code other than 403), and confirm that it really judges that as a failure. Only after seeing it fire once do I trust its “no problem” result. Some items are not yet covered (DNSSEC, headers, secret scanning on public repos, dependency vulnerabilities, and a few others), and I’ll add them later.

If a query times out or errors, the script marks the item as “not checked” rather than passed; if a lookup succeeds but returns an empty answer, it honestly counts as “not met.”

Prompt: ask an AI to build a protection checklist for you

Paste the text below to your AI assistant (an agent-style AI that can read files and run commands works best), and replace <> with your own situation.

I want to build a "protection checklist" for the websites and accounts I make public, so I can re-check it regularly later. My situation:
- Domain: <your domain>, DNS hosted at: <for example Cloudflare>
- Websites and subdomains: <list each URL, noting which ones are password-protected>
- Accounts that can deploy the site or manage the domain: <for example Cloudflare, GitHub, Google>
- Public GitHub repos: <yes / no>

Please:
1. First ask me what else you need to know; don't assume everything at once.
2. List the protections each asset type should have (accounts, domain DNS, websites, password-protected subdomains, public repos, backups), and mark which ones can be checked automatically from outside and which ones only I can confirm manually.
3. For every automatic check, include a "deliberately failing" control, and when a result can't be determined, mark it "cannot determine" rather than passed.
4. First give me a draft checklist and the check commands you plan to use. Don't run checks that send fake passwords or large volumes of requests, and don't change any settings. I'll review it before deciding.