pub struct SandboxConfig {
pub enabled: bool,
pub provider: String,
pub allow_read: Vec<String>,
pub allow_write: Vec<String>,
pub allow_network: Vec<String>,
}Expand description
Agent sandboxing configuration (v0.14.0).
Controls whether agents run in a sandboxed process environment that limits filesystem access, network reach, and syscall surface.
[sandbox]
enabled = true
provider = "native" # "native" (OS sandbox-exec/landlock) | "openshell" | "oci"
# Paths the agent is allowed to read (in addition to its working dir)
allow_read = ["/usr/lib", "/etc/ssl"]
# Paths the agent is allowed to write (staging workspace is always included)
allow_write = []
# Hostnames/CIDR ranges the agent may connect to. Empty = block all network.
allow_network = ["api.anthropic.com", "api.github.com"]Fields§
§enabled: boolWhether sandboxing is enabled. Default: false (safe default — no breakage on upgrade).
provider: StringSandbox provider. Default: “native” (macOS sandbox-exec or Linux landlock/seccomp).
allow_read: Vec<String>Additional paths the agent may read (beyond its working dir and /usr, /lib, /etc/ssl).
allow_write: Vec<String>Additional writable paths (the staging workspace root is always writable).
allow_network: Vec<String>Network destinations the agent is allowed to reach. Empty = block all outbound. Entries may be hostnames, IPs, or CIDR blocks (e.g., “api.anthropic.com”, “10.0.0.0/8”).
Trait Implementations§
Source§impl Clone for SandboxConfig
impl Clone for SandboxConfig
Source§fn clone(&self) -> SandboxConfig
fn clone(&self) -> SandboxConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SandboxConfig
impl Debug for SandboxConfig
Source§impl Default for SandboxConfig
impl Default for SandboxConfig
Source§impl<'de> Deserialize<'de> for SandboxConfig
impl<'de> Deserialize<'de> for SandboxConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SandboxConfig
impl RefUnwindSafe for SandboxConfig
impl Send for SandboxConfig
impl Sync for SandboxConfig
impl Unpin for SandboxConfig
impl UnsafeUnpin for SandboxConfig
impl UnwindSafe for SandboxConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more