Skip to main content

classify_command

Function classify_command 

Source
pub fn classify_command(name: &str) -> Option<Effect>
Expand description

Best-effort Effect class for a CLI command by its program name (a bare basename, e.g. "rm"). Returns None for a name not in the curated table — callers that want a fail-safe default for unknown programs should use classify_invocation, which maps unknowns to Effect::Exec.

Multi-mode tools are mapped to their most security-salient common effect (gitEffect::Network, docker/npm/makeEffect::Exec, apt/mountEffect::Privileged); this is a heuristic, not a guarantee.