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

Function wrong_endpoint_denied

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

Source from the content-addressed store, hash-verified

1485
1486 #[test]
1487 fn wrong_endpoint_denied() {
1488 let engine = test_engine();
1489 let input = NetworkInput {
1490 host: "evil.example.com".into(),
1491 port: 443,
1492 binary_path: PathBuf::from("/usr/bin/node"),
1493 binary_sha256: "unused".into(),
1494 ancestors: vec![],
1495 cmdline_paths: vec![],
1496 };
1497 let decision = engine.evaluate_network(&input).unwrap();
1498 assert!(!decision.allowed);
1499 assert!(
1500 decision.reason.contains("endpoint"),
1501 "Expected endpoint deny reason, got: {}",
1502 decision.reason
1503 );
1504 }
1505
1506 #[test]
1507 fn unknown_binary_default_deny() {

Callers

nothing calls this directly

Calls 2

test_engineFunction · 0.85
evaluate_networkMethod · 0.80

Tested by

no test coverage detected