pub struct SandboxConfig {
pub session_permission_mode: SessionPermissionMode,
pub enabled: bool,
pub default_policy: SandboxPolicy,
pub network: NetworkConfig,
pub sensitive_paths: SensitivePathsConfig,
pub resource_limits: ResourceLimitsConfig,
pub seccomp: SeccompConfig,
pub external: ExternalSandboxConfig,
}Expand description
Sandbox configuration
Fields§
§session_permission_mode: SessionPermissionModeExplicit session-only opt-in to unrestricted execution and automatic approval. This is never loaded from or persisted to workspace configuration.
enabled: boolEnable sandboxing for command execution
default_policy: SandboxPolicyDefault sandbox policy. Options: “read_only”, “workspace_write”, “danger_full_access”, “external”.
network: NetworkConfigNetwork egress configuration
sensitive_paths: SensitivePathsConfigSensitive path blocking configuration
resource_limits: ResourceLimitsConfigResource limits configuration
seccomp: SeccompConfigLinux-specific seccomp configuration
external: ExternalSandboxConfigExternal sandbox configuration (Docker, MicroVM, etc.)
Implementations§
Source§impl SandboxConfig
impl SandboxConfig
Sourcepub fn enable_full_access(&mut self)
pub fn enable_full_access(&mut self)
Enable unrestricted execution for the current session only.
pub fn is_full_access(&self) -> bool
Trait Implementations§
Source§impl Clone for SandboxConfig
impl Clone for SandboxConfig
Source§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
Source§impl JsonSchema for SandboxConfig
impl JsonSchema for SandboxConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Forget for SandboxConfig
impl Freeze for SandboxConfigwhere
*const u8 is !null: Freeze,
PhantomData<NetworkAllowlistEntryConfig>: Freeze,
PhantomData<String>: Freeze,
PhantomData<u8>: Freeze,
impl Move for SandboxConfig
impl RefUnwindSafe for SandboxConfig
impl Send for SandboxConfigwhere
RawVecInner: Send,
impl Sync for SandboxConfigwhere
RawVecInner: Sync,
impl Unpin for SandboxConfig
impl UnsafeUnpin for SandboxConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<NetworkAllowlistEntryConfig>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
impl UnwindSafe for SandboxConfigwhere
RawVecInner: UnwindSafe,
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