Skip to content

v1.12.0 — Pre-launch security hardening

Choose a tag to compare

@ecamuto ecamuto released this 29 Jul 13:10
· 66 commits to main since this release
625e94e

Remediation of every Critical and High finding from the pre-launch audit (#42). Each fix was reproduced as a working exploit first, then re-verified as blocked.

⚠️ Breaking — read before upgrading

  1. SECRET_KEY is now required in every environment, minimum 32 characters. The previous check only fired when ENVIRONMENT=production, which docker-compose.yml never set — so the documented Docker quickstart shipped a signing key published in this repository. Generate one:
    python3 -c "import secrets; print(secrets.token_hex(32))"
    ALLOW_INSECURE_SECRET_KEY=1 skips the check for throwaway local runs only.
  2. Self-registration is off by default. POST /api/auth/register returns 403 and OAuth signs in existing users without provisioning new ones. Set ALLOW_OPEN_REGISTRATION=1 to restore the old behaviour — note that self-registered accounts now get the read-only viewer role instead of tester.
  3. POSTGRES_PASSWORD is required by docker-compose.yml; the weak thorotest fallback is gone.

Two migrations apply automatically (b9e4d7c15a83, c1f6b2a34d70). Existing API tokens keep working — token_version is backfilled from the owner — but they now expire and follow that user's revocation.

Security

  • Open self-registration closed. Any anonymous caller could previously create a write-capable account with full read access to the workspace.
  • ws/runs/{run_id} now authenticated. It streamed live run state to anyone who guessed a run ID; ws/notifications also gained the token_version revocation check it was skipping. REST, WebSocket, and GraphQL now share one token decoder instead of three that had already drifted.
  • API token scope is enforced. A token labelled read carried its owner's full write access. Tokens now also expire (API_TOKEN_EXPIRE_DAYS, 90 by default) and are revoked when their owner logs out everywhere or resets their password. Any role can mint its own token, so a CI credential no longer has to be an admin token.
  • Per-user SMTP settings removed. They let any authenticated user point the server at an arbitrary host:port, and stored a relay password in plaintext that GET echoed back. Mail now uses the operator-configured relay; migration b9e4d7c15a83 clears stored credentials.
  • SSRF guard applied to per-user Slack webhook URLs, which bypassed the guard added in 1.11.0.
  • Untrusted XML parsed with defusedxml. A ~1 KB entity-expansion document inside the 10 MB import limit could exhaust server memory. Artifact zips are now bounded per member and in total.
  • OAuth confirm-link no longer returns an uncaught 500 for provider-only accounts (which permanently blocked linking a second provider), and is throttled against password guessing.
  • Rate-limit stores bounded. Login, AI, and 2FA counters pruned timestamps but never removed keys, so rotating IP or email grew them without limit.
  • Container runs as a non-root user, builds from requirements.lock, and a .dockerignore keeps .env and local databases out of the build context.

Added

  • Responsive layout below 900px with a collapsing nav drawer; skip link, visible focus rings, prefers-reduced-motion, and button semantics on interactive rows, chips, and cards.

Fixed

  • README described password hashing as sha256_crypt; it has been argon2id since 1.10.0.
  • CLI docs used the tt_ token prefix; the real prefix is th_.

Full details in CHANGELOG.md.

🤖 Generated with Claude Code