pub struct CommandPolicyConfig {
pub mode: String,
pub allowlist: Vec<String>,
pub denylist: Vec<String>,
}Expand description
Command execution security policy configuration.
Controls which commands the shell and spawn tools are allowed to execute. In allowlist mode (default), only explicitly permitted commands can run. In denylist mode, any command not matching a blocked pattern is allowed.
Fields§
§mode: StringPolicy mode: “allowlist” (default, recommended) or “denylist”.
allowlist: Vec<String>Permitted command basenames when in allowlist mode. Overrides defaults when non-empty.
denylist: Vec<String>Blocked command patterns when in denylist mode. Overrides defaults when non-empty.
Trait Implementations§
Source§impl Clone for CommandPolicyConfig
impl Clone for CommandPolicyConfig
Source§fn clone(&self) -> CommandPolicyConfig
fn clone(&self) -> CommandPolicyConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommandPolicyConfig
impl Debug for CommandPolicyConfig
Source§impl Default for CommandPolicyConfig
impl Default for CommandPolicyConfig
Source§impl<'de> Deserialize<'de> for CommandPolicyConfig
impl<'de> Deserialize<'de> for CommandPolicyConfig
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
Auto Trait Implementations§
impl Freeze for CommandPolicyConfig
impl RefUnwindSafe for CommandPolicyConfig
impl Send for CommandPolicyConfig
impl Sync for CommandPolicyConfig
impl Unpin for CommandPolicyConfig
impl UnsafeUnpin for CommandPolicyConfig
impl UnwindSafe for CommandPolicyConfig
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