GitHub Copilot runs as an agent inside VS Code and as a cloud agent that works on issues and opens pull requests from an ephemeral GitHub Actions environment. The cloud agent pushes only to its own branch, sits behind a configurable firewall, and needs a human to approve CI runs. VS Code adds tool approvals, workspace trust, and optional sandboxing.
Read in this order
- OfficialRisks and mitigations for GitHub Copilot cloud agent (GitHub Docs)Start here: GitHub's own list of cloud agent risks and the built-in mitigations.
- OfficialCustomizing or disabling the firewall for GitHub Copilot (GitHub Docs)How to tighten or loosen the agent's network firewall safely.
- ArticleGitHub Copilot: Remote Code Execution via Prompt Injection (CVE-2025-53773) (Embrace The Red)A real CVE where prompt injection led to code execution in the editor.