Security

On this page
  1. What it protects
  2. Access
  3. Sandboxes
  4. Commits
  5. Billing
  6. Hosts
  7. The control plane without Cloudflare
  8. Retention
  9. Reporting a vulnerability

fctl runs code-writing agents with access to your repositories and your Claude subscription. This page says what it protects, how, and what it trusts.

What it protects

Asset Where it lives Who can use it
Passwords argon2id hashes in D1 nobody can read them back
Authenticator app secrets (two-factor) encrypted (AES-256-GCM) in D1 the control plane, to check codes
Recovery codes HMAC-SHA256 hashes in D1, keyed by the master key (older ones SHA-256 hashes, until used or replaced) nobody can read them back
Passkeys public keys in D1; the private key never leaves the person's device or password manager the person, with their fingerprint, face or screen lock
Sessions and tokens SHA-256 hashes in D1; the secret only with its holder the holder
Claude credentials encrypted (AES-256-GCM) in D1, or, for tokens people keep on their runners, only in a file on those runners (mode 0600) sessions their owner starts
Project secrets encrypted in D1 that project's sessions, as environment variables
Profile pictures (uploaded, or copied from Google or Gravatar) images in D1 anyone signed in to the instance, at an address with the person's user ID
Workspace avatars images in D1 the workspace's members, people it invited, instance admins
Attached files the project's Durable Object people who can see the session they were sent in; its runner and agent
Images agents read the session's Durable Object, for 7 days people who can see the session
Session snapshots (Claude's conversation and the work the agent hadn't pushed) the session's Durable Object, or a bucket of your own where runners' host.toml names one (the control plane keeps only where), encrypted (AES-256-GCM) in the sandbox with the session's own key, which D1 keeps encrypted with the master key the session's agent, on the runner that runs it
Published screenshots the project's Durable Object, found by the SHA-256 of their links' tokens in D1 anyone with a link, until it expires
GitHub App key a Worker secret (outside Cloudflare, the server's environment) the control plane, to mint short-lived tokens
GitHub webhook secret a Worker secret (outside Cloudflare, the server's environment) the control plane, to check that deliveries come from GitHub
Linear app's client secret and webhook secret Worker secrets (outside Cloudflare, the server's environment) the control plane, to install fctl's app in Linear, renew its tokens and check that deliveries come from Linear
Linear tokens (fctl's app in each Linear workspace) encrypted (AES-256-GCM) in D1 the control plane, for the projects of the fctl workspaces connected to that Linear workspace; never sandboxes
Slack app's client secret, signing secret and app-level token Worker secrets (outside Cloudflare, the server's environment) the control plane, to install fctl's app in Slack, sign people in with Slack, check that requests come from Slack, and open Socket Mode
Slack bot tokens (fctl's app in each Slack workspace) encrypted (AES-256-GCM) in D1 the control plane, for the fctl workspaces connected to that Slack workspace and their sessions' agents' fctl slack calls; never sandboxes
Web Push (VAPID) key encrypted in D1 the control plane, to sign notifications
Identity token signing keys (RSA) encrypted in D1, a new one every 30 days; their public halves at each workspace's issuer the control plane, to sign the tokens agents mint for their own sessions
Master key a Worker secret (outside Cloudflare, the server's environment, or a file it made in its data directory) the control plane

Encrypted values are bound to their row (the AES-GCM associated data names the owner and purpose), so a value copied between rows does not decrypt.

Access

Sandboxes

Each session runs in its own Linux VM (Apple container, Firecracker or Lima) or container (Docker). The agent runs Claude Code with permission prompts off, because the sandbox is the boundary: it can do anything inside its VM, and nothing outside it except through these channels:

The process driver has no isolation at all and is for development only.

Commits

Agents' commits are authored by the GitHub App's bot. They carry Claude's Co-authored-by trailer unless the project turns off Credit Claude in commits. They name the person who started the session only when that person chose a commit email for the address they are in the workspace as (Settings → Email addresses, or fctl account set --commit-email) and the project credits people: a trailer then carries their name and that address. Maintainers turn that off with Credit people in commits in the project's settings (fctl projects set --credit-people off); its sessions then don't receive the address at all. Everyone who can read the repository sees the address in the commits, and people who can see the session see it in the transcript; commits keep it after it is removed or the account deleted. Settings and the API show the address only to its owner, not to admins. fctl never puts sign-in emails in commits.

Billing

fctl is built so agents only ever use Claude subscriptions:

Hosts

A runner's host is the fctl host service on it, which runs its sessions. Hosts connect outbound to the control plane over TLS (rustls with the Mozilla root store); they open no ports. A host authenticates with a runner token that its owner can replace, and that its owner and instance admins revoke by disabling or removing the runner: whoever holds a runner's token runs the sessions of the workspaces it serves, so only its owner gets a new one, not an instance admin outside those workspaces, and only while none of those workspaces' two-factor requirement closes it to them: a password alone gets no runner token. Registering a runner for a workspace and replacing a runner's token take confirming it's you, where the instance asks for that, as adding one to a workspace does. Hosts receive a session's credentials only while it runs, and keep nothing secret on disk but their runner token (~/.config/fctl/host-token, mode 0600), when their owner keeps it there, their owner's Claude token (~/.config/fctl/claude-token, mode 0600), and, once a session keeps its Claude token out of its sandbox, the key of the certificate authority whose certificate for api.anthropic.com that sandbox's Claude trusts (~/.config/fctl/claude-relay-ca.pem, mode 0600).

Claude tokens on runners. Someone who would rather not give fctl their Claude token keeps it on their runners (fctl host claude set-token) and connects it there ("My runners keep it" under Settings → Claude's long-lived token) (ADR 0050). The control plane is never given the token and stores none for them, hosts tell it only whether they keep one and when it was saved, and they take the token out of what sessions send wherever it appears whole: a breach of D1 and the master key, or an operator of the instance, doesn't get it, short of an agent that was made to pass it on (below). The control plane sends that connection's sessions only to those of its owner's runners that keep a token, in every workspace, whatever Only on my runners says, and each of those hosts puts in the token it keeps, so no one else's machine ever has it. Without one of those runners online, the sessions wait. What it doesn't change: the agent has the token in its environment, as above, so the people who may direct it can still have it handed over, unless its owner also keeps it out of sandboxes; and the control plane decides what runs on a runner, so one taken over could start a session there to the same end. The token is safe at rest and from other people's machines, not from the sessions that run on it. Removing it from a runner applies to the runs that start after, and doesn't revoke it: it works until it expires, a year after claude setup-token made it.

Enrollment tokens. A workspace's admins make enrollment tokens with which machines enroll themselves as its runners, without anyone signing in on them (ADR 0071). Whoever has one enrolls machines that run everyone's sessions there, with their code, secrets and tokens, so making one takes the same as adding a runner for everyone's sessions: an admin of the workspace, open to them under its two-factor requirement, who confirms it's them where the instance asks for that. A token is limited by its expiry, the most runners it keeps enrolled at once and its admins' revoking it, and enrolls only while the admin who made it is still one, as an invitation counts only while the admin who sent it is: an admin who is removed, demoted or disabled can't enroll a machine of theirs with a token they kept. With approval, it enrolls only machines an admin then lets in: a runner that waits gets nothing of any session, nor a Claude sign-in, and approving it takes confirming it's you too. The control plane keeps only the token's hash, a token it doesn't know counts towards its caller's rate limit, and the token does nothing but enroll: each machine gets a runner token of its own, so removing, disabling or replacing one runner's token leaves the others alone, and revoking the enrollment token leaves the runners it enrolled. Such a runner belongs to the workspace, runs no other workspace's sessions, and keeps no one's Claude token: the people who keep their sessions, or their token, on their own runners never run sessions on it. The admins see where each enrolled from, and the audit log records enrollments, approvals and removals.

Any member makes an enrollment token for their own sessions (ADR 0072): the machines it enrolls are that member's runners and run only their sessions there, as a runner they add for their own does, so whoever has it reaches only what that member could read in their sessions, and the Claude token they keep on their runners when their machines keep it. It enrolls only while its maker is an active member of the workspace, the same confirmation makes it, and with approval its maker, not the workspace's admins, lets each runner in. The workspace's admins see these tokens and revoke them, and take such runners out, which removes them; they go when their owner leaves the workspace.

A runner takes only the sessions of the workspaces it is added to, and so sees their code, secrets and the tokens of the people who start them: the session's GitHub tokens and the Claude token of the person it runs as. Its owner adds it to a workspace for everyone's sessions there only as one of its admins; a member adds theirs for their own sessions alone, which show the machine nothing they couldn't read in the session, and a demoted admin's runners run only their own from then on. A workspace's admins take any runner out of it. Each member chooses, per workspace, to run their sessions only on runners they registered (Only on my runners, fctl workspaces own-runners on), so that no one else's machine sees their Claude token or their sessions' work. Once a runner no longer runs a session (taken out of the workspace, its owner left it or was disabled, or the session's person keeps theirs on their own runners), or the person whose Claude connection the session runs on may no longer run it (they left its workspace, were disabled, lost their role in its project or its share, or its workspace's two-factor requirement closes it to them) or removed that connection, the session stops, its runner's uplink to it closes, and the runner gets no more tokens, messages or files for it, whatever its host does, and makes no more of its agent's calls (the project's memory, retrospectives and ticket tracker), uplinks or screenshots for it: a stopped session stays with the runner it last ran on, which would otherwise keep that person's reach in the project. A Claude sign-in through a host, which passes the full login's long-lived tokens through it, runs on one of the person's own runners when one is online, else on a runner that runs their sessions. That runner's host could keep those tokens, and it could also answer with a login of a Claude account of its owner's choosing, which fctl can't tell from the person's: it becomes the person's default, so that their sessions in every workspace run on that account, and its claude.ai/code and Claude apps show them, where they can be followed and steered (Remote Control). So when a sign-in runs on a runner that isn't the person's own, the app and fctl claude connect --login say which runner, and whose, before they approve it (ClaudeLoginJob.runner), and the CLI asks whether to go on. Where you don't trust that runner's owner with your Claude account, start one of your runners first, or connect a long-lived token.

Updates. Hosts update fctl by themselves to the version the control plane runs, unless auto_update = false in host.toml (fctl host auto-update off) (ADR 0053). The release comes from the host's own download_base, fctl.sh unless it says otherwise: the control plane names only a version, which must be newer than the host's, and never where to download it, so a control plane taken over can't make its hosts install anything else, or an older fctl. The host checks the archive against its SHA-256 and runs the new fctl before anything changes, as fctl self update does. The checksum comes from the same server, though: it catches broken downloads, not a release server taken over. Leaving updates on trusts fctl.sh with what runs on the machine, as installing from it does, without choosing when; with them off, fctl self update updates the host when you choose, once you have looked at the release. Turn updates off on machines where that matters.

Sessions run in their project's sandbox image or, without one, the host's: by default ghcr.io/hyperstructure/sandbox, which the Image workflow of the public hyperstructure/sandbox repository builds, so anyone can read what goes into it. A host can use its own build of it instead (fctl host image build) or a copy in another registry (image in host.toml).

A project's own image runs only on hosts that allow it, and its build only on hosts that build images from its repository: allowed_images and allowed_builds in host.toml. Without allowed_images, a host runs any image a project chooses, as hosts did before it, so set it on machines where that matters. Without allowed_builds, it builds none. The control plane schedules sessions by these lists, and the host checks them again before it takes a session. To build, the host downloads the repository at the tip of its default branch with the session's GitHub token, which the build never sees, and runs the build in its container runtime's builder, outside any sandbox, or with Firecracker in a VM of the project's own that holds its builds' cache, apart from other projects' (Sandbox images), from the repository's files alone: the host checks again that the Dockerfile and the directory a project names are in the repository, removes the repository's symbolic links that lead out of it, so that no builder reads the host's files through one, and keeps each sandbox's name to letters, digits and dashes, whatever the control plane sends. A build starts FROM whatever image its Dockerfile names, or its devcontainer.json does, whatever allowed_images says, so allowing a repository's builds allows the images anyone who can push to its default branch names. Hosts pull images with their own registry logins; fctl stores no registry credentials.

The control plane without Cloudflare

The standalone control plane (Self-hosting) runs the same Worker, so the rest of this page holds for it too. What Cloudflare does around the Worker, its server (deploy/standalone) does:

Retention

Reporting a vulnerability

Report it privately through GitHub: Security → Report a vulnerability on hyperstructure/fctl, with details and a way to reproduce. Please do not open a public issue. We will acknowledge within three working days and keep you updated until it is fixed.