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

Function wrong_binary_denied

crates/openshell-supervisor-network/src/opa.rs:1467–1484  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1465
1466 #[test]
1467 fn wrong_binary_denied() {
1468 let engine = test_engine();
1469 let input = NetworkInput {
1470 host: "api.anthropic.com".into(),
1471 port: 443,
1472 binary_path: PathBuf::from("/usr/bin/python3"),
1473 binary_sha256: "unused".into(),
1474 ancestors: vec![],
1475 cmdline_paths: vec![],
1476 };
1477 let decision = engine.evaluate_network(&input).unwrap();
1478 assert!(!decision.allowed);
1479 assert!(
1480 decision.reason.contains("not allowed"),
1481 "Expected specific deny reason, got: {}",
1482 decision.reason
1483 );
1484 }
1485
1486 #[test]
1487 fn wrong_endpoint_denied() {

Callers

nothing calls this directly

Calls 2

test_engineFunction · 0.85
evaluate_networkMethod · 0.80

Tested by

no test coverage detected