Skip to content

Commit 0156ab9

Browse files
author
OpenClaw Agent
committed
feat(policy): add missing Copilot API endpoints to base sandbox policy
The existing copilot policy was missing endpoints needed for Copilot CLI to function inside OpenShell sandboxes. This adds: - api.individual/business.githubcopilot.com (subscription-tier routing) - origin-tracker.githubusercontent.com (tracking) - telemetry.enterprise.githubcopilot.com (telemetry) - L7 inspection config (protocol: rest, tls: terminate) on API endpoints for proxy-based credential injection support - Additional binary paths (/usr/bin/node, /usr/bin/copilot, node_modules) Also adds copilot/node binary paths to github_rest_api and github_ssh_over_https policies so Copilot can access GitHub API and git. Tested end-to-end in a live OpenShell sandbox with proxy-based credential injection. All auth formats verified working.
1 parent 91d915d commit 0156ab9

File tree

1 file changed

+33
-13
lines changed

1 file changed

+33
-13
lines changed

sandboxes/base/policy.yaml

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ network_policies:
7171
# path: "/**/git-receive-pack"
7272
binaries:
7373
- { path: /usr/bin/git }
74+
- { path: /usr/bin/node }
75+
- { path: /usr/bin/copilot }
76+
- { path: "/usr/lib/node_modules/**" }
77+
- { path: "/usr/lib/git-core/**" }
7478

7579
nvidia_inference:
7680
name: nvidia-inference
@@ -94,6 +98,35 @@ network_policies:
9498
binaries:
9599
- { path: /usr/local/bin/claude }
96100
- { path: /usr/bin/gh }
101+
- { path: /usr/bin/node }
102+
- { path: /usr/bin/copilot }
103+
- { path: "/usr/lib/node_modules/**" }
104+
105+
# --- GitHub Copilot API ---
106+
# Endpoints from https://docs.github.com/en/copilot/reference/copilot-allowlist-reference
107+
copilot:
108+
name: copilot
109+
endpoints:
110+
# Auth and user management
111+
- { host: github.com, port: 443 }
112+
- { host: api.github.com, port: 443 }
113+
# Copilot API (subscription-tier routing)
114+
- { host: api.githubcopilot.com, port: 443, protocol: rest, enforcement: enforce, access: read-write }
115+
- { host: api.individual.githubcopilot.com, port: 443, protocol: rest, enforcement: enforce, access: read-write }
116+
- { host: api.business.githubcopilot.com, port: 443, protocol: rest, enforcement: enforce, access: read-write }
117+
- { host: api.enterprise.githubcopilot.com, port: 443, protocol: rest, enforcement: enforce, access: read-write }
118+
# Model proxy
119+
- { host: copilot-proxy.githubusercontent.com, port: 443, protocol: rest, enforcement: enforce, access: read-write }
120+
# Telemetry, feature flags, updates
121+
- { host: origin-tracker.githubusercontent.com, port: 443 }
122+
- { host: telemetry.enterprise.githubcopilot.com, port: 443 }
123+
- { host: default.exp-tas.com, port: 443 }
124+
- { host: release-assets.githubusercontent.com, port: 443 }
125+
binaries:
126+
- { path: /usr/bin/node }
127+
- { path: /usr/bin/copilot }
128+
- { path: "/usr/lib/node_modules/@github/copilot/node_modules/@github/**/copilot" }
129+
- { path: "/usr/lib/node_modules/**" }
97130

98131
pypi:
99132
name: pypi
@@ -160,19 +193,6 @@ network_policies:
160193
- path: /usr/bin/node
161194
- path: /usr/local/bin/opencode
162195

163-
copilot:
164-
name: copilot
165-
endpoints:
166-
- { host: github.com, port: 443 }
167-
- { host: api.github.com, port: 443 }
168-
- { host: api.githubcopilot.com, port: 443 }
169-
- { host: api.enterprise.githubcopilot.com, port: 443 }
170-
- { host: release-assets.githubusercontent.com, port: 443 }
171-
- { host: copilot-proxy.githubusercontent.com, port: 443 }
172-
- { host: default.exp-tas.com, port: 443 }
173-
binaries:
174-
- { path: /usr/lib/node_modules/@github/copilot/node_modules/@github/**/copilot }
175-
176196
codex:
177197
name: codex
178198
endpoints:

0 commit comments

Comments
 (0)