Skip to main content

SandboxSettings

Struct SandboxSettings 

Source
pub struct SandboxSettings {
    pub read_roots: Vec<String>,
    pub proxy_port: Option<NonZeroU16>,
    pub proxy_allow_ech: bool,
    pub proxy_serve_without_credential: bool,
    pub package_min_release_age_days: Option<u16>,
    pub env: Option<RunEnv>,
    pub env_allow: Vec<String>,
    pub project_top: ProjectTop,
    pub project_hook_off: ProjectHookOff,
    pub strict: bool,
    pub vm: Option<VmSettings>,
}
Expand description

The sandbox: section (ADR-018, ADR-019).

Fields§

§read_roots: Vec<String>

Paths (directories or files) the OS layers let commands read although no allow rule covers them: system and toolchain directories every build reads. The hook decision ignores them, and deny rules win over them in every layer. Absolute or ~/…, never a glob.

§proxy_port: Option<NonZeroU16>

The loopback port moat proxy listens on and the host sandboxes send their commands’ traffic to; absent, the CLI’s default.

§proxy_allow_ech: bool

Let moat proxy forward a TLS ClientHello that carries an encrypted server name (ECH, ESNI). Off, such a tunnel is refused: the server acts on the encrypted name, which may be another site than the allowed host.

§proxy_serve_without_credential: bool

Let moat proxy serve a request that carries no session credential, with no session (ADR-044). Off, such a request gets 407: a session’s taint and connection share cannot be escaped by sending no credential, and other local processes cannot use the proxy. moat run ignores it.

§package_min_release_age_days: Option<u16>

Days a package version must have been published before the package managers moat run starts install it (ADR-030); 0 turns this off, absent is 7 days (Policy::package_min_release_age_days).

§env: Option<RunEnv>

Whether openmoat run passes on the whole environment it is started from or only its allowlist (ADR-105); absent, RunEnv::DEFAULT. require.run: full-boundary scrubs whatever this says. Read from the person’s own policy alone: a repository policy or a pack has no sandbox:.

§env_allow: Vec<String>

Names of inherited environment variables openmoat run passes on when it scrubs the environment, beyond its own list and the agent’s (ADR-077, ADR-105). Names only, never a pattern. Read from the person’s own policy alone: a repository policy or a pack has no sandbox:.

§project_top: ProjectTop

What openmoat run’s Lightweight tier on Linux without a network namespace grants at the top of the project (ADR-090): protected grants it entry by entry, so nothing can be created there and .env, .git and .moat stay covered; writable grants it whole, so new entries and save-by-rename work there and those paths are open to the agent’s commands. Never read by the Isolated tier or the network namespace. Read from the person’s own policy alone: a repository policy or a pack has no sandbox:.

§project_hook_off: ProjectHookOff

What openmoat run does when a file of the project would turn the agent’s OpenMoat hook off as the session starts (ADR-098): refuse (absent) does not start the agent; start starts it anyway, says so and records it. Read from the person’s own policy alone: a repository policy or a pack has no sandbox:.

§strict: bool

openmoat run starts only when every kernel feature of its protection score is in force (ADR-108): planned before the start, confirmed after it, so a missing Landlock step, a port-only network or the Lightweight tier refuses the run (fail closed). Read from the person’s own policy alone: a repository policy or a pack has no sandbox:.

§vm: Option<VmSettings>

The guest image and size of openmoat run --vm’s microVM tier (ADR-128, a design: the tier does not boot yet). Read from the person’s own policy alone.

Trait Implementations§

Source§

impl Clone for SandboxSettings

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SandboxSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SandboxSettings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for SandboxSettings

Source§

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 Eq for SandboxSettings

Source§

impl PartialEq for SandboxSettings

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for SandboxSettings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for SandboxSettings

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.