pub struct LocalSandbox;Expand description
Runs commands directly on the host with sh -c.
No containment. The command can read and write anything the current
user can, and use the network. The environment is still reduced to the
allowlist and the cwd is still confined to the workspace, but a command
can cd anywhere. Use it only with trusted models or behind an approval
hook.
Trait Implementations§
Source§impl Clone for LocalSandbox
impl Clone for LocalSandbox
Source§impl Debug for LocalSandbox
impl Debug for LocalSandbox
Source§impl Default for LocalSandbox
impl Default for LocalSandbox
Source§impl Sandbox for LocalSandbox
impl Sandbox for LocalSandbox
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Short name recorded in receipts, for example
local or bubblewrap.Source§fn is_available(&self) -> bool
fn is_available(&self) -> bool
Whether this backend can run commands here.
Source§fn is_contained(&self) -> bool
fn is_contained(&self) -> bool
Whether the backend confines writes to the workspace.
fn run<'life0, 'life1, 'async_trait>(
&'life0 self,
cmd: &'life1 SandboxCommand,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput, ExecError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn enforces_deny_read(&self) -> bool
fn enforces_deny_read(&self) -> bool
Whether the backend keeps a command from reading the paths in
SandboxCommand::deny_read. Default false: a backend claims it
only when it enforces it, and callers refuse rather than pretend.Source§fn enforces_network_off(&self) -> bool
fn enforces_network_off(&self) -> bool
Whether the backend cuts the network when
SandboxCommand::allow_network is false. Default false, as for
Sandbox::enforces_deny_read.Auto Trait Implementations§
impl Forget for LocalSandbox
impl Freeze for LocalSandbox
impl Move for LocalSandbox
impl RefUnwindSafe for LocalSandbox
impl Send for LocalSandbox
impl Sync for LocalSandbox
impl Unpin for LocalSandbox
impl UnsafeUnpin for LocalSandbox
impl UnwindSafe for LocalSandbox
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