David Dashti
Colophon
How this site is built, and how it is secured. I work on product security for regulated medical software, so it seemed fair to show the same practices applied to something of my own rather than only describe them.
Everything below is checkable. The response headers are visible to anyone who looks, and the pipeline that produces them is in the public repository.
What it is built with
- Frontend
- Vue 3 and TypeScript, pre-rendered to static HTML at build time and served from Vercel. Pages arrive complete rather than assembling themselves in the browser.
- Backend
- FastAPI and PostgreSQL on Fly.io. It holds the content and serves the private admin API. The public pages are plain static files carrying the content baked into them at build time.
- Content
- Edited through a private admin interface, stored in Postgres, and baked into the static pages by a build. Publishing is therefore a rebuild of the current code: content passes the build-time page checks and a post-deploy header check, while code changes get the full pipeline.
What the browser is told
Response headers are the cheapest security control there is and the easiest to leave half-configured. These are set deliberately and tested.
- Content Security Policy
- Scripts may load only from this origin, plus two SHA-256 hashes covering the only two inline scripts the site ships. Styles are locked the same way — stylesheet files from this origin plus two pinned hashes, one for the offline page and one for the theme switcher’s transition guard, with no blanket inline allowance for either. Inline event handlers are refused outright, as are plugins, framing, and any attempt to rewrite the document base or post a form elsewhere.
- Hash drift
- Every hash in the policy is recomputed from the source on each test run, and the built pages are scanned for styling the policy would not cover. A reformatted script, an edited style block or a stray style attribute fails the build instead of silently breaking the page in production, which is the usual way hash-based policies rot.
- Transport
- Strict transport security for a year, covering subdomains, and the domain is on the browser preload list: submitted on 4 September 2026, and shown as preloaded by hstspreload.org when checked on 20 October 2026. A browser that carries the list refuses plaintext here even on its very first visit, before a single request is made.
- The rest
- Framing denied, MIME sniffing off, referrers trimmed across origins, and camera, microphone, geolocation, payment, USB and the motion sensors all switched off for the page and anything it embeds, and videos and maps load from their providers only after a click.
The private half
One person can sign in here. That makes the account worth protecting rather than not worth bothering with.
- Sign-in
- GitHub OAuth against a single permitted account. There is no password to phish, guess or leak.
- Sessions
- Cookies only — HttpOnly and SameSite, never readable by JavaScript. The working credential lasts thirty minutes; the renewal credential is replaced every time it is used.
- Stolen-token handling
- Replaying an already-used renewal token is treated as theft, per RFC 6819, and revokes every renewal credential for the account at once, so no session outlives the thirty-minute working credential it already holds. A brief window is carved out for the harmless case of two browser tabs renewing simultaneously, so ordinary use is not mistaken for an attack.
- Abuse limits
- Requests are rate limited per client address, an IPv6 client per /64, and no handler reads past the size cap: a body declared too large is refused before any handler runs, one streamed past the cap is cut off there and refused, and one that arrives too slowly is dropped.
What goes into a build
Most realistic attacks on a site like this arrive through its dependencies or its pipeline, not its pages.
- Pinned actions
- All fifteen third-party build steps are pinned to an exact commit, never a moving tag. A script in the pipeline re-checks every pin against the version written beside it and fails if the two disagree — because a stale comment beside a correct hash is how a pin quietly stops meaning anything.
- Verified dependencies
- Every Python package in the backend image and in its two test jobs is installed only if its hash matches a value committed to the repository, the installer included, so the tool doing the verifying is verified too. The site’s JavaScript packages and the deploy tool install from committed lockfiles. The lint hooks that check each push are pinned by version, not by hash.
- Scanning
- Every change gets static analysis, a vulnerability scan of the tree, a review of any dependency it adds, a supply-chain posture score, and a secret scan of the diff. The scanner binary is itself checksum-verified before it is trusted to run. Findings are triaged rather than left to accumulate.
- Gates
- Code reaches production only from main and only through the pipeline, and each half waits on its own checks: the frontend on its unit tests, browser tests, a run under the real security policy and a performance and accessibility budget; the API on its lint and unit tests. Both also wait on the action-pin check, a secret scan and a review of any dependency the push adds, and every push gets a vulnerability scan. Content edits are republished by a one-click rebuild of the current code, which runs the build-time page checks and a check of every security header, not the test suites.
Backups, and evidence they work
An untested backup is a belief, not a control. This is the part most personal sites skip, so it is the part worth showing.
- Nightly, encrypted
- The database is dumped every night and encrypted to a public key before it is stored. The matching private key is kept outside the build and hosting systems and never reaches the machine that runs the backup, so the backup process cannot read its own output.
- Rehearsed, not assumed
- A restore checklist is filed automatically every quarter. It has been carried out: the archive was decrypted, restored into a disposable database with zero errors, and its row counts matched production exactly.
- When something went wrong
- That rehearsal also caught a stored key being unusable, and diagnosing it exposed the private key: the key was rotated, every backup encrypted to the old one was deleted, and the whole drill was run again on a fresh backup the same week (September 2026). Drills earn their keep on the days they fail.
Where it falls short
One person builds, reviews and deploys this site. There is no second reviewer, so review pressure comes from the pipeline — tests, scanners, budgets — rather than from another human, and the dependency chain ultimately rests on trusting GitHub, PyPI and npm, as everyone's does. Those are the honest limits of a personal site. An earlier version of this section also admitted that the style policy still allowed inline styles; that gap was closed on 4 September 2026, which is the outcome this section exists to force.
Reporting something
If you find a problem here, there is an RFC 9116 security.txt with contact details. Reports are welcome, including the small ones.
Claims on this page last verified against the live site on 27 November 2026, unless a claim gives its own date.
Back to Portfolio