LuxelEspañol

Luxel v0.1 · Security · part 1 of 3

Luxel threat model

Status: Sprint 11 (2026-12-01), for VSA 0.9.0 and the packages at the Sprint 11 commit. Written for the external review (docs/security/review-pack/) and the red team (Sprint 11 report). Each mitigation names the test that checks it. This document makes no claim of conformance with OWASP or anything else.

1. What Luxel is, in one paragraph

A TSX view is compiled once into a public template, a slot map and a manifest (docs/spec/compiler-ir.md). Per request, luxel-host fills the template's slots with escaped text from the app's handlers and adds a resume block. The page loads one universal runtime (the same bytes for every app). The runtime resumes the painted page, writes values the server sends and sends events. POST /_luxel/event is the only endpoint that changes anything. The browser computes nothing and decides nothing, and it receives no code of the app (ASEF = 0).

2. Assets

AssetWhereWhy it matters
A person's data (balances, records, what they searched)App database; filled pages; state and event answersConfidentiality
The effect of an action (a payment, a change)App database, through defineEvent writesIntegrity; exactly once
SessionsSession store (only the hash of the id; the CSRF token is derived)Whoever holds a session acts as its user
View keys (LUXEL_VIEW_KEYS)Host environmentMint view and form tokens
Signing key (LUXEL_SIGNING_KEY)Build pipeline onlyA build signed with it is accepted by production hosts
The build (templates, manifests, runtime, handlers bundle)Host file systemWhat every visitor's browser runs and sees
Availability of the host and its stores—Rate limits, bounded work per request

3. Actors

ActorCapabilities assumed
Anonymous Internet userAny HTTP request, any body, any header except those a browser sets for a third-party page; many addresses (botnets)
A malicious web page visited by a signed-in person (CSRF)Makes the browser send requests with the person's cookies, within what browsers allow cross-site
A signed-in user acting against others (IDOR, escalation)A valid session of their own; full control of their own browser (they can read and send anything the page can)
A same-site sibling (another subdomain)Can set cookies for the parent domain, can make same-site requests
An agent producing dynamic surfacesWrites arbitrary JSON that luxel check judges (ADR-017)
Someone with write access to the deployed files, not to the signing keyChanges, adds or removes files on a host
A network attackerOut of scope behind TLS (the session cookie is __Host-…; Secure; TLS is the terminator's)
The operator and the host machineTrusted (see §7)

4. Trust boundaries

  1. Browser ↔ luxel-host. Everything from the browser is untrusted: path, headers, cookies, body. The browser receives no secret beyond its own session cookie (HttpOnly) and per-page tokens that are bound to the page.
  2. luxel-host ↔ app handlers. The gateway decodes and authorizes before a handler runs, and handlers return state paths, never HTML. Handler code is trusted app code.
  3. luxel-host ↔ stores (sessions, rate limits, replay guard, revocations, the app's database). The stores are trusted and shared between nodes. Keys are hashes.
  4. Build pipeline ↔ hosts. The build is signed (ed25519). A production host refuses any file that differs from the signed provenance (ADR-048).
  5. Agent ↔ luxel check. A dynamic surface is untrusted JSON; only what passes the grammar and the policies is projected.

5. Threats and mitigations, by component

5.1 Event endpoint (gateway)

ThreatMitigationTest
CSRF on a session view__Host- cookie SameSite=Strict; Origin must be this host; Fetch Metadata (when sent) must be same-origin; X-CSRF-Token derived from the session; custom header Avt and JSON content type force a preflight the gateway never grantstests/security/matrix.test.mjs, sprint9.test.mjs
Login CSRF on a static formOrigin AND Sec-Fetch-Site: same-origin required; Avt + JSON (preflight); single-use form token bound to view and buildsprint10.test.mjs (SEC-S10), red team
Session fixationNo session before sign-in (static); sign-in always rotates (new id, old one dropped); __Host- (no Domain)SEC-S10
Replay of an eventWrites: idempotency key claimed in the same transaction as the effect; reads have no effect (VSA 0.9); form tokens single usematrix.test.mjs, reads.test.mjs, SEC-S10
Replay of a form token after its nonce left the memory guardThe guard refuses when full instead of evicting (ADR-049)static-review.test.mjs
Token of another view, build, session or keyMAC over view, build (manifest hash + build digest), session binding, key id; expirysprint7.test.mjs, provenance.test.mjs
IDOR: an id of another userEvery id an event carries (param, select, row column) is re-checked by the app's scope function before the handler runs; another scope answers exactly like a missing idsprint7.test.mjs, authz-matrix.test.mjs, reads.test.mjs
Privilege escalation (role)Deny by default: every event has a policy; roles checked before the handlerauthz-matrix.test.mjs
A private view loaded by a role that should not see itEvery view declares load: allow([...]) or load: publicLoad() (LUXEL-E058 otherwise); the roles are checked before every page and state load (Sprint 12, S12-5)s12-debt.test.mjs
Stale writesState version compared under lock in the write's transactionmatrix.test.mjs
A read that writesNo event id; read-only context and connection; LUXEL-E055 at build, and at run time reading a read's event id throws (Sprint 12)reads.test.mjs, s12-debt.test.mjs
Malformed or hostile bodyClosed grammar (unknown fields refused), bounded sizes and counts, no prototype keys at any depth, plain text onlywire-fuzz.test.mjs, differential fuzzing (SEC-FUZZ-DIFF)
Edit this page on GitHub

This page: 7.9 KB of JavaScript (Luxel's shared runtime), 0 KB from your app.

Measured when the site is built: the runtime files this page loads, compressed as they are sent.

Made by IntiOps. Luxel 0.1.0-beta.1 is a beta: no external security review yet.