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

Function _default_policy

e2e/python/test_sandbox_providers.py:45–58  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

43
44
45def _default_policy() -> sandbox_pb2.SandboxPolicy:
46 """Build a sandbox policy with standard filesystem/process/landlock settings."""
47 return sandbox_pb2.SandboxPolicy(
48 version=1,
49 filesystem=sandbox_pb2.FilesystemPolicy(
50 include_workdir=True,
51 read_only=["/usr", "/lib", "/etc", "/app", "/dev/urandom"],
52 read_write=["/sandbox", "/tmp"],
53 ),
54 landlock=sandbox_pb2.LandlockPolicy(compatibility="best_effort"),
55 process=sandbox_pb2.ProcessPolicy(
56 run_as_user="sandbox", run_as_group="sandbox"
57 ),
58 )
59
60
61# ---------------------------------------------------------------------------

Calls

no outgoing calls

Tested by

no test coverage detected