pub enum DangerousCommandClass {
RecursiveDelete,
DeviceWrite,
ForkBomb,
PipeToShell,
SystemShutdown,
PermissionEscalation,
ProcessTermination,
CredentialFileModification,
DiskWipe,
ReverseShell,
}Expand description
Classification of dangerous command patterns for exec mediation.
Each variant represents a class of commands that pose a security risk when executed by an extension. The classifier is deterministic: given the same command string, the same classification is always returned.
Variants§
RecursiveDelete
Recursive deletion targeting root or broad paths (rm -rf /).
DeviceWrite
Device-level writes (dd, mkfs, fdisk).
ForkBomb
Fork bomb or process exhaustion patterns.
PipeToShell
Pipe to shell execution (curl | sh, wget | bash).
SystemShutdown
System shutdown or reboot commands.
PermissionEscalation
Broad permission changes (chmod 777, chmod -R 777).
ProcessTermination
Killing critical system processes (kill -9 1, pkill init).
CredentialFileModification
Modifying /etc/passwd, /etc/shadow, or sudoers.
DiskWipe
Disk wipe or overwrite patterns (shred, wipefs).
ReverseShell
Network exfiltration via raw sockets or reverse shells.
Implementations§
Trait Implementations§
Source§impl Clone for DangerousCommandClass
impl Clone for DangerousCommandClass
Source§fn clone(&self) -> DangerousCommandClass
fn clone(&self) -> DangerousCommandClass
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DangerousCommandClass
impl Debug for DangerousCommandClass
Source§impl<'de> Deserialize<'de> for DangerousCommandClass
impl<'de> Deserialize<'de> for DangerousCommandClass
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>,
Source§impl Hash for DangerousCommandClass
impl Hash for DangerousCommandClass
Source§impl PartialEq for DangerousCommandClass
impl PartialEq for DangerousCommandClass
Source§impl Serialize for DangerousCommandClass
impl Serialize for DangerousCommandClass
impl Copy for DangerousCommandClass
impl Eq for DangerousCommandClass
impl StructuralPartialEq for DangerousCommandClass
Auto Trait Implementations§
impl Freeze for DangerousCommandClass
impl RefUnwindSafe for DangerousCommandClass
impl Send for DangerousCommandClass
impl Sync for DangerousCommandClass
impl Unpin for DangerousCommandClass
impl UnsafeUnpin for DangerousCommandClass
impl UnwindSafe for DangerousCommandClass
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more