pub enum SandboxEnvPolicy {
Inherit,
Filtered,
None,
}Expand description
capabilities.permissions.sandbox.env_policy (§3.1): child-process
environment sanitization for the spawned bash/shell subprocess.
Inherit (the default) is today’s behavior — the parent’s environment
(plus core.shell_env_snapshot, if configured) passes through
unchanged. Filtered strips a sensitive-variable denylist (tokens,
keys, cloud credentials). None keeps only PATH and a couple of
universally-needed variables (HOME, TERM, LANG) — nearest to a
bare-metal shell with nothing extra.
Variants§
Inherit
Full environment passthrough — today’s behavior (byte-identical).
Filtered
Strip a sensitive-variable denylist; everything else passes through.
None
Bare minimum: PATH/HOME/TERM/LANG only.
Implementations§
Source§impl SandboxEnvPolicy
impl SandboxEnvPolicy
Sourcepub fn rank(self) -> u8
pub fn rank(self) -> u8
Strictness rank — LOWER is stricter (None exposes the least,
Inherit the most), same convention as SandboxEscalation::rank.
Sourcepub fn parse(s: &str) -> Option<SandboxEnvPolicy>
pub fn parse(s: &str) -> Option<SandboxEnvPolicy>
Parse the config string ("inherit" | "filtered" | "none").
Trait Implementations§
Source§impl Clone for SandboxEnvPolicy
impl Clone for SandboxEnvPolicy
Source§fn clone(&self) -> SandboxEnvPolicy
fn clone(&self) -> SandboxEnvPolicy
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SandboxEnvPolicy
Source§impl Debug for SandboxEnvPolicy
impl Debug for SandboxEnvPolicy
Source§impl Default for SandboxEnvPolicy
impl Default for SandboxEnvPolicy
Source§fn default() -> SandboxEnvPolicy
fn default() -> SandboxEnvPolicy
impl Eq for SandboxEnvPolicy
Source§impl PartialEq for SandboxEnvPolicy
impl PartialEq for SandboxEnvPolicy
impl StructuralPartialEq for SandboxEnvPolicy
Auto Trait Implementations§
impl Freeze for SandboxEnvPolicy
impl RefUnwindSafe for SandboxEnvPolicy
impl Send for SandboxEnvPolicy
impl Sync for SandboxEnvPolicy
impl Unpin for SandboxEnvPolicy
impl UnsafeUnpin for SandboxEnvPolicy
impl UnwindSafe for SandboxEnvPolicy
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§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.