Skip to main content

build_gate_script_checker

Function build_gate_script_checker 

Source
pub fn build_gate_script_checker(rules_dir: &Path) -> Arc<ScriptRuleChecker> 
Expand description

Build a ScriptRuleChecker from every *.rhai file in rules_dir. When the directory is absent/unreadable or holds no rule scripts, a no-op checker (that never allows anything) is returned, so the daemon can install it unconditionally. Each script receives a context map (tool / target / taint_level) and should evaluate to true to allow the call; the first script that allows wins and its file stem is the rule name.