pub struct SandboxConfig {
pub allowed_paths: Vec<PathBuf>,
pub denied_paths: Vec<PathBuf>,
pub env_allowlist: Vec<String>,
pub env_denylist: Vec<String>,
pub max_output_bytes: usize,
pub max_execution_secs: u64,
pub allow_network: bool,
pub working_dir: Option<PathBuf>,
pub denied_commands: Vec<String>,
}Expand description
Configuration for the subprocess containment ring.
Defines what paths, environment variables, and commands are permitted within the sandboxed arena. Deny rules always take precedence over allow rules — a fighter cannot punch through a denied path.
Fields§
§allowed_paths: Vec<PathBuf>Directories the subprocess is allowed to access.
denied_paths: Vec<PathBuf>Directories explicitly barred from the arena (e.g., /etc/shadow, ~/.ssh).
env_allowlist: Vec<String>Environment variable names to pass through the containment ring.
env_denylist: Vec<String>Environment variable patterns to block (supports glob: *_TOKEN, AWS_*).
max_output_bytes: usizeMaximum bytes of stdout+stderr to capture from the subprocess.
max_execution_secs: u64Maximum execution time in seconds before the subprocess is killed.
allow_network: boolWhether to allow network access from the subprocess.
working_dir: Option<PathBuf>Explicit working directory (must reside within allowed_paths).
denied_commands: Vec<String>Command prefixes that are unconditionally denied.
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