pub struct ParsedCommand {
pub commands: Vec<String>,
pub assignments: Vec<(String, String)>,
pub substitutions: Vec<String>,
pub redirections: Vec<String>,
pub has_pipes: bool,
pub has_chains: bool,
pub has_subshell: bool,
pub has_process_substitution: bool,
pub pipeline_segments: Vec<String>,
}Expand description
Parsed representation of a bash command for security analysis.
Fields§
§commands: Vec<String>Top-level command names (the actual binaries being run).
assignments: Vec<(String, String)>Variable assignments (FOO=bar).
substitutions: Vec<String>Command substitutions ($(…) or ...).
redirections: Vec<String>Redirections (>, >>, <, 2>).
has_pipes: boolWhether the command uses pipes.
has_chains: boolWhether the command chains with && or ||.
has_subshell: boolWhether the command uses subshells ((…) or $(…)).
has_process_substitution: boolWhether the command uses process substitution <(…) or >(…).
pipeline_segments: Vec<String>Raw command strings from each pipeline segment.
Trait Implementations§
Source§impl Debug for ParsedCommand
impl Debug for ParsedCommand
Source§impl Default for ParsedCommand
impl Default for ParsedCommand
Source§fn default() -> ParsedCommand
fn default() -> ParsedCommand
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParsedCommand
impl RefUnwindSafe for ParsedCommand
impl Send for ParsedCommand
impl Sync for ParsedCommand
impl Unpin for ParsedCommand
impl UnsafeUnpin for ParsedCommand
impl UnwindSafe for ParsedCommand
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