Skip to main content

validate_exec_command_with_shell

Function validate_exec_command_with_shell 

Source
pub fn validate_exec_command_with_shell(
    cmd: &str,
    shell_mode: bool,
) -> Result<(), NikaError>
Expand description

Full security validation for exec commands with explicit shell mode flag.

When shell_mode is true, additionally blocks command substitution patterns ($(), backticks) that are only dangerous in shell mode.

§Errors

Returns BlockedCommand if any security check fails.