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

Function github_policy_allows_git

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

Source from the content-addressed store, hash-verified

1520
1521 #[test]
1522 fn github_policy_allows_git() {
1523 let engine = test_engine();
1524 let input = NetworkInput {
1525 host: "github.com".into(),
1526 port: 443,
1527 binary_path: PathBuf::from("/usr/bin/git"),
1528 binary_sha256: "unused".into(),
1529 ancestors: vec![],
1530 cmdline_paths: vec![],
1531 };
1532 let decision = engine.evaluate_network(&input).unwrap();
1533 assert!(
1534 decision.allowed,
1535 "Expected allow, got deny: {}",
1536 decision.reason
1537 );
1538 assert_eq!(
1539 decision.matched_policy.as_deref(),
1540 Some("github_ssh_over_https")
1541 );
1542 }
1543
1544 #[test]
1545 fn case_insensitive_host_matching() {

Callers

nothing calls this directly

Calls 2

test_engineFunction · 0.85
evaluate_networkMethod · 0.80

Tested by

no test coverage detected