Skip to content

Commit 6146965

Browse files
authored
Merge pull request #46016 from github/repo-sync
Repo sync
2 parents dff5188 + f8999ea commit 6146965

19 files changed

Lines changed: 217 additions & 45 deletions

File tree

‎content/billing/concepts/product-billing/cloud-and-local-sandboxes.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ category:
1010
- Understand product costs
1111
---
1212

13-
{% data reusables.cli.public-preview-sandbox %}
13+
> [!NOTE]
14+
> {% data reusables.cli.public-preview-sandbox %}
1415
1516
## How sandbox usage is measured
1617

‎content/copilot/concepts/about-cloud-and-local-sandboxes.md‎

Lines changed: 35 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ docsTeamMetrics:
1515
- copilot-cli
1616
---
1717

18-
{% data reusables.cli.public-preview-sandbox %}
18+
> [!NOTE]
19+
> {% data reusables.cli.public-preview-sandbox %}
1920
2021
## Introduction
2122

@@ -24,7 +25,9 @@ docsTeamMetrics:
2425
Sandboxing is available in both {% data variables.copilot.copilot_cli %} and the {% data variables.copilot.github_copilot_app %}, but the two surfaces expose it differently:
2526

2627
* In {% data variables.copilot.copilot_cli_short %}, you control both local and cloud sandboxing with the commands and settings described in this article.
27-
* In the {% data variables.copilot.github_copilot_app %}, you choose cloud sandboxing when you start a new session, without running any commands. This feature is currently in {% data variables.release-phases.public_preview %} and subject to change. For more information, see [AUTOTITLE](/copilot/how-tos/github-copilot-app/agent-sessions#starting-a-session).
28+
* In the {% data variables.copilot.github_copilot_app %}, you can run a session in a cloud sandbox or use local sandboxing for local repository and working tree sessions. Project settings define the default for new local sessions, and you can change sandboxing for an active local session. For more information, see [AUTOTITLE](/copilot/how-tos/github-copilot-app/agent-sessions#using-cloud-and-local-sandboxes).
29+
30+
Local sandbox settings are configured separately in {% data variables.copilot.copilot_cli_short %} and the {% data variables.copilot.github_copilot_app %}. Enabling or configuring local sandboxing in one surface does not change it in the other.
2831

2932
With sandboxing, you can choose where {% data variables.product.prodname_copilot_short %} runs:
3033

@@ -34,9 +37,11 @@ With sandboxing, you can choose where {% data variables.product.prodname_copilot
3437
## Local sandboxing
3538

3639
> [!NOTE]
37-
> Local sandboxing is currently an experimental feature. To use it, start {% data variables.copilot.copilot_cli_short %} with the `‑‑experimental` command line option, or enter `/experimental on` during a session.
40+
>
41+
> * In {% data variables.copilot.copilot_cli_short %}, local sandboxing is currently an experimental feature. To use it, start the CLI with the `‑‑experimental` command line option, or enter `/experimental on` during a session.
42+
> * In the {% data variables.copilot.github_copilot_app %}, local sandboxing is in {% data variables.release-phases.public_preview %} and subject to change.
3843
39-
Local sandboxing lets {% data variables.product.prodname_copilot_short %} run in a sandboxed environment directly on your machine, with restricted access to your filesystem, network connectivity, and system capabilities. You configure local sandboxing in {% data variables.copilot.copilot_cli_short %}, using the commands and settings described in the following sections.
44+
Local sandboxing lets {% data variables.product.prodname_copilot_short %} run in a sandboxed environment directly on your machine, with restricted access to your filesystem, network connectivity, and system capabilities. You can configure local sandboxing in {% data variables.copilot.copilot_cli_short %} or the {% data variables.copilot.github_copilot_app %}.
4045

4146
Local sandboxing is turned off by default. Until you enable it, the shell commands that {% data variables.product.prodname_copilot_short %} runs execute directly on your machine with the same access as your user account: they can read, write, and delete wherever you can, reach any network your machine can reach, and use your credentials without restriction. Enabling local sandboxing constrains this access to a policy that you control.
4247

@@ -60,11 +65,15 @@ After you enable local sandboxing, the commands and tools that an agent runs on
6065

6166
The CLI's built-in file tools—first-party commands that are part of the CLI, rather than shell commands like `sed`—run in-process in the CLI. Because the CLI itself is not sandboxed, the operating-system sandbox never sees the file operations these tools perform and cannot constrain them. Instead, the built-in tools are coded to check the sandbox policy themselves and honor your configured settings on a best-effort basis.
6267

63-
For more information, see [AUTOTITLE](/copilot/how-tos/cloud-and-local-sandboxes/using-local-sandboxing).
68+
For more information about enabling local sandboxing in {% data variables.copilot.copilot_cli_short %}, see [AUTOTITLE](/copilot/how-tos/cloud-and-local-sandboxes/using-local-sandboxing).
69+
70+
In the {% data variables.copilot.github_copilot_app %}, project settings define the local sandboxing default for new local repository and working tree sessions. You can also change sandboxing for an active local session without changing the project default. For more information, see [AUTOTITLE](/copilot/how-tos/github-copilot-app/configure-local-sandboxing).
6471

6572
### Configuring local sandboxing
6673

67-
You can use the default local sandboxing behavior, or you can modify what {% data variables.product.prodname_copilot_short %} can access. When you configure local sandboxing, you can control several dimensions of access:
74+
You can use the default local sandboxing behavior, or modify what {% data variables.product.prodname_copilot_short %} can access. The available controls depend on the surface you use.
75+
76+
In {% data variables.copilot.copilot_cli_short %}, you can control several dimensions of access:
6877

6978
* **Filesystem**: Grant read-only or read/write access to specific paths, or deny paths.
7079
* **Network**: Allow or block outbound internet access and local network access independently.
@@ -73,34 +82,43 @@ You can use the default local sandboxing behavior, or you can modify what {% dat
7382
* **Keychain (macOS)**: Choose whether the system keychain is reachable from inside the sandbox.
7483
* **Per-command exceptions**: Allow or prevent individual commands from running outside the sandbox when they need broader access.
7584

76-
For more information, see [AUTOTITLE](/copilot/how-tos/cloud-and-local-sandboxes/configuring-local-sandbox-settings).
85+
For more information about configuring local sandbox settings in {% data variables.copilot.copilot_cli_short %}, see [AUTOTITLE](/copilot/how-tos/cloud-and-local-sandboxes/configuring-local-sandbox-settings).
86+
87+
In the {% data variables.copilot.github_copilot_app %}, project settings expose a subset of these controls:
88+
89+
* **Filesystem**: Grant additional read-only or read/write access to specific paths, or deny paths.
90+
* **Network**: Allow or block outbound internet and local network access.
91+
* **Credentials**: Choose whether your Git and {% data variables.product.prodname_cli %} credentials are available inside the sandbox.
92+
93+
The app can also ask you to approve an individual command to run outside the sandbox. You cannot configure whether bypass requests are allowed in the project settings. For more information about configuring the project policy and changing sandboxing for an active local session, see [AUTOTITLE](/copilot/how-tos/github-copilot-app/configure-local-sandboxing).
7794

7895
### Cross-platform support
7996

8097
Local sandboxing is available on macOS, on Linux, and on recent Windows 11 builds. Each operating system uses a different isolation backend, so the requirements are different:
8198

8299
* **macOS** uses the Seatbelt backend. {% data variables.copilot.copilot_cli_short %} applies a process-scoped profile to each sandboxed command. Use macOS 15 (Sequoia) or later. {% data variables.copilot.copilot_cli_short %} does not block an older macOS, but the backend is not tested there.
83-
* **Linux** uses the bubblewrap backend. Install bubblewrap 0.5.0 or later, and make sure `bwrap` is on your `PATH`. If `/sandbox` reports that your `bwrap` is too old, upgrade the package.
100+
* **Linux** uses the bubblewrap backend. Install bubblewrap 0.5.0 or later, and make sure `bwrap` is on your `PATH`. If `/sandbox` reports that your `bwrap` is too old, upgrade the package. When the sandbox policy permits outbound traffic, you must also have:
101+
* `slirp4netns` on your `PATH`.
102+
* `unshare` and `nsenter` from util-linux 2.35 or later, with `--map-current-user` and `--keep-caps` support.
103+
* `iptables`, `ip6tables`, and their restore binaries. Use the `nf_tables` backend. The legacy backend also operates, but only if you can write to `/run/xtables.lock`.
104+
* Access to `/dev/net/tun`.
84105
* **Windows** uses the BaseContainer tier of the ProcessContainer backend. {% data variables.copilot.copilot_cli_short %} does not use the AppContainer fallback tiers. If your Windows build cannot supply BaseContainer, {% data variables.copilot.copilot_cli_short %} reports that sandboxing is not supported. To find the supported Windows versions, see [Windows OS support for Copilot sandboxing](https://aka.ms/ghcp-sandbox-os-support).
85106

86107
#### Proxy support
87108

88109
The sandbox proxy operates differently on each operating system:
89110

90111
* **macOS**: {% data variables.copilot.copilot_cli_short %} does not give the proxy to Seatbelt. It sets `HTTP_PROXY`, `HTTPS_PROXY`, and `ALL_PROXY` in the sandboxed environment instead. Only programs that obey these variables use the proxy. A program that ignores them connects directly.
91-
* **Linux**: bubblewrap enforces the proxy. The sandbox gets a private network namespace, and only the proxy endpoint is permitted. This mode has more requirements. You must have:
92-
* `slirp4netns` on your `PATH`.
93-
* `unshare` and `nsenter` from util-linux 2.35 or later, with `--map-current-user` and `--keep-caps` support.
94-
* `iptables` and `ip6tables`. Use the `nf_tables` backend. The legacy backend also operates, but only if you can write to `/run/xtables.lock`.
95-
96-
Two more limits apply on Linux. The proxy must have an IPv4 address, because {% data variables.copilot.copilot_cli_short %} refuses a proxy that only IPv6 can reach. The proxy URL must not contain credentials, so give the credentials to the proxy itself.
112+
* **Linux**: bubblewrap enforces the proxy. The sandbox gets a private network namespace, and only the proxy endpoint is permitted. The Linux requirements for outbound traffic listed in [Cross-platform support](#cross-platform-support) also apply when you configure an upstream proxy. The proxy must have an IPv4 address, because {% data variables.copilot.copilot_cli_short %} refuses a proxy that only IPv6 can reach. The proxy URL must not contain credentials, so give the credentials to the proxy itself.
113+
* **Windows**: the proxy is not available. In {% data variables.copilot.copilot_cli_short %}, do not use denied paths either. If a CLI sandbox policy includes either setting, the sandboxed command fails with an error. In the {% data variables.copilot.github_copilot_app %}, you can save denied paths in the project settings. If the active BaseContainer capabilities cannot enforce a denied path, the sandboxed command fails instead of running with a weaker policy or without a sandbox.
97114

98-
Also on Linux, bubblewrap cannot control local network access independently of outbound access. Your local network setting therefore does not have a separate effect there.
99-
* **Windows**: the proxy is not available. Do not use denied paths on Windows either. {% data variables.copilot.copilot_cli_short %} cannot enforce these settings, and the sandboxed command fails with an error.
115+
On Linux, bubblewrap cannot control local network access independently for spawned processes, including shell commands and local MCP or LSP servers. In the {% data variables.copilot.github_copilot_app %}, the local network setting still applies to in-process operations, such as web requests and remote MCP connections.
100116

101117
#### If your host does not support local sandboxing
102118

103-
{% data variables.copilot.copilot_cli_short %} turns the sandbox off for the session and shows a notice. Shell commands and sandboxed services then run without a sandbox, and your `sandbox.enabled` setting does not change. If your enterprise enforces sandboxing through device-managed settings, the session fails closed instead: sandboxed commands do not run.
119+
In {% data variables.copilot.copilot_cli_short %}, the sandbox is turned off for the session and a notice is displayed. Shell commands and sandboxed services then run without a sandbox, and your `sandbox.enabled` setting does not change. If your enterprise enforces sandboxing through device-managed settings, the session fails closed instead: sandboxed commands do not run.
120+
121+
In the {% data variables.copilot.github_copilot_app %}, host support is checked when the first sandboxed shell starts. If the host cannot enforce the requested policy, the shell fails with an unsupported-platform or unsupported-policy message and does not run unsandboxed.
104122

105123
### Enterprise policy enforcement
106124

‎content/copilot/concepts/agents/copilot-cli/about-copilot-cli.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ To use the CLI programmatically, include the `-p` or `--prompt` command-line opt
6565
6666
## Running {% data variables.copilot.copilot_cli_short %} commands in a sandbox
6767

68-
{% data reusables.cli.public-preview-sandbox %}
68+
> [!NOTE]
69+
> {% data reusables.cli.public-preview-sandbox %}
6970
7071
To prevent {% data variables.product.prodname_copilot_short %} from modifying files you don't want it to touch, you can force agents to run commands within a local sandboxed environment. Alternatively, you can run an entire CLI session in an isolated environment in the cloud. For more information, see [AUTOTITLE](/copilot/concepts/about-cloud-and-local-sandboxes).
7172

‎content/copilot/concepts/agents/copilot-cli/understanding-local-sandboxing.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ docsTeamMetrics:
1313
- copilot-cli
1414
---
1515

16-
{% data reusables.cli.public-preview-local-sandbox %}
16+
> [!NOTE]
17+
> {% data reusables.cli.public-preview-local-sandbox %}
1718
1819
{% data reusables.cli.sandbox-on-windows %}
1920

‎content/copilot/concepts/agents/github-copilot-app.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ The {% data variables.copilot.github_copilot_app %} supports the following opera
4040

4141
## What can I do with the {% data variables.copilot.github_copilot_app %}?
4242

43-
* **Parallel workspaces:** Run multiple isolated agent sessions simultaneously, each with a dedicated git worktree and branch. When you start a new agent session you can choose to run it in a cloud-based sandbox (public preview) hosted by {% data variables.product.github %}. For more information, see [AUTOTITLE](/copilot/how-tos/github-copilot-app/agent-sessions#starting-a-session).
43+
* **Parallel workspaces:** Run multiple isolated agent sessions simultaneously, each with a dedicated git worktree and branch. You can run a session in a cloud sandbox, or configure a local sandbox to restrict the resources available to agent-run tools on your machine. For more information, see [AUTOTITLE](/copilot/how-tos/github-copilot-app/agent-sessions#using-cloud-and-local-sandboxes).
4444
* **Session modes:** Choose how you work with agents: Interactive (collaborative), Plan (agent plans, you approve), or Autopilot (fully autonomous). You can also select from multiple LLMs and adjust reasoning effort for each session.
4545
* **Model selection:** Select from multiple LLMs, including models from your own provider using bring your own key (BYOK), and adjust reasoning effort for each session.
4646
* **{% data variables.product.github %} integration:** Browse and find issues, start sessions from them, create and close pull requests, review pull requests, view CI check results, and search across your repositories—all within the app.

‎content/copilot/how-tos/cloud-and-local-sandboxes/configuring-local-sandbox-settings.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ docsTeamMetrics:
1212
- copilot-cli
1313
---
1414

15-
{% data reusables.cli.public-preview-local-sandbox %}
15+
> [!NOTE]
16+
> {% data reusables.cli.public-preview-local-sandbox %}
1617
1718
{% data reusables.cli.sandbox-on-windows %}
1819

‎content/copilot/how-tos/cloud-and-local-sandboxes/enabling-or-disabling-cloud-sandboxes-for-your-organization.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ category:
1313
- Manage cloud and local sandboxes for your organization
1414
---
1515

16-
{% data reusables.cli.public-preview-sandbox %}
16+
> [!NOTE]
17+
> {% data reusables.cli.public-preview-sandbox %}
1718
1819
## About enabling and disabling cloud sandboxes
1920

@@ -49,4 +50,3 @@ Enterprise owners can control cloud sandbox access for all organizations in the
4950
* [AUTOTITLE](/copilot/concepts/about-cloud-and-local-sandboxes)
5051
* [AUTOTITLE](/billing/concepts/product-billing/cloud-and-local-sandboxes)
5152
* [AUTOTITLE](/copilot/reference/enterprise-administrators/enterprise-managed-settings#sandbox)
52-

‎content/copilot/how-tos/cloud-and-local-sandboxes/using-local-sandboxing.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ docsTeamMetrics:
1212
- copilot-cli
1313
---
1414

15-
{% data reusables.cli.public-preview-local-sandbox %}
15+
> [!NOTE]
16+
> {% data reusables.cli.public-preview-local-sandbox %}
1617
1718
{% data reusables.cli.sandbox-on-windows %}
1819

‎content/copilot/how-tos/github-copilot-app/agent-sessions.md‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Each session in the {% data variables.copilot.github_copilot_app %} runs in its
1919

2020
1. In the sidebar, next to **Projects**, click {% octicon "plus" aria-label="Start a new session" %}.
2121
1. Choose a project—you can use a folder already on your machine, choose from {% data variables.product.github %}, or clone from a Git URL for repositories hosted outside {% data variables.product.github %} (for example, on Azure DevOps) or for private repositories without app access.
22-
1. From the dropdown under the prompt box, choose where the session should run: in a new working tree, in your local repository, or in a cloud sandbox. Cloud sandboxes for {% data variables.product.prodname_copilot_short %} (public preview) are fully isolated environments hosted by {% data variables.product.github %}.
22+
1. From the dropdown under the prompt box, choose where the session should run: in a new working tree, in your local repository, or in a cloud sandbox. Cloud sandboxes are fully isolated environments hosted by {% data variables.product.github %}.
2323
1. Select a session mode, model, and reasoning effort from the dropdowns below the prompt field. If you choose **Auto** for the model, the app selects the optimal model for your task based on task complexity.
2424
1. Describe the task in the prompt field. You can reference issues with `#`, add files with `@`, or use `/` for commands.
2525

@@ -60,6 +60,18 @@ Use **Manage sessions** to view, search, and filter sessions and chats, includin
6060
1. Search or filter to find the sessions or chats you want to manage.
6161
1. Select one or more sessions or chats, then archive or delete them. To restore an archived chat, find the chat, then restore it.
6262

63+
## Using cloud and local sandboxes
64+
65+
> [!NOTE]
66+
> {% data reusables.cli.public-preview-sandbox %}
67+
68+
Cloud and local sandboxes protect sessions in different ways:
69+
70+
* **Cloud sandbox**: Runs the entire session in an isolated environment hosted by {% data variables.product.github %}. Use a cloud sandbox when you want to keep the session off your machine or run several resource-intensive tasks in parallel. Choose the cloud sandbox execution location when starting a session.
71+
* **Local sandbox**: Runs the session on your machine, but restricts the filesystem, network, and credential access available to agent-run tools. Use local sandboxing when the agent needs your local tools or development services, but you want to limit its access to the rest of your machine. Configure the default for new local repository and working tree sessions in the project settings, or use `/sandbox on` or `/sandbox off` to change an active local session.
72+
73+
Local sandboxing does not apply to cloud sandbox sessions or sessions that run on a remote host. For more information about how both types of sandbox work, see [AUTOTITLE](/copilot/concepts/about-cloud-and-local-sandboxes). To enable and configure local sandboxing, see [AUTOTITLE](/copilot/how-tos/github-copilot-app/configure-local-sandboxing).
74+
6375
## Using `/security-review` in app sessions
6476

6577
> [!NOTE]

0 commit comments

Comments
 (0)