pub struct SandboxConfig {
pub enabled: bool,
pub profile: SandboxProfile,
pub allow_read: Vec<PathBuf>,
pub allow_write: Vec<PathBuf>,
pub strict: bool,
pub backend: String,
}Expand description
OS-level subprocess sandbox configuration ([tools.sandbox] TOML section).
When enabled = true, all shell commands are wrapped in an OS-native sandbox:
- macOS:
sandbox-exec(Seatbelt) with a generatedTinySchemeprofile. - Linux (requires
sandboxcargo feature):bwrap+ Landlock + seccomp BPF.
This sandbox applies only to subprocess executors (shell). In-process executors
(WebScrapeExecutor, FileExecutor) are not covered — see NFR-SB-1.
§Examples
[tools.sandbox]
enabled = true
profile = "workspace"
allow_read = ["$HOME/.cache/zeph"]
allow_write = ["./.local"]
strict = true
backend = "auto"Fields§
§enabled: boolEnable OS-level sandbox. Default: false.
On Linux requires the sandbox cargo feature. When true but the feature is absent,
startup emits WARN and degrades to noop (fail-open). Use strict = true to
make the feature absence an error instead.
profile: SandboxProfileEnforcement profile controlling the baseline restrictions.
allow_read: Vec<PathBuf>Additional paths granted read access. Resolved to absolute paths at startup.
allow_write: Vec<PathBuf>Additional paths granted write access. Resolved to absolute paths at startup.
strict: boolWhen true, sandbox initialization failure aborts startup (fail-closed). Default: true.
backend: StringOS backend hint: "auto" / "seatbelt" / "landlock-bwrap" / "noop".
"auto" selects the best available backend for the current platform.
Trait Implementations§
Source§impl Clone for SandboxConfig
impl Clone for SandboxConfig
Source§fn clone(&self) -> SandboxConfig
fn clone(&self) -> SandboxConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more