<!-- Source: https://console.uubright.com/docs/security/ -->
# Security model

uuBright Console runs an AI agent on your server with real credentials. This page says what
it protects, what it doesn't, and how to deploy it so the difference doesn't
matter.

> [!WARNING]
> **In host mode, a task runs with your account's access.** Approvals let you review what Claude does; they are
> not a security boundary against an agent that is compromised, for example by
> instructions hidden in a repository or web page. Run uuBright Console as a dedicated
> account that holds only the access you're willing to give the agent.

The [experimental DeepSeek Harness host route](https://console.uubright.com/docs/deepseek/) runs as that same host account. Its ACP client has no additional isolation from other files readable by that account. The runner fixes `DSH_PERMISSION_MODE=workspace-write`, starts the subprocess in the task worktree with a limited environment, and passes only its own local MCP shims. It forwards one-shot approval requests to the owner; approvals are not a security boundary. A Harness runtime block may fail a tool before any approval request, while a human denial follows a displayed request and is logged as that decision. Neither is a task-wide grant. The supported `DEEPSEEK_API_KEY` stays in its isolated host profile; its known value is redacted from task events and runner logs. Custom provider credentials are outside this experiment. This route is unavailable in Docker and This Mac mode.

## What tasks on your Mac can access

### Continuing an external session through a Manager

On a phone, open the Manager tab and **Continue a local Claude session with a Worker**. Choose the
local project and review the session title and UUID, checkout path, Manager, and Auto fork effect.
**Grant one Auto fork** records the exact one-use authorization and tells the Manager to start it.
An owner or paired device can also grant it through
`POST /api/sessions/:managerId/continuation-grants` and body
`{"projectId":"p-…","continueSession":{"agent":"claude","id":"<session UUID>"}}`.
The Manager then calls `task_create` with that exact `projectId`, `agent: "claude"`,
`continueSession`, and `permissionMode: "auto"`. The one-use grant authorizes Auto for this fork
even if the Manager normally asks before its other Workers act. This requires a host-mode local project using the host Claude login. The server
resolves the exact file under the canonical checkout or one of its Git worktrees; the Manager cannot
list external sessions or provide a file path. It refuses a transcript changed in the last two minutes
and a second live task using the same source. A grant is bound to the checkout and source file selected
by the owner; a project or Manager change during lookup is rejected. The grant is consumed when the Worker is created.
Claude forks the copied transcript in the Worker's worktree, leaving the original file unchanged;
a failed copy fails the Worker rather than starting a fresh conversation. Owner-started New task
continuation remains available through the project session picker. The Manager receives the exact
project and session ID after granting it; it has no session picker or access to the list or conversation text.

In **This Mac** mode, tasks run as you. They can read files your macOS account can
read, including other files in your home folder. A worktree and file mode `0600`
do not separate tasks running as the same user.

After desktop setup, uuBright Console keeps only a hash of the owner token on disk;
the raw handoff file is removed. The running core reads that hash once, when it
starts, so a task that overwrites the hash file cannot log in with a token of
its own choosing until the core restarts. The same applies to
`reset-owner-token`: the new token works after the next restart.

**What Claude Code and Codex tasks are kept away from (This Mac mode only).**
Claude Code's file tools (Read, Edit, Write and NotebookEdit) may not read or
change the core data folder, `~/Library/LaunchAgents` or `~/.claude.json`, and
may not change `~/.claude/settings.json`, `~/.claude/settings.local.json` or
`~/.claude/plugins`. Hooks and MCP servers configured there run outside any task,
in every later task and in your own terminal Claude; `~/.claude.json` is also
unreadable because its MCP server settings often hold API keys. A local Claude
task also starts with `--strict-mcp-config`, so it loads only the MCP servers
the runner passes (its own tools and the workspace's enabled plugins), not your
user-scope, project `.mcp.json` or installed-plugin servers. These rules hold in
every permission mode, including Bypass. The data-folder rules name each entry that exists when the task starts,
plus the core's known secret files, because a rule on the folder itself would also
cover the task's workspace inside it; a file the core creates later under a new
name is covered only by the sandbox. Claude's shell commands run in Claude Code's sandbox with the same read
and write denies. The task's own workspace, the repository's `.git` (for a task
on a local checkout), the usual package caches and the SSH agent stay
available, so `git commit`, `git push` and `npm install` keep working. Inside
the repository's `.git`, the task may not change `hooks/`, `config`,
`config.worktree` (git reads it like `config` once `git sparse-checkout init`
turns on worktree config), its worktree's `commondir`, `gitdir` and
`config.worktree`, a submodule's `hooks/` and `config` under `modules/`, or the
workspace's `.git` link: git runs commands named there, and uuBright Console runs
git itself, outside the sandbox, to create and remove worktrees, show changes
and open pull requests. Those git commands also turn off hooks, `core.fsmonitor`,
`ext::` remotes, signature checks (`log.showSignature` with a `gpg.program`), signing
of the console's own commits, pagers and external diff programs, so a program
named in a repository's config, planted before these rules or by another program,
does not run either. The same holds when the setup check reads any checkout in
your home folder ([Setup check](https://console.uubright.com/docs/setup-check/)). As a result, in This Mac mode **Open PR's commit
and push skip the repository's hooks** (for example a husky `pre-commit` or the
git-lfs `pre-push`). Run them inside the task, or commit and push from the task
yourself, if your repository needs them. Tasks on a server or in Docker run
unsandboxed anyway, so there Open PR keeps the repository's hooks, and git-lfs
uploads its objects as usual. A git command that writes `config` from inside the sandbox, such as
`git remote add` or the upstream that `git push -u` records, cannot save that
change; a plain `git push` needs no config change. A
command that the sandbox still blocks can be retried outside it; that retry is
a normal permission request, which Ask mode shows you and Auto or Bypass mode
can approve without you. Codex tasks, when Codex's sandbox is on, get a
filesystem profile that denies the same folders and keeps the settings files
read-only. On macOS, the ancestors between the data folder and the task's workspace
remain readable for directory metadata and listings: Node's `getcwd` and package managers need
to inspect them. The profile denies every other child path and its descendants,
including files and sibling task folders created after the task starts. This lets
package managers discover the workspace without exposing the console's private
file contents. Local macOS Codex commands use a filtered network proxy that allows
the exact HTTPS hosts `api.github.com`, `github.com` and `codeload.github.com`.
Those allowlisted names may resolve through a VPN's private-address DNS; other
destinations, including literal local/private addresses, are not allowlisted.
An owner can add exact DNS destinations for one local Codex task by setting
`CCR_CLOUD_CODEX_NETWORK_HOSTS` in that task's saved runner environment before restarting it
(comma-separated hostnames, without URLs, ports, IP addresses or wildcards). For example,
`backup.uubright.com` permits that task's backup acceptance traffic; it does not change other
tasks or allow arbitrary destinations. Command approval alone does not override the proxy's
domain policy. Linked Git worktrees explicitly allow their own index, HEAD and logs as well
as the common object/ref directory, while their routing and configuration files stay read-only.

GUI applications need macOS host services that the command sandbox may not expose. For a
native UI acceptance run, an owner-authorized host launch can start the exact package with
an explicit synthetic profile. Remove `ELECTRON_RUN_AS_NODE` from that application's child
environment; never drop it from the console service, which uses Electron as its Node runtime.
Verify the launched app's profile before using computer-control tools, and do not let an app
lookup silently start a normal-profile instance after a failed test launch.

If you set `CCR_CLOUD_CODEX_SANDBOX=danger-full-access`, Codex has
no per-path restriction. Server (non-local) host tasks get none of these
settings.

These are agent settings, not a macOS security boundary. A task can still run
code as you, especially in Bypass mode, and other files in your home folder stay
readable.

**Check: can a same-user process read the app's Keychain items?** The desktop
app keeps Electron's `RunAsNode` fuse on, because its LaunchAgent starts the
bundled core with the app's own binary. Any process running as you can start that
binary as plain Node. The app's saved tokens are encrypted with Electron
`safeStorage`, whose key is a Keychain item that trusts the app's code
signature. To check that a same-user process cannot use that trust, run these in
Terminal on a Mac with the app installed and signed in:

1. `ELECTRON_RUN_AS_NODE=1 "/Applications/uuBright Console.app/Contents/MacOS/uuBright Console" -e "console.log(typeof require('electron'), typeof require('electron').safeStorage)"`.
   Expected: `string undefined`. As plain Node the binary has no `safeStorage`.
2. Find the key's item in Keychain Access (search for "Safe Storage") and run
   `security find-generic-password -s "<that item's name>" -w`, then the same
   command from the step 1 binary:
   `ELECTRON_RUN_AS_NODE=1 "…/uuBright Console" -e "require('child_process').execFileSync('/usr/bin/security', ['find-generic-password', '-s', '<name>', '-w'], { stdio: 'inherit' })"`.
   Expected: macOS asks whether `security` may use the item, both times. Choose
   **Deny**.
3. `codesign -d --entitlements - "/Applications/uuBright Console.app"`.
   Expected: hardened runtime, and only `com.apple.security.cs.allow-jit`. In
   particular there is no `disable-library-validation` or
   `allow-dyld-environment-variables`, so a process cannot load its own native
   module (`process.dlopen`) or `DYLD_INSERT_LIBRARIES` into the app's binary to
   call Keychain as the app.

If any step prints a token or key without a prompt, or the entitlements include
either of those two, treat the app's saved tokens as readable by tasks on this
Mac: revoke the paired devices and the relay sign-in, sign in again, and report it
(see below). The fix is to start the core with a separately signed Node runtime
and turn the `RunAsNode` fuse off.

**Secrets that stay readable to same-user processes:**

- The relay host key in the data folder, always.
- The relay registration secret, from the moment you save it in the desktop app
  until the relay confirms this Mac's registration and the desktop restarts the
  service without it. During that time it is in the LaunchAgent plist and in the
  service's environment (`launchctl print`, `ps eww`). Usually that is seconds to
  minutes. It stays there indefinitely if registration fails, or if the relay
  predates the registration acknowledgement (redeploy it with `deploy.sh`); the
  desktop then keeps the secret, which still works.

Changing the relay URL or the relay losing this Mac's registration requires the
secret again. Use Docker mode for repositories you do not trust. If you lose the
Keychain owner token, stop the core, run
`CCR_CLOUD_LOCAL=1 uubright local reset-owner-token`, start it again, and copy
the fresh `owner-token` handoff file into Keychain. The old token is invalid.

Named workspaces separate accidental agent and GitHub account selection in host
mode. By default they use the host agent logins; separate agent homes and logins
are CLI opt-ins and remain private to the service account. They are not a
security boundary between tasks:
all host tasks run as the same account and can read other workspace homes and
enabled plugin directories. Plugins are executable code; only enable trusted
directories outside the server data directory. A symlinked parent is resolved at
enable time; symlinks inside plugin content are refused. Docker mode refuses
named workspaces until their homes and plugins have explicit mounts.

Contract plugins' secrets ([Plugin settings, secrets and forms](https://console.uubright.com/docs/plugins/)) are
kept in `<data>/plugins/<workspace>/<plugin>/secrets.json` (0600; `_host` for
host-scope plugins). They are write-only over the API: no route, event, push
payload or log returns a value. The runner asks for one server's secrets when it
starts that server, and hands them over file descriptor 3, so they are never in
the agent's environment, command line or MCP config, and the server is not a
descendant of the agent. The runner token is not enough to get them: the control
plane hands a runner its plugin setup, secrets included, once per start and before
the agent runs, and refuses every later request. A plugin server that writes its
secret into the workspace exposes it to the agent. The runner asks for its plugin setup
before it clones, runs the project setup script or starts the agent, and the control plane
stops answering once the runner reports any status. A holder of the runner token can still
report a form naming a plugin server the runner registered, so a form's header shows which
plugin's server it claims to come from, not proof that the server sent it, and a token
holder connected as the runner would receive your answer. A host task's agent can read
that token, so decline a plugin form you didn't expect. The runner redacts every delivered value, and its base64
and URL-encoded forms, from tool results, the server's stderr and every event it
sends. In This Mac mode the data folder is denied to tasks. In host mode on a
server there is no file sandbox: an agent with a shell runs as the same account
and could read `secrets.json` or the plugin directory, so treat a plugin secret
like any other credential the service account holds. A plugin form's answer goes
from your device to the plugin's server through the runner, never through the
agent, so an agent can't fill in or forge one.

Model access you connect yourself ([Bring your own model](https://console.uubright.com/docs/bring-your-own-model/)):
an Anthropic API key, Bedrock credentials, a CCR client key or a Zhipu GLM coding-plan key, is kept in
`<data>/model-access.json` (0600) and is write-only over the API, which only the
owner token can call. Unlike a plugin secret, it is in the agent's environment:
Claude Code needs it there, so a task gets exactly the variables Claude Code reads
for that choice (`ANTHROPIC_API_KEY`, the AWS variables, or `ANTHROPIC_BASE_URL` and
`ANTHROPIC_AUTH_TOKEN`, plus the GLM model slots when the task runs on GLM) and the agent's shell can read them. A host task's saved
environment (`env.json` in its state folder, 0600) holds them too. Prefer a CCR
client key with limits, or a Bedrock role scoped to `bedrock:InvokeModel`, if
that matters. Containers take only the CCR gateway from `server.env`.

A PR reviewer task reads untrusted code, so it never gets a raw saved key, including a GLM key. On the
CCR route it gets the gateway's client key, and with a Bedrock profile it gets the
profile name. If the saved choice is an Anthropic API key or Bedrock access keys,
the reviewer gets neither. It uses the server user's own Claude Code setup, and its
log says so. To review on your own model, connect CCR or a Bedrock profile.
Reviewers are Codex tasks today, and Codex tasks get no saved model access at all.

If an agent prints a saved secret, for example by running `env`, the control plane
replaces it with `[redacted]` before the event is stored or streamed to your
devices. This covers the saved model keys, the CCR client key and plugin secrets,
in their plain, base64 and URL-encoded forms. The agent itself still saw the value,
and a support bundle redacts these values too.

## Recommended deployment

1. **A dedicated Unix account** for uuBright Console and its tasks, separate from your
   personal account and with no `sudo`. Give it only the Git credentials and cloud
   permissions the agent should have.
2. **Keep the API on loopback** (the default) and reach it through an SSH tunnel,
   Tailscale, or Cloudflare with an Access policy that allows only you. Never open
   ports 8787 or 8788 to the internet.
3. **Treat the owner token like a password** for that account. Anyone with it can
   start tasks that run commands as the account.
4. **Use Docker mode** when you need isolation between the agent and the host. See
   [Docker and CCR sessions](https://console.uubright.com/docs/docker/).
5. **Review commands before approving them**, especially ones that touch credentials,
   the network or files outside the task.

## Who can do what

| Actor | Can |
|---|---|
| You, with the owner token | Everything: start, control and delete tasks, answer approvals, read transcripts. |
| A paired device | The same as the owner token except adding or removing devices (the API refuses it a pairing code, direct or relay, and revoking any device but itself; this closes the direct route, and is a hard boundary only where tasks are sandboxed: with the host driver a paired device can still start a task and approve its prompts, and that task runs as the server account, which can read the owner token or run `npm run pair`; the one exception is an **owner-grade** device, below), messaging settings, model access, the local owner-token handoff, enabling or disabling a workspace plugin or listing the host's plugins (a plugin runs code; disabling deletes its saved settings and secrets), lead limits (it can start a lead only with the default limits, and can't change an existing task's lead), and SciMigo Studio sign-in and sign-out (it sees only whether this computer is signed in) and Studio conversations on This Mac, until you revoke it. Revoking also closes anything it has open, such as a live task stream. A window showing [several computers](https://console.uubright.com/docs/multi-host/) is a paired device on each computer it added, with a separate token for each. |
| An owner-grade device | A paired device that may also create pairing codes and remove devices. Only the Mac app's SSH-managed connection to a server is one: the app runs `managed-pair` on the server over SSH, which asks for an owner-grade code with the owner token over the private control socket; the server makes one nowhere else (over TCP the owner token is refused it too). Every such code and the device that redeems it are in the activity log as owner-grade, and the “New owner-grade device paired” notice says so. Nothing a device sends at pairing or later sets the mark, an owner-grade device can't make another, and a phone or browser paired from a code it creates is an ordinary device. The mark is stored with the device (`devices.json`), survives a restart and goes when the device is revoked. Such a code has no typed short form. Everything else is as for a paired device. The Devices list marks it “Owner-grade: can add and remove devices”, for every caller. |
| A listed peer origin (`CCR_CLOUD_PEER_ORIGINS`) | Its web app may call this API across origins, but only with a token this server issued, such as a paired device's. A script on that origin can use any token stored there, so list only servers you control. |
| A host task (Claude and the commands it runs) | The server account's files, credentials and network. Local mode removes the raw owner-token file after handoff and keeps Claude and Codex out of the data folder, LaunchAgents and Claude's user settings (agent settings, not an OS boundary). |
| A Docker task | Its own workspace, the network, the CCR client key and `GH_TOKEN` if set. It can't reach the host's files or credentials. |
| A task's runner token | Report activity for that task and use its room tools. If the owner marks it as a lead, it can create workers and message or stop only workers it created, within owner-set limits. It cannot act as the owner. |
| A room token (external member) | Read and post in that one room and change its task list, as that member. Nothing else; disbanding the room or removing the member revokes it. |
| Anyone else on the network | Nothing, as long as the API stays on loopback or behind your access layer. |

## What uuBright Console enforces

- **Another local user on the API port:** on a shared server, the loopback port is not a credential. Setup,
  `managed-pair` and the Mac app's SSH tunnel talk to the service only over its Unix socket inside the private data
  folder ([control socket](https://console.uubright.com/docs/api/#control-socket)), which no other account can open, so another user who takes the
  port after a reboot gets no token. Setup is ready only when the process it just started answers there; if the port
  is taken (`EADDRINUSE`) it says so, and it also refuses a port that `/proc/net/tcp` shows another user holds.
- **Authentication:** every API route except the health check, the app's static
  files and the pairing exchange requires the owner token, compared in constant time,
  or a paired device's token. Pairing links carry a single-use 128-bit code that
  expires after 10 minutes; the 8-character code shown with it (40 bits) is the same
  pairing, and wrong guesses are limited per address and per server
  ([details](https://console.uubright.com/docs/phone-access/#how-the-code-stays-safe)). Over the relay the short code is
  a CPace password. The relay routes on its first four characters, so it knows 20 of the
  40 bits; the rest never leave the phone and the computer, and the relay sees nothing it
  could test guesses against offline. A hostile relay is left with online guesses, one at
  a time, at most ten per computer per ten minutes (about 1 in 100,000 per window) before
  codes pause. Device tokens are stored only as
  hashes and can be revoked one by one. The app sends its token in the `Authorization` header on every
  API request, the live board stream included (read with `fetch`, not `EventSource`), so it is not in an address
  that a proxy or server log would keep; the event streams still accept `?token=` for older clients. A device's
  label is stored without control and format characters (bidirectional overrides, zero-width marks, line breaks),
  as relay phone names are, so it reads the same in the Devices list, the activity log and the pairing notice. There are no cookies,
  and no cross-origin access is allowed.
- **Browser hardening:** the app is served with a strict Content Security Policy,
  can't be framed, and never inserts model or tool output as raw HTML: replies are
  rendered as safe Markdown and tool output as plain text. Mermaid diagrams are drawn
  in a sandboxed frame with an opaque origin and its own policy, which may load only
  the app's own scripts, and come back as SVG shown as an image; an SVG in a reply is
  shown as an image too, so nothing in either can run or load anything. The only files
  other origins may read are those scripts (the renderer and Mermaid), which are public
  code and hold no data. Math is drawn in the page by KaTeX with `trust` off, so a
  formula can't add links, classes or styles, and with limits on sizes and macro
  expansion. A Markdown image in a reply shows only when it names one of
  the task's own image artifacts, through the same signed URL as its preview; an image
  on another site stays a link and is never fetched, so a reply can't report back who
  read it.
- **Artifact URLs:** the owner or a paired device mints a one-hour HMAC capability
  URL scoped to one published artifact. HTML and SVG previews receive a sandbox
  Content Security Policy with an opaque origin and `connect-src 'none'`; deck
  assets may load from the entry file's directory subtree. Paths and sizes are
  checked again when served. A URL can be used by anyone holding it until it expires.
- **Runner identity:** each task has its own runner token, stored only as a hash. A
  runner can report only runner activity for its own task, in order; it can't
  record your messages or decisions.
- **Approvals:** a decision applies only to the exact open request in that task, can
  be given once, and runs the tool with exactly the input you reviewed. Restarts
  and interrupts cancel open requests. The exceptions are ones you choose on a card:
  **Allow for this task** (a Codex MCP tool), and **Allow web research for this task**,
  which the server applies to later WebSearch calls and WebFetch calls whose address is
  a public http(s) page. It never covers shell, file writes or MCP tools; the feed
  records it, and **Details** turns it off.
  - **What counts as public.** No localhost, private, CGNAT, link-local or metadata
    addresses (`169.254.169.254`), IPv6 loopback, unique-local, site-local or
    IPv4-mapped addresses, documentation ranges, local-only names (`.local`,
    `.internal`, single labels), names that spell out an IP (`127.0.0.1.nip.io`),
    credentials, non-default ports, or this server's own public and relay addresses.
    The server also resolves the name and refuses it if any address is not public
    (`localtest.me`, a name pointing at `127.0.0.1`).
  - **This is best-effort.** Claude Code makes the request itself, after the check, so a
    name that resolves differently by then (DNS rebinding) or a public page that
    redirects to a private address isn't caught.
  - **It can leak data.** A search query or URL carries whatever the agent puts in it. If
    content the agent reads (a web page, an issue, a file) tells it to, it can send
    data from the task out in a search or fetch, with no prompt to stop it. Allowing web
    research trades that protection for fewer interruptions; leave it off for tasks that
    handle secrets or untrusted input you don't want sent out.
- **Notification buttons** carry a token signed by the server that can make only its
  one decision on its one request, for 24 hours. Allow is offered and accepted only
  for read-only tools whose paths stay inside the task's workspace (symlinks resolved
  in host mode), checked again when the button is used. The token travels in
  the end-to-end encrypted push payload, never in a URL.
- **Secrets:** task processes don't receive the owner token, Discord/WeChat/WhatsApp credentials or
  CCR client key from uuBright Console's environment. A CCR-route task gets the client key
  it needs, and Docker mode passes secrets as environment variables, never on a
  command line. Repository check errors are redacted before logging. Host tasks
  no longer inherit ambient `GH_TOKEN` or `GITHUB_TOKEN`: Default receives only
  the server's configured `GH_TOKEN`, and other workspaces receive only their
  CLI-configured GitHub credential.
  The control plane polls task PRs with `gh api` using the task workspace's
  GitHub credential. Tokens are passed in the child environment, never as
  command-line arguments; ambient `GITHUB_TOKEN` is removed.
- **Files:** configuration, task records, event logs and task environments are
  readable only by the service account.
- **Input:** repository URLs must be plain SSH or HTTPS URLs without credentials.
  Commands get your input as separate arguments, never inside a shell command
  string.
- **Host tasks and each other's processes:** host tasks run as the same Linux user,
  so a kill by name in one task (`pkill -f "npm test"`) can stop another task's agent.
  Every Claude Code task's settings deny `pkill`, `killall`, `kill … -1` (which
  signals every process of the user), `kill $(pgrep …)`, `pgrep … | xargs kill` and
  `xargs kill`, including behind a path, `env`, `timeout`, `sh -c` or a pipe. These rules
  match text anywhere in a command, so a command that only mentions `pkill ` (a `grep` or
  a commit message) is refused too. A host Codex task's Codex home gets
  `rules/ccr-cloud.rules`, exec-policy rules that forbid `pkill` and `killall` (also as
  `/usr/bin/…`, `/bin/…` and after `env`), `xargs kill`, and `kill -1` with any signal that
  ends or stops a process. A kill of a specific PID or process group (`kill $!`,
  `kill -TERM -1234`) is still allowed, and the task's instructions tell the agent to
  stop only processes it started. Each host runner
  starts as the leader of its own process group and session, which also holds its
  agent and the agent's commands; the runner records it in `process-group.json` in
  the task's folder, and uuBright Console stops a task by signalling only that group. With
  `CCR_CLOUD_HOST_CGROUP=systemd`, each runner also gets its own systemd user scope
  (see [configuration](https://console.uubright.com/docs/configuration/#core)).
- **Docker tasks** run as a non-root user with all capabilities dropped,
  `no-new-privileges`, CPU, memory and process limits, and no Docker socket.
- **Attachments:** uploads stream to disk with the size limit enforced
  while they arrive, so an oversized file is cut off, not stored. The server
  detects each file's type from its first bytes (and a zip's file list), never
  from its name or the browser's type, and refuses executables: ELF, Windows PE,
  Mach-O, WebAssembly, zipped macOS apps and scripts with binary content. Files
  are stored under random ids in the data directory, readable only by the service
  account; names are kept for display only, stripped of paths and control
  characters. If a ClamAV daemon is reachable (its usual socket, or
  `CCR_CLOUD_CLAMD_SOCKET`, a socket path or `tcp://host:port`), each file is
  streamed to it and a hit is quarantined. When you set `CCR_CLOUD_CLAMD_SOCKET`,
  scanning fails closed: if the daemon is down, times out, answers with an error
  or answers nothing, the upload is refused rather than passed unscanned. A
  daemon found at its usual socket fails open: a file it can't scan is attached
  and marked **Not scanned**. clamd refuses streams over its `StreamMaxLength`
  (25 MB by default), so raise that in `clamd.conf` if you raise the file limit.
  `CCR_CLOUD_CLAMD_SOCKET=off` turns scanning off. Size limits change only from the
  server CLI. A task's runner can read only files sent with that task's messages.
  The app reads back only image attachments (PNG, JPEG, GIF, WebP, by their detected
  type, never SVG), with the owner's token, for thumbnails; they're served with
  `nosniff` and a sandbox policy. No other attachment is ever served back.
  A relay phone sends a file in encrypted, acknowledged pieces: its declared size
  is checked against the same limits before anything is stored, the server holds
  it to that size exactly and checks its SHA-256, then detects the type and scans
  it as above.
- **Attachment disk use:** files waiting to be sent are capped at 200 MB per task,
  and uploads are refused while the data directory's disk has less than 2 GB free.
  At startup the server removes partial uploads and uploads no message took within
  24 hours. In the workspace the runner refuses a `.ccr` or `.ccr/attachments`
  that is a symlink, never writes through one, and rewrites
  `.ccr/attachments/.gitignore` so the files can't be committed.
- **PR reviewers are read-only:** a [local PR reviewer](https://console.uubright.com/docs/lead/#local-pr-review) reads untrusted PR code, so it
  has no Git, GitHub or gateway credentials, no MCP servers or uuBright Console tools, and a `pushurl` that goes nowhere,
  and every permission request is denied without asking anyone. A Codex reviewer runs in Codex's read-only
  permission profile, which the server and the runner both check is in force; a Claude Code reviewer has only
  Read, Grep and Glob, confined to its checkout by `--restricted` (symlinks resolved, project settings and
  hooks ignored), and the runner and the server both check Claude Code's start-up tool list. A review posts
  nothing when either check fails. Its verdict (PASS with no P0 or P1 finding) is what holds or releases a
  Worker's PR; no agent can waive a FAIL, only the owner. The verdict is still a model's judgement of code
  that may try to persuade it otherwise, so it is a gate before the owner's merge, not a substitute for it.

## Activity log

**Computer settings › Activity** lists security-relevant actions on this computer, newest first: approvals and
denials, merges, review waivers, Manager budget and worker limits, usage-limit and chat-permission policy, add-ons
enabled or disabled, add-on settings, secrets set or removed (plugin secrets, model-access keys, messaging tokens:
by name, never the value), pairing codes (at most one entry a minute per device), and devices paired and removed.
Room invites, revoked invites and joins are listed by invite id, never with the code or token. Each entry says who (you, a paired device by id, a Manager or a
Worker by task id), when, and from where: this computer, the relay (with the relay device id), a notification
button, a messaging channel such as Discord, or the app itself. Filter by action, who, where from and date;
**Export JSON** or **Export CSV** downloads the filtered entries (JSON keeps the hashes to check later). Only the
owner token sees the log: paired devices and relay phones get no Activity card, and the API refuses them.

Labels are redacted before an entry is written, best effort. Ids, URLs and other values the server made (a
relay device id, a PR link) lose only secret values the server knows and exact credential shapes (`ghp_…`, `sk-…`,
a JWT, a password in a URL), so they stay exact. Free text someone typed (a device's name, a room handle, a reason)
also loses a credential-looking value after a word like *token*, *password:* or *key=*, and long random-looking
tokens; ordinary words such as "token rotation" or "auth: Google" stay. Odd encodings (a token split across fields,
spaced out, or hex-encoded) can get through, and entries already written aren't scrubbed again.

Entries are appended to `activity.jsonl` in the data folder, one JSON line each, and are never edited. Each line
carries the SHA-256 of the line before it, and `activity-head.json` keeps the newest entry's number and hash. The
server checks the whole chain at start-up and on every read, so an edited, removed or reordered entry shows as
**Chain broken at entry N** above the list, with that entry marked. If the log doesn't reach the saved head (newest
entries cut off, the log emptied or deleted, or the newest entry replaced), it shows **truncated at entry N** or
**the log is missing**, and that is kept in the head file for good: new entries and restarts don't clear it. A line
cut off by a crash stays visible as a break; nothing repairs it, so a break after a power cut can be benign.

**Retention.** Entries more than 180 days older than the newest entry (`CCR_CLOUD_ACTIVITY_RETENTION_DAYS`, 30 to
3650) are removed at start-up and once a day; the newest entry always stays, so a clock that jumps ahead can't empty
the log, and a broken chain is never pruned. A prune is first recorded as an entry (**Removed old entries**: how
many, through which entry, the cutoff). The log then starts with an anchor line holding the last removed entry's
number and hash, which the first kept entry links to; the anchor must match that prune entry and the head file, or
the chain reads as broken. Removed entries can't be brought back.

**What the chain does and doesn't prove.** The chain is a plain SHA-256 chain with no key. It shows edits made to one
file, or by hand, such as a changed, removed or reordered entry, a cut tail, a moved or forged anchor. It does not
stop someone who can write the data folder: they can recompute the whole chain and both files, or delete both files
so the log looks new. Host tasks run as the server account and can reach the data folder (local mode keeps agents out
by their settings, not by an operating-system boundary), so a task could do this too. Only exports kept off this computer (a SIEM, S3) are a
record the server account can't change. Prompt, message and command text never
enter the log.

## Known limitations

Workspace GitHub credentials are set only through the server CLI. The API returns
their configured kind, never the token or `gh` configuration. In host mode,
workspace environment settings prevent accidental account mixups, but the shared
service user can still read other workspaces' credential files.

- **Host mode isn't isolation** (see the warning above). A task can read
  `server.env`, other tasks' files and the runner's own token.
- **Workspace records and chat memory in host mode.** A host task runs as the server's
  Linux user, so it could change `<data>/workspaces/` directly: workspace settings, agent
  homes and [chat projects](https://console.uubright.com/docs/chat-mode/#project-memory)
  (`workspaces/<id>/chat-projects/*/project.json`), including notes the owner never
  approved. Every Claude Code host task's settings deny its Edit and Write tools there, but a
  shell command (`echo … >`, a script) still can. On This Mac, the local sandbox keeps tasks
  out of the whole data folder. Docker tasks can't reach it at all.
- **The kill rules are guardrails, not a boundary.** They block the common forms of the
  usual tidy-up commands, but an agent can still signal another task's process by a PID
  it looked up, through a script or interpreter (`python -c "os.kill(…)"`, a shell
  function or alias), or in forms the rules don't spell out. Codex matches commands
  by their first words, so it does not catch `kill $(pgrep …)`, `timeout 5 pkill …` or
  `sh -c 'pkill …'`. If another task's kill reaches a task's agent or runner anyway, the
  task says so in its feed (see [Failure and recovery](https://console.uubright.com/docs/reliability/#what-happens-when)). For real separation, use the
  [Docker driver](https://console.uubright.com/docs/docker/), where each task has its own process namespace.
- **A Docker task's agent can read its runner token**, because Claude Code and the
  runner share one user inside the container. With it, the agent could add
  misleading activity to its own task's log, but not act for you or other tasks.
- **Room messages are untrusted input.** An agent in a [room](https://console.uubright.com/docs/rooms/) reads what
  other agents wrote. The room note tells it to treat them as peer input, but a
  prompt injection in a peer's message can still steer it within its own
  permissions. Lead↔worker hand-offs can wake the recipient automatically, as can
  other agent hand-offs when room auto-pass is enabled. Other hand-offs wait for
  the owner.
- **Attachments are untrusted input.** The agent is told to treat attached files as
  data, not instructions, but a prompt injection in a PDF or document can still steer
  it within its own permissions. Nothing in a file is run automatically. Without
  ClamAV, or when an auto-detected ClamAV can't scan a file, it isn't scanned for
  malware.
- **Single owner.** There are no user accounts or roles. Don't share a server's
  owner token.
- **The development client** (`npm run dev`) passes the token in the event-stream
  URL. The production app doesn't.
- **Discord and optional WeChat/WhatsApp notifications** send task content, such as tool input and replies, to
  Discord, Tencent or WhatsApp respectively. WeChat credentials and queued content remain in
  the private data directory. Web Push notifications are end-to-end encrypted.
- **The uuBright relay** routes end-to-end encrypted relay traffic. It sees routing
  metadata, holds a revocable host token's hash per signed-in host, and serves the
  phone app's JavaScript. See its [threat model](https://console.uubright.com/docs/relay-managed/#threat-model).
- **Files opened over the uuBright relay** rest briefly in its storage (Cloudflare R2) as
  ciphertext: the Mac encrypts each one with a new key that only it and the phone hold,
  and storage deletes it after 24 hours. Cloudflare and the operator see its encrypted
  size and timing, not its name or content
  ([how](https://console.uubright.com/docs/relay-managed/#files-over-the-relay)). Use direct access to keep a file off
  the relay entirely.

## Report a vulnerability

Please report security issues privately to the maintainers rather than in a public
issue, with steps to reproduce. Leave out real tokens and private logs.

## Next steps

- [How it works](https://console.uubright.com/docs/how-it-works/)
- [Access from your phone](https://console.uubright.com/docs/remote-access/)
- [Failure and recovery](https://console.uubright.com/docs/reliability/)

Personal WhatsApp uses an unofficial Meta/WhatsApp Web client. In host mode any
task can read `DATA_DIR/whatsapp/auth`, granting linked-device access to the
account and messages. Use a spare number and a dedicated Unix user. The WhatsApp
Terms of Service and account restrictions still apply.

### Messaging configuration

Settings → Messaging requires the server owner token. Paired phones cannot read
pairing links or change channel credentials. Bot tokens are saved on the host in
private files and never returned to the browser; temporary pairing links/codes
must be kept private. Redeeming a Discord pairing code grants that chat account
control of this single-owner server's tasks. Treat bot/account compromise as host
control compromise and revoke the provider credentials when needed.
