pub struct SandboxConfig {
pub enabled: bool,
pub fs_rw: Vec<PathBuf>,
pub tcp: bool,
}Expand description
Resolved sandbox knobs.
Built with SandboxConfig::from_env; all knobs are ENV-driven (matching
the bridge::config house style) except enabled, which is also reachable
through the --sandbox CLI flag.
| ENV var | Default | Meaning |
|---|---|---|
AGENT_BLOCK_SANDBOX | off | enable the sandbox |
AGENT_BLOCK_SANDBOX_FS_RW | empty | :-separated extra writable paths |
AGENT_BLOCK_SANDBOX_TCP | true | 0/false/no/off denies TCP |
Fields§
§enabled: boolWhether the boundary should be installed at all.
fs_rw: Vec<PathBuf>Extra paths granted write access, on top of the built-in allowlist.
tcp: booltrue (default) leaves TCP untouched; false denies bind + connect.
Implementations§
Source§impl SandboxConfig
impl SandboxConfig
Sourcepub fn from_env(cli_enabled: bool) -> Self
pub fn from_env(cli_enabled: bool) -> Self
Resolve the config from the environment.
cli_enabled is the --sandbox flag; the sandbox is enabled when
either the flag or a truthy AGENT_BLOCK_SANDBOX is present. The env
var is read here rather than through a clap env = ... binding: clap
parses before the project .env is loaded and would accept only the
literal strings true/false, while this path supports the documented
truthy/falsy set.
Trait Implementations§
Source§impl Clone for SandboxConfig
impl Clone for SandboxConfig
Source§fn clone(&self) -> SandboxConfig
fn clone(&self) -> SandboxConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SandboxConfig
impl Debug for SandboxConfig
Source§impl Default for SandboxConfig
impl Default for SandboxConfig
impl Eq for SandboxConfig
Source§impl PartialEq for SandboxConfig
impl PartialEq for SandboxConfig
impl StructuralPartialEq for SandboxConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more