Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
With a workspace .cursor/sandbox.json that allowlists github.com (and related hosts), sandboxed curl https://github.com/ still fails.
Traffic is forced through the local sandbox HTTP proxy (https_proxy=http://127.0.0.1:<port>). The proxy resets the HTTPS CONNECT tunnel for allowlisted hosts.
This is not the auto-run / approval UX issue. The command already runs inside the sandbox without requesting full_network / network. The in-sandbox domain filter does not honor networkPolicy.allow for shell curl.
Related but different: Auto-Run network access `sandbox.json + Defaults` seems to not be working
That thread is about approval when the model requests generic network. Staff said the allowlist is a filter that applies once a command is running. In this case the filter still blocks allowlisted hosts.
Steps to Reproduce
- Use a workspace with
.cursor/sandbox.json:
{
"type": "workspace_readwrite",
"networkPolicy": {
"default": "deny",
"allow": [
"github.com",
"www.github.com",
"api.github.com",
"codeload.github.com",
"*.githubusercontent.com",
"registry.terraform.io",
"releases.hashicorp.com"
]
}
}
Keep Auto-Run / agent policy such that Shell runs in the default sandbox (no required_permissions: ["network"] / ["full_network"] / ["all"]).
Ask the agent (or run in the sandboxed Shell tool):
curl -v --connect-timeout 5 --max-time 15 https://github.com/ -o /dev/null
Also try another allowlisted host:
curl -sS -o /dev/null -w "%{http_code}\n" https://releases.hashicorp.com/
Compare with Cursor WebFetch on https://github.com/ (same allowlist).
### Expected Behavior
curl https://github.com/ succeeds inside the sandbox because github.com is in networkPolicy.allow.
Other allowlisted hosts (e.g. releases.hashicorp.com) also succeed.
Non-allowlisted hosts remain blocked.
With default sandbox proxy env (https_proxy=http://127.0.0.1:<port>):
* Establishing HTTP proxy tunnel to github.com:443
> CONNECT github.com:443 HTTP/1.1
* Recv failure: Connection reset by peer
curl: (56) Recv failure: Connection reset by peer
Allowlisted releases.hashicorp.com also fails (Proxy CONNECT aborted / reset).
Unsetting proxy / --noproxy '*' fails differently: Could not resolve host: github.com (direct DNS blocked; expected if all egress must go through the proxy).
Cursor WebFetch to https://github.com/ succeeds under the same allowlist.
The same curl succeeds only after escalating to full_network (outside the restricted sandbox path).
Proxy-related env in the sandbox includes HTTP(S)_PROXY / http(s)_proxy pointing at 127.0.0.1, plus SOCKS vars.
Failure mode looks like broken/incomplete enforcement of networkPolicy.allow on the HTTPS CONNECT proxy used by Shell, not missing allowlist entries in sandbox.json.
### Operating System
Linux
### Version Information
Version: 3.21.18
VS Code Extension API: 1.128.0
Commit: c4730f7d93d787d9ab120af715999f0345ee5bc0
Date: 2026-09-22T02:04:34.641Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 42.10.0
Chromium: 148.0.7778.280
Node.js: 24.18.1
V8: 14.8.178.38-electron.0
xterm.js: 6.1.0-beta.291
OS: Linux x64 6.8.0-139-generic
### Does this stop you from using Cursor
No - Cursor works, but with this issue