Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Security boundaries

This page describes the current implementation in packages/. It separates authentication from confidentiality so the guarantee stays precise.

Account root

Account creation generates an Ed25519 root key. The private key is encoded as the gsr_ recovery key and shown to the user. The control plane receives the public key.
The root key signs browser authority. An account-wide delegating browser can approve a machine grant without copying the root key to that machine. Possession of the recovery key is account-root authority: it enrolls a browser and can confirm any action that asks for a passkey.
GitSpace does not store the recovery key and cannot restore it. Keep it outside source control, chat, workspace notes, and browser screenshots.

Passkeys

A passkey is a WebAuthn credential bound to the account host, requiring user verification (biometric or the security key's PIN). Its registration (credential id, public key, host, origin) is signed by the device key of the browser that enrolled it, which must be an account-wide delegating browser. GitSpace stores the public key and the signed registration, never a secret.
Passkey sign-in on a new browser: the account issues an invitation naming the new browser's device key, valid two minutes, and the passkey signs its hash. The registration and the assertion travel in the device grant, so every verifier, including machines, checks the passkey's signature itself. GitSpace's servers hold no key that can mint a device.
Sensitive actions take a step-up: a passkey assertion over a one-time challenge naming the exact action and its targets, for one browser, expiring after two minutes. Enrolling or revoking a passkey, creating a browser invitation link, and opening or answering a secure-input request need one. The recovery key can sign the same challenge instead. Revoking a passkey stops its sign-ins and step-ups; browsers it already connected stay until revoked. See docs/PASSKEYS-DESIGN.md in the repository.

Machine identity

gitspace machine setup --pair <token> creates separate Ed25519 signing and X25519 key-exchange keys on the computer. It proves possession of the signing key before the browser can approve the request.
The browser signs a grant naming the account, machine, public keys, generation, allowed capabilities, and approving device. The grant carries the root/device proof chain. Verification also checks the canonical issuer's revocation and expiry state. Revoking that authority can invalidate a dependent machine grant.
Pairing tokens expire after ten minutes and cannot bind a second set of machine keys. A claimed machine can retry retrieval with a fresh signature until the original expiry. The machine receives only its own enrollment configuration, not the account root private key.

Browser identity

Account creation or recovery in the web page creates a short-lived signed browser invitation; passkey sign-in has the passkey sign one. The browser creates a non-extractable Ed25519 key in IndexedDB and redeems the invitation for a device grant. The account root key is not persisted in browser storage.
Browser RPC requests are signed. Verification binds a request to the enrolled device and detects changes to the signed request.
Private workspace-service browser sessions require rpc.write, not just rpc.read. The Worker checks that authority when approving access and when validating an existing session. A signed tunnel request may come from a user-, project-, or workspace-scoped device; admission verifies the actual method and body without granting downstream RPC capabilities.
Device-signed tunnel uploads must declare Content-Length, capped at 64 MiB. The signed header includes the body SHA-256. Authentication checks the signature, timestamp, and current device authority before reading the body. The relay streams the upload and verifies its length and digest before sending normal EOF. A mismatch aborts the request, but cannot undo bytes already delivered to the service.
Chrome extension pairing and project approval are separate. Confirm the extension's fingerprint in account Settings, then approve that Chrome in your personal Project Settings. Project approval covers your workspaces in that project, including yolo mode. It does not replace the shared origin grants in browser.origins. Revocation rejects saved grants immediately and closes that Chrome's project groups. The account retains failed closure requests and retries when the extension reconnects. Reapproval creates new authority rather than reviving old grants.
Anonymous extension connections require a live invitation awaiting a key. Limits apply to IPv6 /64 and /48 networks, and IPv4 /32 and /24 networks. Only confirmed keys bypass those limits.

Encrypted data

Current package code encrypts these data classes:
  • GitSpace drive files (drive://base/ and drive://workspace/) use AES-GCM with scope keys derived from the account artifact key. Checkpoint blobs also use AES-GCM. Authorized cloud services and machines can decrypt this data; the managed credential vault is part of the trust boundary.
  • Machine credential envelopes use ephemeral X25519 key agreement, HKDF-SHA256 key derivation, and AES-GCM authenticated encryption.
These are scoped guarantees. They do not imply that every request or terminal byte uses the same encryption boundary.
Cloudflare Artifacts repositories store code separately from these encrypted evidence files. The account Worker accesses repositories through its Artifacts binding and issues repository-scoped read or write tokens to machine checkouts. Evidence encryption does not make code repositories or cloud conversation state end-to-end encrypted.

Cloud runtime and credentials

The Workspace Durable Object stores Pi conversations, pending questions, and durable task records. It performs inference through the project's admitted profile and the cloud credential vault. Account selection and refresh happen in the cloud, without a connected-machine fallback. Treat the account Worker, runtime storage, and credential vault as trusted services for this data.
A machine executes repository tools, jobs, services, and lifecycle scripts. Enrollment alone does not authorize every workspace effect: dispatch also checks the attachment, generation, and attempt identity. A machine disconnect does not move the conversation to that machine or prove its running processes have stopped. Unresolved unsafe effects are not automatically relaunched.
Lifecycle content approval, uncertain-effect recovery, and cloud destruction remain human-authorized actions. Protected interactive lifecycle terminals require a live browser session. Raw input and output stay out of durable logs and replay; reconnecting does not recover earlier terminal text.

Managed sandbox trust boundary

The managed Cloudflare image currently starts the machine host as root. Its enrollment passes the machine signing key and host control token in the host's process environment. The host, supervisor, repository commands, terminals, and lifecycle scripts do not have a separate OS security boundary.
Do not treat the machine signing key or local host controls as confidential from code running in that sandbox. Removing variables from a command's environment does not prevent a same-user process from reading another process's /proc environment or host-owned files. Supervisor socket permissions likewise do not isolate processes running as the same user.
Treat code executed in a managed sandbox—including dependency install scripts and repository tests—as able to exercise that machine's permissions. The machine control channel rejects account-level controls such as device revocation, account-secret administration, inference configuration, and fleet power; signed-in devices perform those operations through the account RPC. Cloud authorization checks, not credential secrecy inside the container, enforce those limits.
This is a boundary within one tenant's machine, not evidence of cross-tenant access. Cloudflare documents the sandbox as its unit of trust. The account's inference credentials remain in the cloud vault rather than being placed in the machine environment.

Relay and Worker visibility

The production browser transport signs RPC requests, but it does not currently encrypt every RPC body end to end between the browser and machine. The account Worker and relay terminate or route production requests and may observe data needed by that path.
A full encrypted RPC transport exists in package library and test code, but it is not wired into the production browser transport. Treat the account Worker and relay as part of the trusted routing path, not as zero-knowledge infrastructure.

Operational responsibilities

  • Protect the gsr_ recovery key as the account root secret.
  • Use separate machine and browser enrollments instead of copying device private keys.
  • Revoke devices that should no longer have access.
  • Treat machine hosts as trusted for repository tools, services, injected secrets, and decrypted workspace data placed on them. They are effect executors, not an OS sandbox or the owner of the cloud conversation.
  • Review device grants and capability changes as security-sensitive operations.

Algorithms in current package code

PurposeAlgorithm
Account, machine, and browser signingEd25519
Machine credential key agreementX25519
Key derivation for sealed credentialsHKDF-SHA256
Evidence artifact, checkpoint blob, and credential encryptionAES-GCM