-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix(policy): restrict baseline npm_registry to openclaw binary only #1700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6ac2667
429ae49
ea1b203
dd061c4
8d7c9cc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,8 +196,10 @@ network_policies: | |
| binaries: | ||
| - { path: /usr/local/bin/openclaw } | ||
|
|
||
| # npm registry — needed for `openclaw plugins install` and `npm install`. | ||
| # Read-only: agents only fetch packages, never publish. | ||
| # npm registry — needed for `openclaw plugins install` only. | ||
| # Restricted to the openclaw binary so agents cannot use npm directly. | ||
| # Users who need npm/node access should add the npm policy preset during onboard. | ||
| # Ref: https://github.com/NVIDIA/NemoClaw/issues/1458 | ||
| npm_registry: | ||
| name: npm_registry | ||
|
Comment on lines
+199
to
204
|
||
| endpoints: | ||
|
|
@@ -210,5 +212,49 @@ network_policies: | |
| - allow: { method: GET, path: "/**" } | ||
| binaries: | ||
| - { path: /usr/local/bin/openclaw } | ||
|
Comment on lines
203
to
214
|
||
| - { path: /usr/local/bin/npm } | ||
|
|
||
| # ── Messaging — pre-allowed for OpenClaw agent notifications ──── | ||
| # Restricted to node processes to prevent arbitrary data exfiltration | ||
| # via curl, wget, python, etc. (See: #272) | ||
| 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 } | ||
|
|
||
| discord: | ||
| name: discord | ||
| endpoints: | ||
| - host: discord.com | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| tls: terminate | ||
| rules: | ||
| - allow: { method: GET, path: "/**" } | ||
| - allow: { method: POST, path: "/**" } | ||
| # WebSocket gateway — must use access: full (CONNECT tunnel) instead | ||
| # of protocol: rest. The proxy's HTTP idle timeout (~2 min) kills | ||
| # long-lived WebSocket connections; a CONNECT tunnel avoids | ||
| # HTTP-level timeouts entirely. Matches presets/discord.yaml. See #409. | ||
| - 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 } | ||
Uh oh!
There was an error while loading. Please reload this page.