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.
Strict 3-layer config trust boundary
Section titled “Strict 3-layer config trust boundary”offrig loads configuration from three layers in order of increasing precedence:
- User-global:
~/.config/offrig/config.toml(trusted — user-owned) - Repository:
<worktree>/offrig.toml(untrusted — may be checked into git) - Local override:
<worktree>/offrig.local.toml(trusted — gitignored user-local override)
Checked-in <worktree>/offrig.toml files are enforced against three hard rules:
- No user-local sections in checked-in config: A repository
offrig.tomlmay never define[secrets.*](includingenv,file, orcmdresolvers),[rigs.*],[git],[shim],[update],[telemetry], orallow_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.tomlor gitignoredoffrig.local.toml;offrig.tomlcan only reference required secret names via[run] secrets = [...]. See Telemetry & Privacy for CLI telemetry scrubbing and opt-out controls. - No Worktree root escapes:
[sync].includeand Write-back paths cannot traverse outside the local Worktree root (..traversal and escaping symlinks are rejected). - No host Docker socket opt-in:
run.docker = "host"is rejected unless the target Rig explicitly setsallow_host_docker = truein user-globalconfig.toml(offrig rig add ... --allow-host-docker).
Local-only secret injection
Section titled “Local-only secret injection”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>:
offrig --secret NPM_TOKEN pnpm publish --dry-runSecret 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.
Ephemeral git credential RPC
Section titled “Ephemeral git credential RPC”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.
Pre-snapshot ctime secret scan
Section titled “Pre-snapshot ctime secret scan”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.
Reporting security issues
Section titled “Reporting security issues”See SECURITY.md for private vulnerability reporting via GitHub Security Advisories.