Skip to content

Commit 77051cc

Browse files
authored
fix(security): remove pre-allowed messaging from base sandbox policy (#1705)
## Summary - Removed Telegram (`api.telegram.org`) and Discord (`discord.com`, `gateway.discord.gg`, `cdn.discordapp.com`) from the base sandbox network policy - These endpoints gave every sandboxed agent default access to external messaging APIs without user opt-in — a data exfiltration vector - Users who configure messaging tokens during onboarding already get connectivity via the existing preset system (`presets/telegram.yaml`, `presets/discord.yaml`), which is applied automatically when tokens are detected ## Test plan - [x] Full vitest suite passes (1243 tests, 0 failures) - [x] Base policy YAML parses correctly - [x] No telegram/discord references remain in base policy - [ ] E2E: verify messaging preset auto-application when tokens are present <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Removed Telegram API endpoint from baseline network allow-list policies * Removed Discord API endpoints (REST and WebSocket gateway) from sandbox network policies * Updated network policy documentation to reflect removed endpoint groups <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Aaron Erickson <aerickson@nvidia.com>
1 parent 723f814 commit 77051cc

3 files changed

Lines changed: 0 additions & 56 deletions

File tree

.agents/skills/nemoclaw-user-reference/references/network-policies.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,6 @@ The following endpoint groups are allowed by default:
7373
- `/usr/local/bin/openclaw`, `/usr/local/bin/npm`, `/usr/local/bin/node`
7474
- All methods, all paths
7575

76-
* - `telegram`
77-
- `api.telegram.org:443`
78-
- Any binary
79-
- GET, POST on `/bot*/**`
80-
8176
:::
8277

8378
All endpoints use TLS termination and are enforced at port 443.

docs/reference/network-policies.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ The following endpoint groups are allowed by default:
9393
- `/usr/local/bin/openclaw`, `/usr/local/bin/npm`, `/usr/local/bin/node`
9494
- All methods, all paths
9595

96-
* - `telegram`
97-
- `api.telegram.org:443`
98-
- Any binary
99-
- GET, POST on `/bot*/**`
100-
10196
:::
10297

10398
All endpoints use TLS termination and are enforced at port 443.

nemoclaw-blueprint/policies/openclaw-sandbox.yaml

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -207,49 +207,3 @@ network_policies:
207207
- { path: /usr/local/bin/openclaw }
208208
- { path: /usr/local/bin/npm }
209209
- { path: /usr/local/bin/node }
210-
211-
# ── Messaging — pre-allowed for OpenClaw agent notifications ────
212-
# Restricted to node processes to prevent arbitrary data exfiltration
213-
# via curl, wget, python, etc. (See: #272)
214-
telegram:
215-
name: telegram
216-
endpoints:
217-
- host: api.telegram.org
218-
port: 443
219-
protocol: rest
220-
enforcement: enforce
221-
tls: terminate
222-
rules:
223-
- allow: { method: GET, path: "/bot*/**" }
224-
- allow: { method: POST, path: "/bot*/**" }
225-
- allow: { method: GET, path: "/file/bot*/**" }
226-
binaries:
227-
- { path: /usr/local/bin/node }
228-
229-
discord:
230-
name: discord
231-
endpoints:
232-
- host: discord.com
233-
port: 443
234-
protocol: rest
235-
enforcement: enforce
236-
tls: terminate
237-
rules:
238-
- allow: { method: GET, path: "/**" }
239-
- allow: { method: POST, path: "/**" }
240-
# WebSocket gateway — must use access: full (CONNECT tunnel) instead
241-
# of protocol: rest. The proxy's HTTP idle timeout (~2 min) kills
242-
# long-lived WebSocket connections; a CONNECT tunnel avoids
243-
# HTTP-level timeouts entirely. Matches presets/discord.yaml. See #409.
244-
- host: gateway.discord.gg
245-
port: 443
246-
access: full
247-
- host: cdn.discordapp.com
248-
port: 443
249-
protocol: rest
250-
enforcement: enforce
251-
tls: terminate
252-
rules:
253-
- allow: { method: GET, path: "/**" }
254-
binaries:
255-
- { path: /usr/local/bin/node }

0 commit comments

Comments
 (0)