Security
How this site is built to be hard to abuse, the threat model it assumes, and how to report a problem.
I build AI systems and I break them, so the site that talks about that work should hold up to a look under the hood. This page is the honest version: what runs, what could go wrong, what stops it, and how to tell me if something slips through. Every claim here is backed by code in this repository.
What the site is
The public pages are static files. They are built ahead of time and served straight off Cloudflare’s asset layer, so a normal page view runs no server code and touches no database. The only server is a small Hono API Worker, reachable at /api/* through a service binding on the same origin. There is no server-side rendering of public pages and no per-view database query, which keeps the attack surface small and the free tier safe.
Threat model
In scope:
- The API Worker and its routes, including the contact route that writes to the database.
- The contact form, which accepts input from anyone and also numbers ctf.exe victors when a message holds an unused one-time code from the game.
- The hidden CTF (
ctf.exe), which sends puzzle content to every visitor.
Out of scope, stated plainly: the security of Cloudflare, Neon and other providers themselves; attacks that need a stolen admin credential; and denial of service beyond what the free-tier limits below absorb. There is no login for visitors, so there are no visitor sessions to steal.
Controls
Every response, static or dynamic, carries the same header set. Static pages get the policy with the hashes of their inline scripts; API responses are JSON and get it without. One line each:
Content-Security-Policy-Report-Only: locks scripts, connections, framing and objects to the same origin, with one exception for scripts and connections: Cloudflare’s Web Analytics beacon host, used only when analytics is switched on. It runs in report-only mode today while I watch for false positives, and reports post to/api/csp-report; the plan is to flip it to enforcing once the report stream is clean. Two allowances are deliberate and run no code: inlinestyleattributes (style-src 'unsafe-inline', which the interactive islands set) anddata:images. There is nounsafe-eval: nothing on the site compiles code at runtime.Strict-Transport-Security: one year, including subdomains, so the browser refuses plain HTTP.X-Content-Type-Options:nosniff, so a file is only ever what its type says it is.X-Frame-Options:DENY, so no other site can frame this one (the CSPframe-ancestors 'none'says the same for modern browsers).Referrer-Policy:strict-origin-when-cross-origin, so paths never leak to other sites.Permissions-Policy: camera, microphone, geolocation, sensors, payment and the rest are all switched off.Cross-Origin-Opener-Policy:same-origin, so a popup cannot reach back into this page.Cross-Origin-Resource-Policy:same-origin, so other origins cannot pull these responses as resources.
No inline script is hand written. The build hashes every script Astro generates and fails if it finds an inline script it has not hashed, so the script policy can stay strict without an unsafe-inline escape hatch for scripts.
The API is small on purpose. The contact route accepts only JSON posts of at most 16 KB and refuses any browser that says, in its Sec-Fetch-Site header, that the post comes from another site (a script or a tool that sends no such header is not a browser on another site, so it meets the rate limits instead). It validates every field, drops anything that fills its hidden honeypot field, and is rate limited per IP through a Cloudflare binding; a new victor number is also limited to one per IP per minute, so a shared catchphrase cannot mint numbers in bulk, and all senders together are capped per day, which bounds what a bot farm can store. A failed database write is logged by error type only, never with what the sender typed. The CSP report sink takes only report content types, is rate limited the same way, and logs only the directive and the blocked URL, never the raw body. The free-tier budgets are themselves a control: static-first serving, no database on public views, and tight request limits make a denial-of-wallet attack cost the attacker effort without costing me money.
A worked example: the sealed CTF
ctf.exe is a hidden terminal game that arrives as sealed layers. Only the opening layer is in the bundle as plaintext. Every deeper layer is AES-GCM ciphertext whose key is derived with PBKDF2-SHA256 (200,000 iterations, a random salt and IV per layer) from the passphrase the player finds in the layer before it. The single flag is never in the source or the built bundle: it lives only inside the last layer’s ciphertext, and the game checks a submission against a SHA-256 hash. A build test greps the bundle for every secret and fails on a hit. The layers are not unbreakable: the passphrases are short enough that a determined offline attack on the ciphertext would get through eventually, and the sealing is tuned so that solving the game is faster than guessing, which is the right bar for a hidden game and the wrong bar for anything that matters. The design is the point; the answers are not here.
No shortcuts
Four guarantees about the public build, each held by a test:
- ctf.exe has no debug hook, query parameter, environment flag, hidden command or stored key that unseals, skips, reveals or scores a stage. The only way into a stage is its passphrase.
- The answer key and the walkthrough script never leave the repository: neither is bundled, copied to the public folder or included in the build.
- Eclipse Quest’s test hook exists only in development and test builds; the production bundle does not contain it.
- The contact form numbers a victor only for a one-time code the API itself signed. The game gets a code by proving it opened the last layer; each code works once, so a line passed to a friend numbers nobody. The secret behind the codes never appears on screen, in a response or in a log.
What is stored about visitors
Nothing, until you choose to send something. A page view stores nothing server side. If you send the contact form, the API stores exactly the name, email, optional LinkedIn link and message you typed, a timestamp, and, when your message holds the ctf.exe catchphrase, that you are a victor and your number, so I can reply and add you to the Hall of Fame. Your email and LinkedIn are never published; the public Hall of Fame reads a separate, curated file that has no email field.
If Cloudflare Web Analytics is switched on, its beacon counts page views in aggregate without cookies. The site sets no cookies of its own; your chosen mode, Motion setting and game saves stay in your own browser’s storage.
Reporting a problem
Found something? The machine-readable contact details live at /.well-known/security.txt. Mail me there with what you found and how to reproduce it. I read every report and I will not be annoyed; I will be grateful.
Changelog
- 2026-10: First version. Header set, build-time CSP hashing, the sealed CTF and its claim route.
- 2026-11: One-time codes replace the shared catchphrase: a victor line can no longer be reused or passed on.
- 2026-10: The CTF’s own claim form is gone: victors now send Lumi’s catchphrase through the contact form, which stores messages in one table.
- 2026-10: Old GitHub Pages URLs now 301 to their new homes from the web Worker. The CSP allows the Cloudflare Web Analytics beacon, which loads only when its token is set.
- 2026-10: API hardening after the first security audit: the contact route refuses cross-site posts, non-JSON bodies and bodies over 16 KB, new victor numbers are one per IP per minute, the CSP report sink is rate limited and logs fields rather than bodies, content link fields accept only http and https, and the leak test matches secrets regardless of case.
- 2026-10: Hardening after an adversarial pass: a daily cap on stored messages for all senders together, body limits counted in bytes even without a length header, a number clash never loses the message, database errors logged without what the sender typed, and the leak test now reads every tracked file, not just the site.
- 2026-10: No shortcuts: the four guarantees above, the catchphrase matched exactly, and Eclipse Quest’s test hook compiled out of production.