Skip to content

Commit 8f7d0da

Browse files
htekdevOpenClaw AgentCopilot
authored
feat(policy): add GitHub Copilot API endpoints to base sandbox policy (#60)
* 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. * chore: bump @github/copilot to 1.0.16 in base sandbox Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: OpenClaw Agent <openclaw@htekdev.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 91d915d commit 8f7d0da

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

sandboxes/base/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ RUN npm install -g \
7575
@hono/node-server@1.19.11 \
7676
opencode-ai@1.2.18 \
7777
@openai/codex@0.117.0 \
78-
@github/copilot@1.0.9
78+
@github/copilot@1.0.16
7979

8080
# GitHub CLI
8181
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \

sandboxes/base/policy.yaml

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,30 @@ network_policies:
9595
- { path: /usr/local/bin/claude }
9696
- { path: /usr/bin/gh }
9797

98+
# --- GitHub Copilot API ---
99+
# Endpoints from https://docs.github.com/en/copilot/reference/copilot-allowlist-reference
100+
copilot:
101+
name: copilot
102+
endpoints:
103+
# Auth and user management
104+
- { host: github.com, port: 443 }
105+
- { host: api.github.com, port: 443 }
106+
# Copilot API (subscription-tier routing)
107+
- { host: api.githubcopilot.com, port: 443, protocol: rest, enforcement: enforce, access: read-write }
108+
- { host: api.individual.githubcopilot.com, port: 443, protocol: rest, enforcement: enforce, access: read-write }
109+
- { host: api.business.githubcopilot.com, port: 443, protocol: rest, enforcement: enforce, access: read-write }
110+
- { host: api.enterprise.githubcopilot.com, port: 443, protocol: rest, enforcement: enforce, access: read-write }
111+
# Model proxy
112+
- { host: copilot-proxy.githubusercontent.com, port: 443, protocol: rest, enforcement: enforce, access: read-write }
113+
# Telemetry, feature flags, updates
114+
- { host: origin-tracker.githubusercontent.com, port: 443 }
115+
- { host: telemetry.enterprise.githubcopilot.com, port: 443 }
116+
- { host: default.exp-tas.com, port: 443 }
117+
- { host: release-assets.githubusercontent.com, port: 443 }
118+
binaries:
119+
- { path: /usr/bin/copilot }
120+
- { path: "/usr/lib/node_modules/@github/copilot/node_modules/@github/**/copilot" }
121+
98122
pypi:
99123
name: pypi
100124
endpoints:
@@ -160,19 +184,6 @@ network_policies:
160184
- path: /usr/bin/node
161185
- path: /usr/local/bin/opencode
162186

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-
176187
codex:
177188
name: codex
178189
endpoints:

0 commit comments

Comments
 (0)