forked from NVIDIA/NemoClaw
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpolicy-additions.yaml
More file actions
54 lines (54 loc) · 1.99 KB
/
Copy pathpolicy-additions.yaml
File metadata and controls
54 lines (54 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Sandbox policy additions for Pi. Principle: deny by default, allow only the
# managed inference route. Direct provider endpoints, package registries, and
# code-hosting endpoints are denied here and require explicit preset selection.
version: 1
filesystem_policy:
include_workdir: true
read_only:
- /usr
- /lib
- /proc
- /dev/urandom
- /etc
- /run/nemoclaw/managed-startup-ca-bundle.pem
- /var/log
- /var/lib/dpkg # Allow package-version inspection without package mutation.
read_write:
- /sandbox
- /sandbox/.pi
- /tmp
- /dev/null
landlock:
# Pi is a terminal agent, so filesystem policy must fail closed when Landlock
# cannot be applied. If the kernel or the workspace mount cannot enforce these
# read-only system paths, `strict` fails the OpenShell sandbox startup instead
# of starting with the paths unenforced.
compatibility: strict
process:
run_as_user: sandbox
run_as_group: sandbox
network_policies:
managed_inference:
name: managed_inference
endpoints:
- host: inference.local
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: POST, path: "/v1/chat/completions" }
- allow: { method: POST, path: "/v1/completions" }
- allow: { method: GET, path: "/v1/models" }
- allow: { method: GET, path: "/v1/models/**" }
# OpenShell observes Pi traffic as the Node.js interpreter that runs the
# installed package, so every image-owned path on that execution path is
# listed. Each one is root-owned and read-only to the agent; agent-writable
# paths under /sandbox are intentionally absent so a binary the agent
# controls cannot inherit network capability.
binaries:
- { path: /usr/local/bin/pi }
- { path: /usr/local/bin/node }
- { path: /usr/local/lib/nemoclaw/pi-runtime/** }