Commit 48dfe92
committed
fix(policy): allow npm child process and Vertex AI egress for opencode
The opencode network policy allowlists registry.npmjs.org as an endpoint
but not the npm binary, so opencode's background dependency install
(arborist) connects as /usr/local/bin/npm and is denied (ECONNRESET).
Add /usr/local/bin/npm and /usr/bin/npm to the binaries allowlist,
matching the dedicated npm policies in the droid and ollama sandboxes.
The policy also had no Google egress, so running opencode against a
google-vertex-* provider could not reach Vertex AI or the Google token
endpoints. Add the Vertex AI + token hosts (mirroring the gemini policy)
plus sts.googleapis.com, which GitHub-OIDC Workload Identity Federation
requires for token exchange. Also add models.opencode.ai so opencode
does not silently fall back to its built-in default model.
Applied identically to the base and gemini sandbox policies.
Signed-off-by: Yvonne Devlin <ydevlin@redhat.com>1 parent fffb6b2 commit 48dfe92
2 files changed
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
180 | 182 | | |
181 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
182 | 198 | | |
183 | 199 | | |
184 | 200 | | |
185 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
186 | 206 | | |
187 | 207 | | |
188 | 208 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
163 | 165 | | |
164 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
165 | 181 | | |
166 | 182 | | |
167 | 183 | | |
168 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
169 | 189 | | |
170 | 190 | | |
171 | 191 | | |
| |||
0 commit comments