This repository was archived by the owner on Oct 7, 2026. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathpolicy.yaml
More file actions
198 lines (182 loc) · 6.02 KB
/
Copy pathpolicy.yaml
File metadata and controls
198 lines (182 loc) · 6.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
version: 1
# --- Sandbox setup configuration (queried once at startup) ---
filesystem_policy:
include_workdir: true
read_only:
- /usr
- /lib
- /proc
- /dev/urandom
- /app
- /etc
- /var/log
read_write:
- /sandbox
- /tmp
- /dev/null
landlock:
compatibility: best_effort
process:
run_as_user: sandbox
run_as_group: sandbox
# --- Network policies (queried per-CONNECT request) ---
#
# Each named policy maps a set of allowed (binary, endpoint) pairs.
# Binary identity is resolved via /proc/net/tcp inode lookup + /proc/{pid}/exe.
# Ancestors (/proc/{pid}/status PPid walk) and cmdline paths are also matched.
# SHA256 integrity is enforced in Rust via trust-on-first-use, not here.
network_policies:
claude_code:
name: claude-code
endpoints:
- {
host: api.anthropic.com,
port: 443,
protocol: rest,
enforcement: enforce,
access: full,
tls: terminate,
}
- { host: statsig.anthropic.com, port: 443 }
- { host: sentry.io, port: 443 }
- { host: raw.githubusercontent.com, port: 443 }
- { host: platform.claude.com, port: 443 }
binaries:
- { path: /usr/local/bin/claude }
- { path: /usr/bin/node }
github_ssh_over_https:
name: github-ssh-over-https
endpoints:
- host: github.com
port: 443
protocol: rest
tls: terminate
enforcement: enforce
rules:
# Git Smart HTTP read-only: allow clone, fetch, pull
# Discovery (query string is included in path matching)
- allow:
method: GET
path: "/**/info/refs*"
# Data transfer for reads (all repos)
- allow:
method: POST
path: "/**/git-upload-pack"
# Data transfer for writes
# - allow:
# method: POST
# path: "/**/git-receive-pack"
binaries:
- { path: /usr/bin/git }
nvidia_inference:
name: nvidia-inference
endpoints:
- { host: integrate.api.nvidia.com, port: 443 }
binaries:
- { path: /usr/bin/curl }
- { path: /bin/bash }
- { path: /usr/local/bin/opencode }
# --- GitHub REST API (read-only) ---
github_rest_api:
name: github-rest-api
endpoints:
- host: api.github.com
port: 443
protocol: rest
tls: terminate
enforcement: enforce
access: read-only
binaries:
- { path: /usr/local/bin/claude }
- { path: /usr/bin/gh }
pypi:
name: pypi
endpoints:
- { host: pypi.org, port: 443 }
- { host: files.pythonhosted.org, port: 443 }
# uv python install downloads from python-build-standalone on GitHub
- { host: github.com, port: 443 }
- { host: objects.githubusercontent.com, port: 443 }
# uv resolves python-build-standalone release metadata via the GitHub API
- { host: api.github.com, port: 443 }
- { host: downloads.python.org, port: 443 }
binaries:
- { path: /sandbox/.venv/bin/python }
- { path: /sandbox/.venv/bin/python3 }
- { path: /sandbox/.venv/bin/pip }
- { path: /app/.venv/bin/python }
- { path: /app/.venv/bin/python3 }
- { path: /app/.venv/bin/pip }
- { path: /usr/local/bin/uv }
# Managed Python installations from uv python install
- { path: "/sandbox/.uv/python/**" }
vscode:
name: vscode
endpoints:
- { host: update.code.visualstudio.com, port: 443 }
# NOTE: OPA host matching uses exact equality, not glob — list hosts explicitly.
- { host: az764295.vo.msecnd.net, port: 443 }
- { host: vscode.download.prss.microsoft.com, port: 443 }
- { host: marketplace.visualstudio.com, port: 443 }
- { host: gallerycdn.vsassets.io, port: 443 }
binaries:
- { path: /usr/bin/curl }
- { path: /usr/bin/wget }
- { path: "/sandbox/.vscode-server/**" }
- { path: "/sandbox/.vscode-remote-containers/**" }
cursor:
name: cursor
endpoints:
- { host: cursor.blob.core.windows.net, port: 443 }
# NOTE: OPA host matching uses exact equality, not glob — list hosts explicitly.
- { host: api2.cursor.sh, port: 443 }
- { host: repo.cursor.sh, port: 443 }
- { host: download.cursor.sh, port: 443 }
- { host: cursor.download.prss.microsoft.com, port: 443 }
binaries:
- { path: /usr/bin/curl }
- { path: /usr/bin/wget }
- { path: "/sandbox/.cursor-server/**" }
opencode:
name: opencode
endpoints:
- host: registry.npmjs.org
port: 443
- host: opencode.ai
port: 443
- host: integrate.api.nvidia.com
port: 443
binaries:
- path: /usr/lib/node_modules/opencode-ai/bin/.opencode
- path: /usr/bin/node
- path: /usr/local/bin/opencode
copilot:
name: copilot
endpoints:
- { host: github.com, port: 443 }
- { host: api.github.com, port: 443 }
- { host: api.githubcopilot.com, port: 443 }
- { host: api.enterprise.githubcopilot.com, port: 443 }
- { host: release-assets.githubusercontent.com, port: 443 }
- { host: copilot-proxy.githubusercontent.com, port: 443 }
- { host: default.exp-tas.com, port: 443 }
binaries:
- {
path: /usr/lib/node_modules/@github/copilot/node_modules/@github/**/copilot,
}
gemini:
name: gemini
endpoints:
- { host: generativelanguage.googleapis.com, port: 443 }
- { host: "*-aiplatform.googleapis.com", port: 443 }
- { host: cloudcode-pa.googleapis.com, port: 443 }
- { host: accounts.google.com, port: 443 }
- { host: oauth2.googleapis.com, port: 443 }
- { host: www.googleapis.com, port: 443 }
- { host: iamcredentials.googleapis.com, port: 443 }
binaries:
- { path: /usr/bin/gemini }
- { path: /usr/lib/node_modules/@google/gemini-cli/dist/index.js }
- { path: /usr/bin/node }