Skip to content

Security & Trust Boundary

Cloning and running commands in an unfamiliar repository should never let a checked-in offrig.toml execute arbitrary commands on your laptop or exfiltrate credentials.

offrig loads configuration from three layers in order of increasing precedence:

  1. User-global: ~/.config/offrig/config.toml (trusted — user-owned)
  2. Repository: <worktree>/offrig.toml (untrusted — may be checked into git)
  3. Local override: <worktree>/offrig.local.toml (trusted — gitignored user-local override)

Checked-in <worktree>/offrig.toml files are enforced against three hard rules:

  1. No user-local sections in checked-in config: A repository offrig.toml may never define [secrets.*] (including env, file, or cmd resolvers), [rigs.*], [git], [shim], [update], [telemetry], or allow_host_docker. Rigs ([rigs.*]), [update], and [telemetry] may only be declared in ~/.config/offrig/config.toml; secret resolvers, [git].credential_hosts, and [shim] may live in ~/.config/offrig/config.toml or gitignored offrig.local.toml; offrig.toml can only reference required secret names via [run] secrets = [...]. See Telemetry & Privacy for CLI telemetry scrubbing and opt-out controls.
  2. No Worktree root escapes: [sync].include and Write-back paths cannot traverse outside the local Worktree root (.. traversal and escaping symlinks are rejected).
  3. No host Docker socket opt-in: run.docker = "host" is rejected unless the target Rig explicitly sets allow_host_docker = true in user-global config.toml (offrig rig add ... --allow-host-docker).

Define secret resolvers in ~/.config/offrig/config.toml or gitignored offrig.local.toml:

[secrets.NPM_TOKEN]
env = "NPM_TOKEN"
[secrets.OPENAI_API_KEY]
cmd = ["op", "read", "op://Dev/OpenAI/credential"]
[secrets.DEPLOY_KEY]
file = "~/.secrets/deploy.key"

Inject named secrets into a Run with --secret <NAME>:

Terminal window
offrig --secret NPM_TOKEN pnpm publish --dry-run

Secret values are resolved locally at execution time, streamed over the encrypted Worker channel directly into the remote process environment, and never printed, logged, written into container configs, or baked into Snapshots.

Private git dependencies (cargo, go, npm) can authenticate inside a Sandbox without copying your ~/.ssh keys or .netrc onto the remote Rig. Opt in per hostname in user-local ~/.config/offrig/config.toml or offrig.local.toml ([git] credential_hosts = ["github.com"]), and offrig proxies git credential requests for those hosts over the multiplexed Worker stream back to your laptop’s credential helper on demand.

Before committing a Deps Snapshot, a Saved Snapshot, or a Cloudflare idle-stop/resize Layer-2 Snapshot, offrigd scans files whose ctime changed since the Sandbox started for raw and alignment-invariant Base64 forms of every injected secret ([run].secrets / --secret) and minted ephemeral git token tracked in supervisor RAM, and aborts the snapshot if any value was written to disk. Deps Snapshots never skip this scan; offrig snap save --allow-secrets is the only explicit override.

See SECURITY.md for private vulnerability reporting via GitHub Security Advisories.