Project Trust
Project-local hooks, plugins, and commands can execute arbitrary code when ox opens a repository. The project trust store records user-approved project roots so untrusted repositories cannot run project-local extensions automatically.
Storage Location
Section titled “Storage Location”TrustStore::load_default reads and writes a TOML file at:
$XDG_STATE_HOME/ox/trusted.tomlwhenXDG_STATE_HOMEis set and non-empty.~/.local/state/ox/trusted.tomlotherwise.
Callers and tests can override the path with TrustStore::load(path).
File Format
Section titled “File Format”trusted.toml stores a sorted, deduplicated list of canonicalized project root paths under trusted_roots:
trusted_roots = [ "/Users/alice/GitHub/oxide-code", "/Users/alice/work/service-api",]| Field | Type | Default | Description |
|---|---|---|---|
trusted_roots |
string[] |
[] |
Canonicalized absolute paths of trusted workspaces |
Behavior
Section titled “Behavior”- Canonicalization:
TrustStore::is_trusted,trust, andrevokeresolve symlinks and relative segments withstd::fs::canonicalize. Revoking a directory that has already been deleted falls back to matching the provided path verbatim so stale entries can still be removed. - Atomic writes:
TrustStore::savecreates missing parent directories, writes the serialized TOML to a sibling temporary file, and atomically renames it into place. - Extension gating:
TrustStore::gate_projectreturnsTrustDecision::AllowedorTrustDecision::Untrusted, andTrustStore::guard_projectruns a closure only when the project root is trusted. - CLI override: Passing
--trusttoox chat,ox acp, orox runtrusts the current workspace for that invocation without modifyingtrusted.toml. See CLI.