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

Function validate_rejects_path_too_long

crates/openshell-policy/src/lib.rs:1789–1803  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1787
1788 #[test]
1789 fn validate_rejects_path_too_long() {
1790 let mut policy = restrictive_default_policy();
1791 let long_path = format!("/{}", "a".repeat(5000));
1792 policy.filesystem = Some(FilesystemPolicy {
1793 include_workdir: true,
1794 read_only: vec![long_path],
1795 read_write: vec!["/tmp".into()],
1796 });
1797 let violations = validate_sandbox_policy(&policy).unwrap_err();
1798 assert!(
1799 violations
1800 .iter()
1801 .any(|v| matches!(v, PolicyViolation::FieldTooLong { .. }))
1802 );
1803 }
1804
1805 #[test]
1806 fn validate_rejects_tld_wildcard() {

Callers

nothing calls this directly

Calls 2

validate_sandbox_policyFunction · 0.85

Tested by

no test coverage detected