schliewe.systems

$ cat /etc/security-headers

Security headers

This is exactly what the site sends on every response, read from the same data next.config.mjs uses to set it. One source of truth lives in src/lib/security-headers.js: change a value there and both the real headers and this page change together. The raw data is at /api/headers.

Content-Security-Policy

The CSP arrives as a single header; below it is split into directives so each can be explained. Each is marked strong (it blocks a whole class of attack), info (an allowlist that narrows where resources come from), or weak (a deliberate concession). Verbatim, the header is:

Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' data:; connect-src 'self' https://ref.lookit.space https://api.pwnedpasswords.com https://registry.npmjs.org; frame-src https://ref.lookit.space https://www.youtube-nocookie.com; worker-src 'self' blob:; object-src 'none'; base-uri 'none'; form-action 'self' https://ref.lookit.space; frame-ancestors 'none'; require-trusted-types-for 'script'

One directive is weak: script-src. The one weak directive. It keeps 'unsafe-inline' because every page here is prerendered and Next streams its hydration payload as inline scripts; a per-request CSP nonce needs request-time rendering, which the read-only static-asset cache on the Worker cannot do. 'unsafe-eval' is gone (no component evaluates a string); 'wasm-unsafe-eval' stays only for the in-browser WASM engines (YARA-X, QuickJS and the FarmMind Auto-Draw model). Trusted Types, enforced below, is what keeps this from being a free pass for injected markup.

Trusted Types is enforced: require-trusted-types-for 'script' makes DOM XSS sinks reject plain strings, so injected markup cannot become executable script even though inline scripts are allowed. With object-src 'none', base-uri 'none' and frame-ancestors 'none', the usual escalation paths stay closed.

DirectiveValueWhat it stopsStrength
default-src'self'Fallback for any fetch without its own directive: only same-origin resources load, so an injected URL cannot pull in a remote script, image or font.strong
script-src'self' 'unsafe-inline' 'wasm-unsafe-eval'The one weak directive. It keeps 'unsafe-inline' because every page here is prerendered and Next streams its hydration payload as inline scripts; a per-request CSP nonce needs request-time rendering, which the read-only static-asset cache on the Worker cannot do. 'unsafe-eval' is gone (no component evaluates a string); 'wasm-unsafe-eval' stays only for the in-browser WASM engines (YARA-X, QuickJS and the FarmMind Auto-Draw model). Trusted Types, enforced below, is what keeps this from being a free pass for injected markup.weak
style-src'self' 'unsafe-inline'Inline styles are allowed for the React-rendered chrome (the strip, terminal and matrix rain). Weaker than a nonce, but CSS cannot execute script and Trusted Types does not govern style attributes.info
font-src'self'Fonts (Temple8, JetBrains Mono) load only from this origin; no third-party font CDN is contacted.info
img-src'self' data:Images come from this origin or data: URLs (the OG image and inline canvas); an injected tag cannot beacon out by loading a remote image.info
connect-src'self' https://ref.lookit.space https://api.pwnedpasswords.com https://registry.npmjs.orgAllowlist for fetch, XHR and WebSocket: this site, ref-radar's feed and search, Have I Been Pwned's k-anonymity prefix API, and the npm registry for the diff guard. Nothing else can be contacted.info
frame-srchttps://ref.lookit.space https://www.youtube-nocookie.comOnly ref-radar's /radar and /universe views and the FarmMind page's YouTube videos may be embedded; no other site can be framed in. The videos use YouTube's privacy-enhanced nocookie host, and each player loads only after a click on its self-hosted poster, so a page view contacts no Google server.info
worker-src'self' blob:Web Workers come from this origin or blob: URLs (the Forge and QuickJS playgrounds); a remote worker cannot be spawned.info
object-src'none'No plugins (Flash, Java, PDF embeds) may load at all, closing a classic execution and clickjacking vector.strong
base-uri'none'An injected <base> tag cannot rewrite where relative URLs and form actions point, closing base-tag hijacking of script loads.strong
form-action'self' https://ref.lookit.spaceForms may submit only to this origin or ref-radar; an injected form cannot post stolen data to an attacker's host.strong
frame-ancestors'none'CSP's own clickjacking rule: no ancestor may frame these pages. It duplicates X-Frame-Options for browsers that only honour CSP.strong
require-trusted-types-for'script'Trusted Types is enforced: DOM XSS sinks (innerHTML, script URLs, eval-like sinks) reject plain strings, so injected markup cannot become executable script even where inline scripts are allowed.strong

The other headers

Six more headers go out on every response, each with a fixed value. They cover framing, MIME types, referrers, device permissions and cross-origin isolation.

HeaderValueWhat it stops
X-Frame-OptionsDENYStops clickjacking: no other site may put these pages in a frame, so a transparent overlay cannot trick a click.
X-Content-Type-OptionsnosniffStops MIME confusion: a browser will not reinterpret a response as a different, executable type than the one declared.
Referrer-Policystrict-origin-when-cross-originKeeps paths and query strings out of the Referer sent to other origins; cross-origin requests carry only this site's origin.
Permissions-Policycamera=(), microphone=(), geolocation=()Turns off the camera, microphone and geolocation APIs so an embedded frame or an injected script cannot reach them.
Cross-Origin-Opener-Policysame-originIsolates this browsing context: a cross-origin window cannot reach window.opener, closing tab-nabbing and cross-window attacks and enabling cross-origin isolation.
Cross-Origin-Resource-Policysame-originStops other origins from loading this site's pages and assets as subresources, limiting cross-origin data leaks such as Spectre-style reads.

HSTS (Strict-Transport-Security) is deliberately not sent by the app: WebKit honours it even on http://localhost and would pin local checks to https. It is set in Cloudflare instead (SSL/TLS -> Edge Certificates -> HSTS), where it only ever sees HTTPS.

The same headers protect the Forge and every other page here.