Skip to content
MATRIX_OS

THREAT MODEL

Security architecture

This page documents how the application defends itself. Statuses are honest: a control is only marked implemented when it exists in the codebase, and planned work is labelled as planned.

DESIGN PRINCIPLES

  • Deny by default. Access is granted explicitly, never assumed.
  • The database is the authorization boundary. A browser cannot reach a row that policy forbids, regardless of what the interface requests.
  • The route guard is user experience. Every mutation independently re-checks the administrator role on the server.
  • Collect nothing that is not needed. There is no visitor tracking of any kind.
  • The interactive surface is a simulation. No visitor input is ever executed as code or as a query.

EXPLICIT NON-CAPABILITIES

  • No shell, command execution, subprocess, or dynamic code evaluation anywhere.
  • No scanning, probing, or any outbound request against third-party systems.
  • No exploit code, offensive tooling, or credential-handling utilities.
  • No public registration path, and no way to obtain a role from the browser.
  • No privileged key, service credential, or environment secret in client code.

IDENTITY

  • IMPLEMENTED

    ADMIN AUTHENTICATION

    Email and password through the managed auth provider. No custom password hashing, no passwords stored in application tables.

  • IMPLEMENTED

    PUBLIC REGISTRATION DISABLED

    There is no sign-up route, form, or endpoint in the application. The single administrator is provisioned out of band.

  • IMPLEMENTED

    MULTI-FACTOR AUTHENTICATION

    Time-based one-time password enrollment and challenge. The admin console refuses to render until the session reaches the verified assurance level.

  • IMPLEMENTED

    ACCOUNT ENUMERATION RESISTANCE

    Sign-in and recovery responses are generic and never confirm whether an address is registered.

  • IMPLEMENTED

    SESSION HANDLING

    Provider-managed sessions with refresh. No custom bearer tokens, no credentials in local storage.

AUTHORIZATION

  • VERIFIED

    ROLE STORAGE SEPARATION

    Roles live in a dedicated table, never on a profile row and never in user metadata, so a client cannot grant itself privileges.

  • VERIFIED

    DATABASE ROLE CHECK

    A security-definer function resolves the administrator role; every write policy is gated on it.

  • VERIFIED

    ROW LEVEL SECURITY

    Enabled on every table in the exposed schema, deny by default. Visitors read published rows only.

  • VERIFIED

    EXPLICIT GRANTS REVIEWED

    Visitors hold read privileges only. No insert, update, or delete privilege is granted to anonymous callers on any table.

  • IMPLEMENTED

    SERVER-SIDE AUTHORIZATION

    Every mutation re-checks the administrator role server-side before touching data. The route guard is user experience, not the security boundary.

  • IMPLEMENTED

    FAIL-CLOSED BEHAVIOUR

    Missing, expired, or unverifiable authorization state denies access rather than degrading to a permissive default.

APPLICATION

  • IMPLEMENTED

    SERVER-SIDE INPUT VALIDATION

    Schema validation on every mutation boundary: type, length, allowed values, and URL protocol.

  • IMPLEMENTED

    FIELD ALLOWLISTING

    Editable columns are enumerated per table, so identifiers, timestamps, and role columns cannot be mass-assigned from a browser payload.

  • VERIFIED

    OUTPUT ENCODING

    All content renders as text nodes. dangerouslySetInnerHTML appears nowhere in the codebase.

  • IMPLEMENTED

    URL PROTOCOL FILTERING

    Only http and https links are rendered. javascript: and data: URLs are rejected before reaching the DOM.

  • VERIFIED

    TERMINAL COMMAND ALLOWLIST

    No interpreter, no shell, no eval, no dynamic code execution, no user-supplied query. Input is matched against a fixed command map.

  • IMPLEMENTED

    INJECTION PREVENTION

    All database access goes through parameterised client APIs. No query is assembled from user input.

  • NOT APPLICABLE

    SERVER-SIDE REQUEST FORGERY SURFACE

    The application exposes no URL fetcher, proxy, ping, or scan endpoint. Lab data is fictional and local.

OBSERVABILITY AND PRIVACY

  • IMPLEMENTED

    ADMIN AUDIT LOG

    Create, update, publish, and delete events are recorded with timestamp, event type, resource, and actor. Metadata only.

  • VERIFIED

    AUDIT LOG ISOLATION

    Audit records are unreadable by anonymous callers and cannot be edited or deleted by anyone.

  • IMPLEMENTED

    DATA MINIMISATION

    No visitor accounts, no tracking, no analytics, no fingerprinting, no advertising scripts, no third-party JavaScript.

  • VERIFIED

    SECRET HANDLING

    Only the publishable key reaches the browser. Privileged credentials are never imported into a client-reachable module.

  • IMPLEMENTED

    GENERIC ERROR RESPONSES

    Visitors receive generic failures. Database and infrastructure detail is not surfaced in the interface.

PLANNED

  • PLANNED

    CONTENT SECURITY POLICY

    Restrictive CSP with frame-ancestors none, plus nosniff, Referrer-Policy, Permissions-Policy and HSTS, delivered as real response headers.

  • PLANNED

    CONTACT PIPELINE

    Server-validated contact intake with rate limiting, bot protection, and a defined retention window.

  • PLANNED

    AUTHENTICATION RATE LIMITING

    Application-layer throttling on sign-in and recovery beyond the provider defaults.

  • PLANNED

    FILE UPLOAD PIPELINE

    Admin-only uploads with extension and detected content-type allowlists, size caps, and server-generated object paths.

  • PLANNED

    AI RECRUITER ASSISTANT

    Read-only retrieval over an explicitly approved public knowledge base, with prompt-injection containment and rate limiting.

  • PLANNED

    AUTOMATED SECURITY TESTS

    Executable negative-authorization suite covering anonymous and non-admin mutation attempts.

RESPONSIBLE DISCLOSURE

If you believe you have found a weakness in this application, please report it privately rather than testing destructively. Automated scanning, brute force, denial of service and any attempt to access another person's data are out of scope and not welcome.