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

Function eval_l7

crates/openshell-supervisor-network/src/opa.rs:2236–2243  ·  view source on GitHub ↗
(engine: &OpaEngine, input: &serde_json::Value)

Source from the content-addressed store, hash-verified

2234 }
2235
2236 fn eval_l7(engine: &OpaEngine, input: &serde_json::Value) -> bool {
2237 let mut eng = engine.engine.lock().unwrap();
2238 eng.set_input_json(&input.to_string()).unwrap();
2239 let val = eng
2240 .eval_rule("data.openshell.sandbox.allow_request".into())
2241 .unwrap();
2242 val == regorus::Value::from(true)
2243 }
2244
2245 fn eval_l7_raw_data(data: serde_json::Value, input: serde_json::Value) -> bool {
2246 let mut engine = regorus::Engine::new();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected