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
153 lines (144 loc) · 5.69 KB
/
Copy pathpolicy-additions.yaml
File metadata and controls
153 lines (144 loc) · 5.69 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Sandbox policy for the Hermes Agent.
# Based on the OpenClaw policy with agent-specific adjustments:
# - .hermes instead of .openclaw (single config/state directory)
# - Nous Research phone-home endpoints instead of OpenClaw/ClawHub
# - PyPI instead of npm registry
# - /usr/local/bin/hermes and python3 binary restrictions
#
# Principle: deny by default, allow only what's needed for core functionality.
version: 1
filesystem_policy:
include_workdir: true
read_only:
- /usr
- /lib
- /opt/hermes
- /proc
- /dev/urandom
- /app
- /etc
- /run/nemoclaw/managed-startup-ca-bundle.pem
- /var/log
- /var/lib/dpkg # Allow package-version inspection without package mutation.
read_write:
- /sandbox
- /tmp
- /dev/null
- /dev/pts # PTY multiplexer + slave devices (devpts).
# The Hermes TUI (prompt_toolkit), the web
# dashboard's interactive chat pty bridge,
# and terminal.backend: local all allocate a
# PTY via openpty()/forkpty(), opening
# /dev/ptmx (-> /dev/pts/ptmx) and a
# /dev/pts/<n> slave. Without this grant
# landlock denies the open with EACCES, which
# the dashboard surfaces as "Chat failed to
# start: out of pty devices" and which breaks
# any interactive shell tool. Grant the
# directory, not /dev/ptmx itself — it is a
# symlink the supervisor refuses to chown.
# Mirrors the OpenClaw policy grant (#4513).
# Agent config/state root. Shields-up locks config.yaml/.env and the
# parent directory, but intentionally leaves /sandbox/.hermes/.hermes_history
# as sandbox:sandbox 0660 because prompt_toolkit FileHistory appends there
# on every Hermes TUI keypress. Remove that exception if upstream supports
# redirecting or disabling file history.
- /sandbox/.hermes
landlock:
compatibility: best_effort
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/messages" }
- allow: { method: POST, path: "/v1/responses" }
- allow: { method: POST, path: "/v1/completions" }
- allow: { method: POST, path: "/v1/embeddings" }
- allow: { method: GET, path: "/v1/models" }
- allow: { method: GET, path: "/v1/models/**" }
binaries:
- { path: /usr/local/bin/hermes }
- { path: /usr/bin/python3.11 }
- { path: /opt/hermes/.venv/bin/python }
nvidia:
name: nvidia
endpoints:
- host: integrate.api.nvidia.com
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: POST, path: "/v1/chat/completions" }
- allow: { method: POST, path: "/v1/completions" }
- allow: { method: POST, path: "/v1/embeddings" }
- allow: { method: GET, path: "/v1/models" }
- allow: { method: GET, path: "/v1/models/**" }
binaries:
- { path: /usr/local/bin/hermes }
- { path: /usr/bin/python3* }
- { path: /opt/hermes/.venv/bin/python }
# NOTE: github.com / api.github.com and the git binary used to
# live in this base policy and were therefore granted to every
# Hermes sandbox regardless of user opt-in. They have been moved
# into a discoverable preset (`presets/github.yaml`) so a sandbox
# only gets GitHub access when the user explicitly selects the
# `github` preset during onboard.
# ── Nous Research — public metadata and agent updates ─────────
# Nous Portal OAuth, managed inference, and managed tool gateway auth are
# host-managed by NemoClaw/OpenShell. The sandbox should not reach the Portal
# or Nous vendor gateway hosts directly.
nous_research:
name: nous_research
endpoints:
- host: nousresearch.com
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
- host: hermes-agent.nousresearch.com
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
binaries:
- { path: /usr/local/bin/hermes }
- { path: /usr/bin/python3* }
- { path: /opt/hermes/.venv/bin/python }
# ── PyPI — needed for pip install (skill/plugin deps) ─────────
pypi:
name: pypi
endpoints:
- host: pypi.org
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/**" }
- host: files.pythonhosted.org
port: 443
protocol: rest
enforcement: enforce
rules:
- allow: { method: GET, path: "/**" }
binaries:
- { path: /usr/bin/curl }
- { path: /usr/local/bin/pip3 }
- { path: /usr/local/bin/curl }
- { path: /usr/bin/python3* }
- { path: /opt/hermes/.venv/bin/python }