|
| 1 | +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +version: 1 |
| 5 | + |
| 6 | +# --- Sandbox setup configuration (queried once at startup) --- |
| 7 | + |
| 8 | +filesystem_policy: |
| 9 | + include_workdir: true |
| 10 | + read_only: |
| 11 | + - /usr |
| 12 | + - /lib |
| 13 | + - /proc |
| 14 | + - /dev/urandom |
| 15 | + - /app |
| 16 | + - /etc |
| 17 | + - /var/log |
| 18 | + - /opt |
| 19 | + read_write: |
| 20 | + - /sandbox |
| 21 | + - /tmp |
| 22 | + - /dev/null |
| 23 | + |
| 24 | +landlock: |
| 25 | + compatibility: best_effort |
| 26 | + |
| 27 | +process: |
| 28 | + run_as_user: sandbox |
| 29 | + run_as_group: sandbox |
| 30 | + |
| 31 | +# --- Network policies (queried per-CONNECT request) --- |
| 32 | +# |
| 33 | +# Each named policy maps a set of allowed (binary, endpoint) pairs. |
| 34 | +# Binary identity is resolved via /proc/net/tcp inode lookup + /proc/{pid}/exe. |
| 35 | +# Ancestors (/proc/{pid}/status PPid walk) and cmdline paths are also matched. |
| 36 | +# SHA256 integrity is enforced in Rust via trust-on-first-use, not here. |
| 37 | + |
| 38 | +network_policies: |
| 39 | + omp: |
| 40 | + name: omp |
| 41 | + endpoints: |
| 42 | + # API-key providers |
| 43 | + - { host: api.anthropic.com, port: 443 } |
| 44 | + - { host: api.openai.com, port: 443 } |
| 45 | + - { host: api.deepseek.com, port: 443 } |
| 46 | + - { host: generativelanguage.googleapis.com, port: 443 } |
| 47 | + - { host: api.mistral.ai, port: 443 } |
| 48 | + - { host: api.groq.com, port: 443 } |
| 49 | + - { host: api.cerebras.ai, port: 443 } |
| 50 | + - { host: api.x.ai, port: 443 } |
| 51 | + - { host: openrouter.ai, port: 443 } |
| 52 | + - { host: zenmux.ai, port: 443 } |
| 53 | + - { host: ai-gateway.vercel.sh, port: 443 } |
| 54 | + - { host: router.huggingface.co, port: 443 } |
| 55 | + - { host: api.fireworks.ai, port: 443 } |
| 56 | + - { host: api.together.ai, port: 443 } |
| 57 | + - { host: api.kimi.com, port: 443 } |
| 58 | + - { host: api.moonshot.ai, port: 443 } |
| 59 | + - { host: api.moonshot.cn, port: 443 } |
| 60 | + - { host: api.minimax.io, port: 443 } |
| 61 | + - { host: api.minimaxi.com, port: 443 } |
| 62 | + - { host: api.xiaomimimo.com, port: 443 } |
| 63 | + - { host: token-plan-cn.xiaomimimo.com, port: 443 } |
| 64 | + - { host: token-plan-ams.xiaomimimo.com, port: 443 } |
| 65 | + - { host: token-plan-sgp.xiaomimimo.com, port: 443 } |
| 66 | + - { host: api.z.ai, port: 443 } |
| 67 | + - { host: opencode.ai, port: 443 } |
| 68 | + # Cloud providers |
| 69 | + - { host: bedrock-runtime.us-east-1.amazonaws.com, port: 443 } |
| 70 | + - { host: bedrock-runtime.eu-central-1.amazonaws.com, port: 443 } |
| 71 | + - { host: api.cloudflare.com, port: 443 } |
| 72 | + - { host: gateway.ai.cloudflare.com, port: 443 } |
| 73 | + # Subscription login / token refresh endpoints |
| 74 | + - { host: claude.ai, port: 443 } |
| 75 | + - { host: platform.claude.com, port: 443 } |
| 76 | + - { host: auth.openai.com, port: 443 } |
| 77 | + - { host: chatgpt.com, port: 443 } |
| 78 | + # Google OAuth and Cloud Code Assist |
| 79 | + - { host: accounts.google.com, port: 443 } |
| 80 | + - { host: oauth2.googleapis.com, port: 443 } |
| 81 | + - { host: cloudcode-pa.googleapis.com, port: 443 } |
| 82 | + - { host: daily-cloudcode-pa.googleapis.com, port: 443 } |
| 83 | + # xAI OAuth |
| 84 | + - { host: auth.x.ai, port: 443 } |
| 85 | + - { host: cli-chat-proxy.grok.com, port: 443 } |
| 86 | + # NVIDIA |
| 87 | + - { host: integrate.api.nvidia.com, port: 443 } |
| 88 | + # GitHub, Copilot, and source-reading endpoints |
| 89 | + - { host: github.com, port: 443 } |
| 90 | + - { host: api.github.com, port: 443 } |
| 91 | + - { host: raw.githubusercontent.com, port: 443 } |
| 92 | + - { host: release-assets.githubusercontent.com, port: 443 } |
| 93 | + - { host: api.githubcopilot.com, port: 443 } |
| 94 | + - { host: api.individual.githubcopilot.com, port: 443 } |
| 95 | + - { host: api.business.githubcopilot.com, port: 443 } |
| 96 | + - { host: api.enterprise.githubcopilot.com, port: 443 } |
| 97 | + - { host: copilot-proxy.githubusercontent.com, port: 443 } |
| 98 | + - { host: default.exp-tas.com, port: 443 } |
| 99 | + binaries: |
| 100 | + - { path: /usr/local/bin/omp } |
| 101 | + - { path: /opt/bun/bin/bun } |
| 102 | + - { path: /opt/omp/node_modules/@oh-my-pi/pi-coding-agent/dist/cli.js } |
| 103 | + - { path: /usr/bin/curl } |
| 104 | + |
| 105 | + github_ssh_over_https: |
| 106 | + name: github-ssh-over-https |
| 107 | + endpoints: |
| 108 | + - host: github.com |
| 109 | + port: 443 |
| 110 | + protocol: rest |
| 111 | + enforcement: enforce |
| 112 | + rules: |
| 113 | + # Git Smart HTTP read-only: allow clone, fetch, pull |
| 114 | + # Discovery (query string is included in path matching) |
| 115 | + - allow: |
| 116 | + method: GET |
| 117 | + path: "/**/info/refs*" |
| 118 | + # Data transfer for reads (all repos) |
| 119 | + - allow: |
| 120 | + method: POST |
| 121 | + path: "/**/git-upload-pack" |
| 122 | + # Data transfer for writes |
| 123 | + # - allow: |
| 124 | + # method: POST |
| 125 | + # path: "/**/git-receive-pack" |
| 126 | + binaries: |
| 127 | + - { path: /usr/bin/git } |
| 128 | + |
| 129 | + # --- GitHub REST API (read-only) --- |
| 130 | + github_rest_api: |
| 131 | + name: github-rest-api |
| 132 | + endpoints: |
| 133 | + - host: api.github.com |
| 134 | + port: 443 |
| 135 | + protocol: rest |
| 136 | + enforcement: enforce |
| 137 | + access: read-only |
| 138 | + binaries: |
| 139 | + - { path: /usr/bin/gh } |
| 140 | + |
| 141 | + pypi: |
| 142 | + name: pypi |
| 143 | + endpoints: |
| 144 | + - { host: pypi.org, port: 443 } |
| 145 | + - { host: files.pythonhosted.org, port: 443 } |
| 146 | + # uv python install downloads from python-build-standalone on GitHub |
| 147 | + - { host: github.com, port: 443 } |
| 148 | + - { host: objects.githubusercontent.com, port: 443 } |
| 149 | + # uv resolves python-build-standalone release metadata via the GitHub API |
| 150 | + - { host: api.github.com, port: 443 } |
| 151 | + - { host: downloads.python.org, port: 443 } |
| 152 | + binaries: |
| 153 | + - { path: /sandbox/.venv/bin/python } |
| 154 | + - { path: /sandbox/.venv/bin/python3 } |
| 155 | + - { path: /sandbox/.venv/bin/pip } |
| 156 | + - { path: /app/.venv/bin/python } |
| 157 | + - { path: /app/.venv/bin/python3 } |
| 158 | + - { path: /app/.venv/bin/pip } |
| 159 | + - { path: /usr/local/bin/uv } |
| 160 | + # Managed Python installations from uv python install |
| 161 | + - { path: "/sandbox/.uv/python/**" } |
0 commit comments