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

Function strip_provider_rule_names

crates/openshell-policy/src/compose.rs:43–49  ·  view source on GitHub ↗
(policy: &mut SandboxPolicy)

Source from the content-addressed store, hash-verified

41}
42
43pub fn strip_provider_rule_names(policy: &mut SandboxPolicy) -> bool {
44 let original_len = policy.network_policies.len();
45 policy
46 .network_policies
47 .retain(|key, _| !is_provider_rule_name(key));
48 policy.network_policies.len() != original_len
49}
50
51/// Compose a normal sandbox policy from user-authored policy plus provider
52/// policy layers.

Callers 2

Calls 2

is_provider_rule_nameFunction · 0.85
lenMethod · 0.80

Tested by

no test coverage detected