Skip to content

Security measures

Area Measure Marker
Accounts Registration only by invitation; admins only by operator command [E]
Passwords scrypt with a random salt per player, compared in constant time (kept from version 1); 6 to 200 characters [E] kept, [V] maximum
Sessions 32 random bytes in an HttpOnly, SameSite=Lax cookie, Secure with an https address; only the SHA-256 is stored; expiry NOVA_SESSION_DAYS [V]
Invitations single-use, expiring, hashed, in the URL fragment [E]/[V]
Cross-site requests posts must be JSON and come from NOVA_PUBLIC_URL (Origin); a post without Origin is refused like a foreign one (a browser sends it on every fetch post, only scripts outside the page leave it out); no CSRF token: the cookie is SameSite=Lax, and a token would not stop a player who scripts his own account (issue #328) [E] (owner, 2026-11-19), [V] first rule
Scripted play game actions (POST /api/action) and play time reports (POST /api/playtime) share one limit per account of 120 per minute, a fixed window like the other limits, admins included; every one counts, refused ones too, the activity ping and GETs do not; above it the action is refused with „Zu viele Aktionen in kurzer Zeit. Bitte warte einen Moment.“ ([V]) and the audit log gets one entry per account and hour (game / rateLimit, outcome „Abgelehnt“); the value is fixed in src/server/http/action-limit.ts, no setting (issue #328) [E] (owner, 2026-11-19)
Scripted reads, oversized bodies the reads of a signed-in account (GET /api/state, GET /api/news, POST /api/activity, POST /api/passkeys/list, the push keys and subscriptions) share a limit of their own, 120 per account and minute, a fixed window, separate from the 120 actions; above it „Zu viele Aktionen in kurzer Zeit. Bitte warte einen Moment.“ and the same audit entry per hour (READS_PER_MINUTE, src/server/http/action-limit.ts). A body over 64 KiB is answered once with 413, the rest is not read and the connection is closed (BodyTooLarge, src/server/http/request.ts); formerly it was read until the request timeout (issue #621) [V] (audit of 2026-12-01; the 120 are a proposal)
Brute force rate limit per client address on login, registration, invitation check [E] kept from version 1, configurable
Client address only Caddy’s X-Real-IP with NOVA_TRUST_PROXY=1; Caddy reads X-Forwarded-For only from trusted proxies [V]
Browser CSP default-src 'none', scripts and styles only from the own host, no inline code; X-Frame-Options DENY, nosniff, no-referrer, COOP, CORP, permissions policy [E] Caddy like muffelblog, [V] values
Output every text of players goes through HTML escaping in the client; the places that write HTML into the page are an exact list (html-sinks.json, tested and linted); a link of a guild profile has rel="nofollow noopener noreferrer ugc" and opens in a new tab (#623) [E] kept, [E] links (owner, 2026-12-01), [V] list
Policy reports the CSP has report-uri /api/csp-report: the browser’s violation reports go to the error log as entries without a player (action csp, address without query and fragment, scrubbed, merged per day), no session needed, 10 a minute and 200 a day per address, exempt from the check of the origin (the browser sends application/csp-report); report-to is not used [V] [V] (#623)
Input body limit 64 KB, JSON objects only, numbers clamped, names cleaned of control characters [E] kept
Files static files only below the client folder [E] kept
Database prepared statements only; foreign keys; transactions [V]
Error log Server errors, browser errors and problem reports are scrubbed before storing (no passwords, tokens, login codes, email addresses; never request bodies); browser errors only from signed-in players, 20 per minute and 200 per day, reports 5 per hour; list and ZIP download for admins only, audited as admin reads; kept 30 days (issue #126, Error log) [E], [V] rules
Secrets from files (NAME_FILE), both ways set = no start; nothing secret in the repository (gitleaks in CI) [E]
Containers non-root, read-only root, no capabilities, no-new-privileges, only Caddy published on 127.0.0.1 [V]
Supply chain lockfile, pnpm audit (high blocks), Renovate with 3 days of waiting, CodeQL, Trivy, pinned CI images [E] like muffelblog
  • [U] No HSTS from the game: it belongs to the reverse proxy that knows about HTTPS (as decided in muffelblog), documented in docs/operations.md.
  • The minimum password length stays at 6 like version 1; a longer minimum is an open point.
  • No account lock-out per name, only the limit per address.