#[non_exhaustive]pub enum IndirectExecution {
Eval,
ShellSpawn,
CommandWrapper,
SourceScript,
}Expand description
Classification of indirect execution patterns that may hide commands from static analysis.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Eval
eval "..." — argument string is executed as shell code.
Cannot be statically analyzed in the general case.
ShellSpawn
bash -c "..." / sh -c "..." — spawns a new shell with
inline code. Cannot be statically analyzed.
CommandWrapper
env cmd / command cmd / sudo cmd — transparent wrapper
around another command. Strip the wrapper and re-analyze.
SourceScript
source file / . file — executes a script in the current
shell. Contents cannot be statically analyzed.
Trait Implementations§
Source§impl Clone for IndirectExecution
impl Clone for IndirectExecution
Source§fn clone(&self) -> IndirectExecution
fn clone(&self) -> IndirectExecution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 IndirectExecution
impl Debug for IndirectExecution
Source§impl PartialEq for IndirectExecution
impl PartialEq for IndirectExecution
Source§fn eq(&self, other: &IndirectExecution) -> bool
fn eq(&self, other: &IndirectExecution) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for IndirectExecution
impl StructuralPartialEq for IndirectExecution
Auto Trait Implementations§
impl Freeze for IndirectExecution
impl RefUnwindSafe for IndirectExecution
impl Send for IndirectExecution
impl Sync for IndirectExecution
impl Unpin for IndirectExecution
impl UnsafeUnpin for IndirectExecution
impl UnwindSafe for IndirectExecution
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