A Website That Asks for Nothing - Reader

C:\Desktop\Articles\

A Website That Asks for Nothing

The security model behind this site is mostly subtraction. Remove what an attacker would use, then have the browser enforce what is left.

4 min read

Contents

Most web vulnerabilities need one of three things: somewhere to put input, a session worth stealing, or a server willing to do work on a stranger’s behalf. This site has none of them. That is not a clever defense. It is the absence of a target, and it is the cheapest security control there is.

What follows is the whole model, so that anyone can check it rather than take it on trust.

What is not here

RemovedWhat it would have made possible
Forms, comments, search requestsInjection, spam, stored XSS
Accounts and cookiesSession theft, CSRF, credential stuffing
Server-side code and databasesRemote code execution, SQL injection, SSRF
Analytics and third-party scriptsSupply-chain compromise, visitor tracking
Web fonts and CDNsThird-party outages and referrer leaks

Every page is a file that was rendered before you asked for it. The edge server’s only job is to hand it over.

What the browser is told

Static files can still be abused if a browser is willing to run whatever turns up in them, so the response headers say exactly what this site uses and forbid the rest.

http
Content-Security-Policy: default-src 'none'; script-src 'self'; style-src 'self';
  img-src 'self'; manifest-src 'self'; base-uri 'none'; form-action 'none';
  frame-ancestors 'none'; object-src 'none';
  require-trusted-types-for 'script'; trusted-types 'none';
  upgrade-insecure-requests
Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Resource-Policy: same-origin
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff

A few of those lines carry more weight than the others.

  • default-src 'none' starts from zero. Scripts, styles and images are then allowed from this origin only. There is no connect-src, so the page cannot make a network request of its own even if it wanted to.
  • There is no 'unsafe-inline' anywhere. The site has no inline scripts, no inline styles and no style attributes, which means an injected snippet has nothing to hide among.
  • form-action 'none' means that even a form smuggled into a page could not submit anywhere.
  • trusted-types 'none' removes the DOM’s HTML-string sinks. The one script on this site builds elements by hand and never touches innerHTML, so nothing breaks, and that whole class of DOM XSS is closed.
  • frame-ancestors 'none' and the cross-origin headers keep the site out of other people’s frames and windows.

The one script and one stylesheet are also loaded with Subresource Integrity hashes. If either file were altered between the build and your browser, it would not run.

What the build refuses

Policy that depends on remembering is policy that fails eventually, so the build checks itself. After the pages are generated, an audit script reads every one of them and stops the deployment if it finds any of the following:

  1. An inline script, an inline style, or an event-handler attribute.
  2. A script, stylesheet, image or frame loaded from another origin.
  3. A form, an input that submits, or an embedded object.
  4. A published image that still carries EXIF metadata, such as the GPS position of the camera.
  5. An article with a tag that is not in the registry.

Markdown is rendered with raw HTML switched off, so an article cannot introduce markup the templates did not intend.

The one thing that comes from outside

The desktop has a window listing vulnerabilities that are being exploited right now, taken from CISA’s Known Exploited Vulnerabilities catalog. That is outside data, so it gets the treatment outside data deserves.

Your browser never asks CISA for anything. The file is downloaded once, when the site is built, from one of two allow-listed addresses. Each record has to match a strict pattern before it is used, anything that does not is discarded rather than repaired, and what survives is written into the page as plain text. If the download fails, the site is published without that window. The policy above did not have to change by a single character to make room for it.

What is left

Removing the application does not remove the risk. It moves it to the places that can still change what visitors receive:

  • The accounts. Whoever controls the Git repository, the hosting account or the domain’s DNS controls the site. Those three logins matter more than every header above, and they deserve hardware-backed MFA.
  • The build. The generator is a single pinned binary with no plugin ecosystem to poison. That is a small supply chain, not an empty one.
  • The author. Nothing here stops a writer from publishing something they should not have. Photo metadata is handled automatically; judgment is not.

Check it yourself

You do not need to believe any of this. Ask the server:

bash
curl -sI https://syben-moscicki.com/ | grep -iE 'content-security|strict-transport|cross-origin'

Then open your browser’s network panel, load any page, and count the requests that leave this domain. The number should be zero.