Skip to main content

is_allowed

Function is_allowed 

Source
pub fn is_allowed(name: &str) -> bool
Expand description

Whether name is on the fixed allowlist.

ยงExamples

use coding_tools::allowlist::is_allowed;

assert!(is_allowed("grep"));       // a built-in read-only command
assert!(is_allowed("ct-search"));  // the suite's own read-only tools
assert!(!is_allowed("rm"));        // not read-only, never runnable
assert!(!is_allowed("sh"));        // shell is excluded, so --shell is gated off