Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions nemoclaw-blueprint/policies/openclaw-sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@ network_policies:
rules:
- allow: { method: GET, path: "/bot*/**" }
- allow: { method: POST, path: "/bot*/**" }
binaries:
- { path: /usr/local/bin/openclaw }
- { path: /usr/local/bin/node* }
- { path: /usr/bin/node* }
- { path: /usr/bin/python3* }
- { path: /usr/local/bin/python3* }
- { path: /usr/bin/curl }

discord:
name: discord
Expand Down Expand Up @@ -198,3 +205,10 @@ network_policies:
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
binaries:
- { path: /usr/local/bin/openclaw }
- { path: /usr/local/bin/node* }
- { path: /usr/bin/node* }
- { path: /usr/bin/python3* }
- { path: /usr/local/bin/python3* }
- { path: /usr/bin/curl }
7 changes: 7 additions & 0 deletions nemoclaw-blueprint/policies/presets/discord.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,10 @@ network_policies:
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
binaries:
- { path: /usr/local/bin/openclaw }
- { path: /usr/local/bin/node* }
- { path: /usr/bin/node* }
- { path: /usr/bin/python3* }
- { path: /usr/local/bin/python3* }
- { path: /usr/bin/curl }
37 changes: 13 additions & 24 deletions nemoclaw-blueprint/policies/presets/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,22 @@ network_policies:
endpoints:
- host: registry-1.docker.io
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
access: full
- host: auth.docker.io
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
access: full
- host: nvcr.io
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
access: full
- host: authn.nvidia.com
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
access: full
binaries:
- { path: /usr/bin/docker* }
- { path: /usr/local/bin/docker* }
- { path: /usr/local/bin/openclaw }
- { path: /usr/local/bin/node* }
- { path: /usr/bin/node* }
- { path: /usr/bin/python3* }
- { path: /usr/local/bin/python3* }
- { path: /usr/bin/curl }
10 changes: 10 additions & 0 deletions nemoclaw-blueprint/policies/presets/huggingface.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,13 @@ network_policies:
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
binaries:
- { path: /usr/local/bin/openclaw }
- { path: /usr/local/bin/node* }
- { path: /usr/bin/node* }
- { path: /usr/bin/python3* }
- { path: /usr/local/bin/python3* }
- { path: /usr/local/bin/huggingface-cli }
- { path: /usr/bin/curl }
- { path: /usr/bin/git }
- { path: /usr/bin/git-remote-http* }
7 changes: 7 additions & 0 deletions nemoclaw-blueprint/policies/presets/jira.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ network_policies:
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
binaries:
- { path: /usr/local/bin/openclaw }
- { path: /usr/local/bin/node* }
- { path: /usr/bin/node* }
- { path: /usr/bin/python3* }
- { path: /usr/local/bin/python3* }
- { path: /usr/bin/curl }
21 changes: 11 additions & 10 deletions nemoclaw-blueprint/policies/presets/npm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ network_policies:
endpoints:
- host: registry.npmjs.org
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
access: full
- host: registry.yarnpkg.com
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
access: full
binaries:
- { path: /usr/local/bin/npm* }
- { path: /usr/local/bin/npx* }
- { path: /usr/local/bin/node* }
- { path: /usr/local/bin/yarn* }
- { path: /usr/bin/npm* }
- { path: /usr/bin/npx* }
- { path: /usr/bin/node* }
- { path: /usr/bin/yarn* }
7 changes: 7 additions & 0 deletions nemoclaw-blueprint/policies/presets/outlook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,10 @@ network_policies:
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
binaries:
- { path: /usr/local/bin/openclaw }
- { path: /usr/local/bin/node* }
- { path: /usr/bin/node* }
- { path: /usr/bin/python3* }
- { path: /usr/local/bin/python3* }
- { path: /usr/bin/curl }
20 changes: 10 additions & 10 deletions nemoclaw-blueprint/policies/presets/pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ network_policies:
endpoints:
- host: pypi.org
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
access: full
- host: files.pythonhosted.org
port: 443
protocol: rest
enforcement: enforce
tls: terminate
rules:
- allow: { method: GET, path: "/**" }
access: full
binaries:
- { path: /usr/bin/python3* }
- { path: /usr/bin/pip* }
- { path: /usr/local/bin/python3* }
- { path: /usr/local/bin/pip* }
- { path: /sandbox/.venv/bin/python* }
- { path: /sandbox/.venv/bin/pip* }
- { path: /sandbox/.local/bin/pip* }
7 changes: 7 additions & 0 deletions nemoclaw-blueprint/policies/presets/slack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ network_policies:
rules:
- allow: { method: GET, path: "/**" }
- allow: { method: POST, path: "/**" }
binaries:
- { path: /usr/local/bin/openclaw }
- { path: /usr/local/bin/node* }
- { path: /usr/bin/node* }
- { path: /usr/bin/python3* }
- { path: /usr/local/bin/python3* }
- { path: /usr/bin/curl }
7 changes: 7 additions & 0 deletions nemoclaw-blueprint/policies/presets/telegram.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ network_policies:
rules:
- allow: { method: GET, path: "/bot*/**" }
- allow: { method: POST, path: "/bot*/**" }
binaries:
- { path: /usr/local/bin/openclaw }
- { path: /usr/local/bin/node* }
- { path: /usr/bin/node* }
- { path: /usr/bin/python3* }
- { path: /usr/local/bin/python3* }
- { path: /usr/bin/curl }
10 changes: 10 additions & 0 deletions test/policies.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,15 @@ describe("policies", () => {
expect(content.includes("network_policies:")).toBeTruthy();
}
});

it("every preset includes a binaries section", () => {
// Without binaries, the OPA rego policy in OpenShell's proxy can't
// match traffic to the network policy and returns 403 Forbidden.
// See: https://github.com/NVIDIA/NemoClaw/issues/19
for (const p of policies.listPresets()) {
const content = policies.loadPreset(p.name);
expect(content.includes("binaries:")).toBeTruthy();
}
});
});
});