Skip to main content

telos_agent/tools/command_security/powershell/
path_validation.rs

1pub fn has_write_redirection(command: &str) -> bool {
2    command.contains('>') && !command.contains("*>$null") && !command.contains("> $null")
3}
4
5pub fn has_assignment(command: &str) -> bool {
6    let trimmed = command.trim_start();
7    trimmed.starts_with('$') && trimmed.contains('=')
8}