Skip to content

Commit e9c8a9d

Browse files
author
OpenClaw Agent
committed
feat(policy): add GitHub Copilot API endpoints and update binary paths
- Add copilot_api policy with all endpoints from GitHub's official Copilot allowlist reference (api.githubcopilot.com, subscription-tier APIs, model proxy, telemetry, feature flags, updates) - Configure L7 inspection (protocol: rest, tls: terminate) on Copilot API endpoints for credential injection support - Add copilot and node binary paths to github_rest_api and github_ssh_over_https policies - Remove incomplete copilot policy (lacked L7 config and was missing individual/business tier endpoints) Tested end-to-end in a live OpenShell sandbox with proxy-based credential injection. All auth formats verified working (Bearer, token, Basic, query param).
1 parent 91d915d commit e9c8a9d

File tree

1 file changed

+29
-13
lines changed

1 file changed

+29
-13
lines changed

sandboxes/base/policy.yaml

Lines changed: 29 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,31 @@ 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_api:
108+
name: copilot-api
109+
endpoints:
110+
# Copilot API (subscription-tier routing)
111+
- { host: api.githubcopilot.com, port: 443, protocol: rest, tls: terminate, enforcement: enforce, access: read-write }
112+
- { host: api.individual.githubcopilot.com, port: 443, protocol: rest, tls: terminate, enforcement: enforce, access: read-write }
113+
- { host: api.business.githubcopilot.com, port: 443, protocol: rest, tls: terminate, enforcement: enforce, access: read-write }
114+
- { host: api.enterprise.githubcopilot.com, port: 443, protocol: rest, tls: terminate, enforcement: enforce, access: read-write }
115+
# Model proxy
116+
- { host: copilot-proxy.githubusercontent.com, port: 443, protocol: rest, tls: terminate, enforcement: enforce, access: read-write }
117+
# Telemetry, feature flags, updates
118+
- { host: origin-tracker.githubusercontent.com, port: 443 }
119+
- { host: telemetry.enterprise.githubcopilot.com, port: 443 }
120+
- { host: default.exp-tas.com, port: 443 }
121+
- { host: release-assets.githubusercontent.com, port: 443 }
122+
binaries:
123+
- { path: /usr/bin/node }
124+
- { path: /usr/bin/copilot }
125+
- { path: "/usr/lib/node_modules/**" }
97126

98127
pypi:
99128
name: pypi
@@ -160,19 +189,6 @@ network_policies:
160189
- path: /usr/bin/node
161190
- path: /usr/local/bin/opencode
162191

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-
176192
codex:
177193
name: codex
178194
endpoints:

0 commit comments

Comments
 (0)