Security
Your coding agent's sandbox probably isn't the safety boundary you think it is
GitHub spent the last three weeks shipping a feature that agentic coding tools have needed for a while: a real OS-level sandbox for Copilot CLI, restricting what an autonomous coding agent can touch on your machine. It…
GitHub spent the last three weeks shipping a feature that agentic coding tools have needed for a while: a real OS-level sandbox for Copilot CLI, restricting what an autonomous coding agent can touch on your machine. It went to public preview on September 25, 2026 (GitHub Changelog), and GitHub has kept iterating on it almost weekly — two more point releases landed October 14 and 15 (copilot-cli releases). That's the good news, and it's overdue: letting an LLM drive a shell session with your full file and credential access by default was always the wrong starting posture.
The bad news is that security researchers spent July 2026 proving the exact architecture pattern GitHub just adopted — "run the agent inside a sandbox" — doesn't stop a determined attacker. It just moves the attack one step downstream, to whatever unsandboxed tool reads the agent's output next. If you're rolling agentic coding tools out to a team, that distinction is the whole story, and it's worth understanding before you treat "we enabled sandboxing" as a closed ticket.
What GitHub actually shipped
Per GitHub's own docs, Copilot CLI's local sandbox (evidenced — GitHub Docs) "restricts access to files, network resources, and credentials on your machine." The defaults: the agent can write to the current working directory and temp folders, it can read but not write the rest of a repo, and it can reach the outbound internet — but it can't touch your home directory, and Git/GitHub CLI credentials get swapped for placeholders that a local proxy only resolves for allowlisted HTTPS destinations. You turn it on with /sandbox enable or --sandbox; it's opt-in, unless an enterprise managed setting forces it.
That last point matters more than the feature itself. "Opt-in" means most of your engineers aren't using it right now unless someone pushed a policy. If you're adopting Copilot CLI, or any agent CLI, the policy decision — not the feature's existence — is what actually changes your risk.
Two of the October 14–15 patches are worth flagging because they loosen defaults rather than tighten them: sandboxes now allow local network access by default (it was off before), and sandboxed commands can write to package and build caches when developer-tool access is on. That's a reasonable usability trade, but it's worth tracking as the preview matures — every loosened default is a decision someone made on your behalf.
The research that should temper the optimism
In July 2026, Pillar Security researchers Eilon Cohen, Dan Lisichkin, and Ariel Fogel published "Week of Sandbox Escapes," testing Cursor, OpenAI's Codex CLI, Google's Gemini CLI, and Google's Antigravity — not GitHub Copilot CLI, which predates this round of tooling and isn't part of the study (evidenced — BleepingComputer, Cloud Security Alliance research note). They found seven exploitable paths across those four tools. In every case, the sandbox boundary itself held. What broke was something else: an agent, acting exactly within its permitted sandbox, writes a file to the project workspace — and some unsandboxed tool later reads or runs that file. A Git hook config. A virtualenv interpreter. A VS Code task definition. The Docker socket. Pillar calls this the "trust handoff": the agent "stays inside the box and follows every rule," but the privilege boundary never extended to whatever consumes its output next.
The specifics are concrete enough to matter for a working team. Cursor's .claude/settings.local.json "Stop" hook could fire an unsandboxed command with no approval prompt when an agent turn ended — CVE-2026-48124, CVSS 8.5, fixed in Cursor 3.0.0. OpenAI's Codex CLI trusted git show as read-only by name, but a crafted --output flag wrote a malicious diff-tool config that executed on the next git diff — CVSS 8.6, fixed in v0.95.0, with a bounty paid. Cursor, Codex CLI, and Gemini CLI shared a bug where a sandboxed agent reached the host's Docker socket and mounted the home directory via a privileged container; Cursor patched it, OpenAI and Google hadn't at disclosure. Google rated its two Antigravity findings as valid but lower-severity and hadn't shipped fixes at the time of the report.
Every one of these is triggerable through prompt injection — instructions hidden in a README, an issue, a dependency, or a diff. That's not an exotic attack surface. It's the attack surface every coding agent already has by design, because reading untrusted repo content and acting on it is the job.
None of this means sandboxing is a bad idea — it's clearly the right default, and GitHub shipping it for Copilot CLI closes an obvious gap. It means sandboxing is necessary and not sufficient. If your threat model stops at "the agent can't read ~/.ssh," you've handled the easy case and missed the one researchers actually exploited: the agent writing something inert-looking into the repo that a different, unsandboxed tool on the same machine later trusts and runs without asking.
I haven't found any independent security testing of GitHub Copilot CLI's sandbox against this specific pattern. Its credential-placeholder proxy design looks, on paper, like it narrows the credential-theft variant of this bug — but that's my reading of the docs, not a tested claim, and it doesn't obviously address config- or hook-based handoffs like the ones Pillar found in the other four tools. Worth assuming it's exposed until someone checks.
What this changes for your team
Don't audit whether sandboxing is turned on and stop there. Audit what's reachable outside the sandbox from inside a repo an agent can write to: Git hooks, interpreter and virtualenv paths, .vscode task definitions, any local daemon (Docker is the recurring example) your dev machines can reach. If you maintain a command allowlist anywhere in your pipeline, check whether it validates arguments or just the command name — git show --output=./.git/config is the textbook case of a allowlist that checked the wrong thing. And treat every piece of repo content an agent reads — README, issues, diffs, dependency manifests — as untrusted input, because that's the documented delivery mechanism behind all seven of Pillar's findings.
Checklist
- Confirm whether your team's Copilot CLI (or other agent CLI) usage has sandboxing enabled by default, per-session, or not at all.
- If you own an enterprise policy, decide now whether to mandate sandboxing rather than leave it opt-in.
- Inventory unsandboxed tools on dev machines that read repo-local config: Git hooks, venv/interpreter paths,
.vscodetasks, IDE extensions, local daemons like Docker. - Check whether any command allowlist you rely on validates arguments, not just command names.
- Treat all agent-readable repo content (README, issues, diffs, dependencies) as untrusted input — it's the injection path in every bug cited here.
Unverified claims or gaps
- Whether GitHub Copilot CLI's sandbox has been independently tested against the trust-handoff pattern — I found no such report either way.
- Current patch status for the Cursor fsmonitor Git-metadata bug and the two Antigravity findings may have changed since the July 2026 disclosures; I did not re-verify beyond what's dated in the sources below.
- Organization-level adoption numbers for Copilot CLI's sandbox feature — not published anywhere I could find.
Sources
- "GitHub Copilot weekly releases — September 21," GitHub Changelog, September 25, 2026. https://github.blog/changelog/2026-09-25-github-copilot-weekly-releases-september-21/
- "Using local sandboxing," GitHub Docs, accessed October 2026. https://docs.github.com/en/copilot/how-tos/cloud-and-local-sandboxes/using-local-sandboxing
- GitHub Copilot CLI releases (v1.0.98, v1.0.99-0, v1.0.99-1), GitHub, October 14–15, 2026. https://github.com/github/copilot-cli/releases
- "Cursor, Codex, Gemini CLI, Antigravity hit by sandbox escapes," BleepingComputer, July 20, 2026. https://www.bleepingcomputer.com/news/security/cursor-codex-gemini-cli-antigravity-hit-by-sandbox-escapes/
- "AI Coding Agent Sandbox Escapes: The Trust Handoff Flaw," Cloud Security Alliance research note, July 22, 2026. https://labs.cloudsecurityalliance.org/research/csa-research-note-ai-coding-agent-sandbox-escapes-20260722-c/