Commit 855924f
fix(policy): restrict baseline npm_registry to openclaw binary only (#1700)
## Problem
With 'none' policy selected during onboard, `npm install` still
succeeded because the baseline policy (`openclaw-sandbox.yaml`) included
`/usr/local/bin/npm` and `/usr/local/bin/node` in the `npm_registry`
binaries list. This bypassed the user's intent of no external network
access.
The baseline `npm_registry` entry exists solely for `openclaw plugins
install` — not for agent-driven npm usage. Any sandbox with 'none'
preset should block npm from the agent.
## Fix
Removed `/usr/local/bin/npm` and `/usr/local/bin/node` from the baseline
`npm_registry` binaries list. Only `/usr/local/bin/openclaw` retains
access to `registry.npmjs.org` by default.
Users who need npm/node network access in the sandbox should add the
`npm` preset during onboard or afterwards via `nemoclaw policy`.
## Testing
- `nemoclaw onboard` with no policy presets → `npm install` should now
be blocked (403 Forbidden from proxy)
- `openclaw plugins install <plugin>` should still work (uses the
openclaw binary)
- `nemoclaw onboard` with npm preset → `npm install` still works as
expected
Fixes #1458
Signed-off-by: Benedikt Schackenberg
<6381261+BenediktSchackenberg@users.noreply.github.com>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added network policy entries to enable controlled Telegram and Discord
messaging access.
* **Chores**
* Restricted registry access so only the plugin installer retains direct
registry rights; npm/node are no longer allowed by default and require a
separate preset.
* **Documentation**
* Updated network policy docs to reflect stricter allowed binaries and
GET-only registry requests.
* **Tests**
* Added a regression test to enforce the registry access whitelist.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Benedikt Schackenberg <6381261+BenediktSchackenberg@users.noreply.github.com>
Co-authored-by: Carlos Villela <cvillela@nvidia.com>1 parent 27dda53 commit 855924f
4 files changed
Lines changed: 64 additions & 5 deletions
File tree
- .agents/skills/nemoclaw-user-reference/references
- docs/reference
- nemoclaw-blueprint/policies
- test
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
200 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
201 | 203 | | |
202 | 204 | | |
203 | 205 | | |
| |||
210 | 212 | | |
211 | 213 | | |
212 | 214 | | |
213 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
214 | 260 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
256 | 269 | | |
257 | 270 | | |
258 | 271 | | |
| |||
0 commit comments