QORMQORM v0.8.4 docs Get started

QORM Security Model

Target model vs. current implementation. This document describes QORM's target security model. What the current Go runtime already enforces: ed25519 "verify the artifact before running it" Bundle signing + content integrity (integrity takes precedence over signing); OTA updates require a trusted public key (--trust, otherwise rejected); key revocation bound to the actual verification key; the local server blocks cross-origin (CSRF/DNS-rebind) access to dangerous endpoints (/window eval, /update, /mcp); the /update source fetch refuses private / link-local / metadata destinations with redirects re-vetted per hop (loopback stays allowed for local development — see bundle-signing.md); mobile native capabilities are gated by system permission prompts, and generated projects derive Info.plist / AndroidManifest declarations from the widgets actually used. Not yet implemented (the targets described here; do not treat them as guarantees already in effect): a standalone runtime "capability approval layer" — that is, per-capability allowlist adjudication, an approval lifecycle (revocation/expiration), and "desktop native ops gated beyond the transport layer". Desktop native ops are currently not independently approved; the "security invariants" below are design intent, not currently enforced requirements.

QORM supports dynamic Bundles, Agent Patches, Host Capabilities, Plugins, and the Native Bridge, so the security model must be built in.

Security Goals

Trust Boundaries

Source JSON
Bundle
Runtime
Host Capability
Native Bridge
Plugin
Agent
Platform

Every boundary must be verifiable.

Decision Boundaries

Security Invariants

Bundle Security

A Bundle must contain:

bundleVersion
minRuntimeVersion
hash
signature
keyId
capability requirements
source manifest

The rules for signing, canonicalization, trust root, rotation, and revocation are governed by bundle-signing.md.

Agent Security

By default, an Agent can only inspect, validate, and preview. Write-class capabilities such as apply, host.call, and filesystem.saveFile, and deploy, must go through policy and any required approval.

The relationship between Agent permissions and system permissions is governed by agent/permissions.md and permission-model.md.

Host Capability Security

Every Host Capability must declare:

name
input schema
output schema
permissions
platform support
requires approval

Runtime permission priority, approval lifecycle, and audit rules are governed by permission-model.md and host-capability-spec.md.

Plugin Security

A Plugin requires:

manifest
permission declaration
sandbox strategy
version
signature

A Plugin can only narrow its own capabilities; it must not widen the scope allowed by host policy.

Web / Custom Client Security Boundaries

OTA Trust for Packaged Apps

A package built with --update-url MUST also carry --trust <key.pub> — the flags are enforced as a pair. The trust split is deliberate:

is trusted via its installation channel — store signing, TLS origin — the same channel that delivered the WASM runtime itself. It is not re-verified at boot.

from local storage where an earlier update persisted it) is verified with ed25519 against the embedded trust key before activation; a bundle that fails verification is discarded and the app falls back one tier (previous update → bundled payload). A failed update never touches the running app.

CLI Self-Update Trust

qorm update downloads a release binary only after verifying the release's SHA256SUMS manifest against an ed25519 signature from the keys embedded in the running binary, then checking the binary's own sha256 against that manifest. Missing or unverifiable signatures fail closed (--insecure-skip-verify is the explicit escape hatch); the embedded key list supports rotation by shipping old + new keys in a transition release.

A valid signature is necessary but not sufficient: the release's tag must also parse as a semver (X.Y.Z with an optional leading v) and be STRICTLY NEWER than the running version before anything is replaced. An equal or older tag — including a prerelease of the running X.Y.Z, which sorts older than the release — is reported as already up to date (or refused as a downgrade) and the binary is left untouched, so a compromised or misconfigured release endpoint cannot roll the CLI back to a stale, potentially vulnerable build by serving an old signed release. An unparseable remote tag fails closed the same way.

Prohibited Behaviors