Skip to main content

validate_allowed_command

Function validate_allowed_command 

Source
pub fn validate_allowed_command(program: &str, allowed: &[String]) -> Result<()>
Expand description

Validate that a command is in the allowed list.

Extracts the basename from the command path (e.g. /usr/bin/nodenode) and checks if it’s in the allow list.