Build a sandbox policy with standard filesystem/process/landlock settings.
(
network_policies: dict[str, sandbox_pb2.NetworkPolicyRule] | None = None,
)
| 38 | |
| 39 | |
| 40 | def _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 | |
| 53 | def _policy_for_python_proxy_tests() -> sandbox_pb2.SandboxPolicy: |
no outgoing calls
no test coverage detected