You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 855924f
Browse filesBrowse the repository at this point in the historyBrowse files
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
<[email protected]>
<!-- 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 <[email protected]>
Co-authored-by: Carlos Villela <[email protected]>
0 commit comments