MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / generated_rule_name

Function generated_rule_name

crates/openshell-policy/src/merge.rs:303–310  ·  view source on GitHub ↗
(host: &str, port: u32)

Source from the content-addressed store, hash-verified

301}
302
303pub fn generated_rule_name(host: &str, port: u32) -> String {
304 let sanitized = host
305 .replace(['.', '-'], "_")
306 .chars()
307 .filter(|c| c.is_alphanumeric() || *c == '_')
308 .collect::<String>();
309 format!("allow_{sanitized}_{port}")
310}
311
312fn apply_operation(
313 policy: &mut SandboxPolicy,

Callers 1

build_policy_update_planFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected