forked from NVIDIA/NemoClaw
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpolicy-additions.yaml
More file actions
235 lines (223 loc) · 6.96 KB
/
Copy pathpolicy-additions.yaml
File metadata and controls
235 lines (223 loc) · 6.96 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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# 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 / .hermes-data instead of .openclaw / .openclaw-data
# - 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
- /proc
- /dev/urandom
- /app
- /etc
- /var/log
- /sandbox/.hermes # Immutable config (Landlock enforced)
read_write:
- /sandbox
- /tmp
- /dev/null
- /sandbox/.hermes-data # Writable agent state (symlinked from .hermes)
landlock:
compatibility: best_effort
process:
run_as_user: sandbox
run_as_group: sandbox
network_policies:
# ── Managed inference — primary egress path for the agent ─────
# All Hermes inference traffic goes through inference.local, the
# OpenShell gateway's virtual provider router. OpenShell terminates
# TLS, swaps in the host-side credential for whichever provider
# was selected during onboard (Anthropic / OpenAI / Gemini /
# NVIDIA Endpoints / custom OpenAI-compatible / custom
# Anthropic-compatible / Ollama / vLLM / NIM), and forwards.
# This single policy entry covers every supported provider —
# Hermes never directly contacts a provider host while running
# under NemoClaw.
managed_inference:
name: managed_inference
endpoints:
- host: inference.local
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: /usr/bin/python3.11 }
- { path: /usr/bin/curl }
- { path: /usr/local/bin/curl }
claude_code:
name: claude_code
endpoints:
- host: api.anthropic.com
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: POST, path: "/v1/messages" }
- allow: { method: POST, path: "/v1/messages/batches" }
- allow: { method: GET, path: "/v1/messages/batches/**" }
- allow: { method: POST, path: "/v1/complete" }
- host: statsig.anthropic.com
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: POST, path: "/**" }
- host: sentry.io
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: POST, path: "/api/*/envelope/**" }
- allow: { method: POST, path: "/api/*/store/**" }
binaries:
- { path: /usr/local/bin/claude }
nvidia:
name: nvidia
endpoints:
- host: integrate.api.nvidia.com
port: 443
protocol: rest
enforcement: enforce
tls: terminate
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/**" }
- host: inference-api.nvidia.com
port: 443
protocol: rest
enforcement: enforce
tls: terminate
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/claude }
- { path: /usr/local/bin/hermes }
- { path: /usr/bin/python3.11 }
github:
name: github
endpoints:
- host: github.com
port: 443
access: full
- host: api.github.com
port: 443
access: full
binaries:
- { path: /usr/bin/gh }
- { path: /usr/bin/git }
# ── Nous Research — Hermes auth, updates, portal ──────────────
nous_research:
name: nous_research
endpoints:
- host: nousresearch.com
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
- host: hermes-agent.nousresearch.com
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
- host: api.nousresearch.com
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
binaries:
- { path: /usr/local/bin/hermes }
- { path: /usr/bin/python3.11 }
# ── PyPI — needed for pip install (skill/plugin deps) ─────────
pypi:
name: pypi
endpoints:
- host: pypi.org
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
- host: files.pythonhosted.org
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
binaries:
- { path: /usr/local/bin/pip3 }
- { path: /usr/bin/python3.11 }
# ── Messaging — pre-allowed for agent notifications ───────────
telegram:
name: telegram
endpoints:
- host: api.telegram.org
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/bot*/**" }
- allow: { method: POST, path: "/bot*/**" }
- allow: { method: GET, path: "/file/bot*/**" }
binaries:
- { path: /usr/local/bin/node }
- { path: /usr/bin/python3.11 }
discord:
name: discord
endpoints:
- host: discord.com
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
- host: gateway.discord.gg
port: 443
access: full
- host: cdn.discordapp.com
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
binaries:
- { path: /usr/local/bin/node }
- { path: /usr/bin/python3.11 }