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

Function _base_policy

e2e/python/test_sandbox_policy.py:40–50  ·  view source on GitHub ↗

Build a sandbox policy with standard filesystem/process/landlock settings.

(
    network_policies: dict[str, sandbox_pb2.NetworkPolicyRule] | None = None,
)

Source from the content-addressed store, hash-verified

38
39
40def _base_policy(
41 network_policies: dict[str, sandbox_pb2.NetworkPolicyRule] | None = None,
42) -> sandbox_pb2.SandboxPolicy:
43 """Build a sandbox policy with standard filesystem/process/landlock settings."""
44 return sandbox_pb2.SandboxPolicy(
45 version=1,
46 filesystem=_BASE_FILESYSTEM,
47 landlock=_BASE_LANDLOCK,
48 process=_BASE_PROCESS,
49 network_policies=network_policies or {},
50 )
51
52
53def _policy_for_python_proxy_tests() -> sandbox_pb2.SandboxPolicy:

Calls

no outgoing calls

Tested by

no test coverage detected