Skip to content

Commit 14bca7a

Browse files
isaacmbrowntpopejc-clark
authored
Enterprise-managed client governance: disable bypass-permissions (yolo) mode [Public Preview] (#61714)
Co-authored-by: Tim Pope <code@tpope.net> Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com>
1 parent a241e7a commit 14bca7a

9 files changed

Lines changed: 54 additions & 8 deletions

File tree

content/copilot/concepts/agents/about-enterprise-plugin-standards.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ redirect_from:
1717

1818
> [!NOTE] This feature is in {% data variables.release-phases.public_preview %} and subject to change.
1919
20-
Enterprise-managed plugin standards allow administrators to **define and enforce policies for plugin availability**. By configuring a `settings.json` file in the enterprise's `.github-private` repository, administrators can specify which plugin marketplaces are available to users and which plugins are installed automatically.
20+
Enterprise-managed plugin standards allow administrators to **define and enforce policies for plugin availability**. By configuring a `{% data variables.copilot.managed_setting_file %}` file in the enterprise's `.github-private` repository, administrators can specify which plugin marketplaces are available to users and which plugins are installed automatically.
2121

2222
## Where plugin standards apply
2323

@@ -30,14 +30,14 @@ Users must upgrade to a supported client version for these standards to be appli
3030

3131
## How plugin standards work
3232

33-
Enterprise plugin standards use a configuration file stored in your enterprise's `.github-private` repository. The configuration is defined in a `settings.json` file at the following path: `.github/copilot/settings.json`.
33+
Enterprise plugin standards use a configuration file stored in your enterprise's `.github-private` repository. The configuration is defined in a `{% data variables.copilot.managed_setting_file %}` file at the following path: `.github/copilot/{% data variables.copilot.managed_setting_file %}`. This file was previously called `settings.json`, which is still supported.
3434

3535
For plugin standards, the file can define:
3636

3737
* **Known marketplaces**. Plugin marketplaces that are available to users for browsing and installing plugins.
3838
* **Default-enabled plugins**. Specific plugins that are automatically installed when users authenticate.
3939

40-
When a user authenticates to {% data variables.product.prodname_copilot_short %} in a supported client, the client queries an API endpoint that reads the `settings.json` from the enterprise's `.github-private` repository. The policies defined in the file are then applied to the user's session.
40+
When a user authenticates to {% data variables.product.prodname_copilot_short %} in a supported client, the client queries an API endpoint that reads the `{% data variables.copilot.managed_setting_file %}` file. The policies defined in the file are then applied to the user's session.
4141

4242
## Why use enterprise-managed plugin standards
4343

content/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/configure-enterprise-plugin-standards.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Configuring enterprise plugin standards
33
shortTitle: Configure plugin standards
44
allowTitleToDifferFromFilename: true
5-
intro: 'Configure enterprise plugin standards by defining a `settings.json` file in your enterprise''s `.github-private` repository.'
5+
intro: 'Configure enterprise plugin standards by defining a `{% data variables.copilot.managed_setting_file %}` file in your enterprise''s `.github-private` repository.'
66
permissions: Enterprise owners
77
versions:
88
feature: copilot
@@ -16,9 +16,8 @@ category:
1616
1717
You can apply settings to control users' available plugin marketplaces and default-installed plugins. These settings apply to users on your enterprise's {% data variables.product.prodname_copilot_short %} plan. For more information, see [AUTOTITLE](/copilot/concepts/agents/about-enterprise-plugin-standards).
1818

19-
1. In your enterprise's `.github-private` repository, navigate to the `.github/copilot/` directory. If you don't have a `.github-private` repository yet, see [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/prepare-for-custom-agents).
20-
1. Create or edit the `settings.json` file at `.github/copilot/settings.json`.
21-
1. Add your plugin policy configuration to the file. The `settings.json` file supports the following top-level properties:
19+
{% data reusables.copilot.create-managed-settings %}
20+
1. Add your plugin policy configuration to the file. The `{% data variables.copilot.managed_setting_file %}` file supports the following top-level properties:
2221

2322
```json copy
2423
{
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: Disabling automatic command approval in Copilot clients
3+
shortTitle: Disable automatic commands
4+
allowTitleToDifferFromFilename: true
5+
intro: 'Disable yolo mode to stop agents from running commands without approval.'
6+
permissions: Enterprise owners
7+
versions:
8+
feature: copilot
9+
contentType: how-tos
10+
category:
11+
- Configure Copilot
12+
- Manage Copilot for a team
13+
---
14+
15+
> [!NOTE] This feature is in {% data variables.release-phases.public_preview %} and subject to change.
16+
17+
You can prevent users from using modes that enable automatic approval of agent commands in {% data variables.copilot.copilot_cli_short %} and {% data variables.product.prodname_vscode_shortname %}. The `disableBypassPermissionsMode` setting is defined in your enterprise's `{% data variables.copilot.managed_setting_file %}` file and applies to users on your enterprise's {% data variables.product.prodname_copilot_short %} plan.
18+
19+
This setting blocks users from using:
20+
21+
* The `--yolo` or `--allow-all` flag
22+
* The `/yolo` or `/allow-all` command
23+
* All runtime paths that enable combined bypass mode
24+
25+
This setting does **not** block individual flags such as `--allow-all-tools` or `--allow-all-paths`.
26+
27+
{% data reusables.copilot.create-managed-settings %}
28+
1. Add the following property.
29+
30+
```json copy
31+
{
32+
"permissions": {
33+
"disableBypassPermissionsMode": "disable"
34+
}
35+
}
36+
```

content/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ versions:
77
children:
88
- /prepare-for-custom-agents
99
- /configure-enterprise-plugin-standards
10+
- /disable-automatic-commands
1011
- /monitor-agentic-activity
1112
- /enable-copilot-cloud-agent
1213
- /block-agentic-features

content/copilot/how-tos/copilot-cli/set-up-copilot-cli/configure-copilot-cli.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ This flag combines:
267267
* `--allow-all-paths` (disable path verification).
268268
* `--allow-all-urls` (disables URL verification).
269269

270-
> [!TIP] During an interactive session, you can also enable all permissions with the `/allow-all` or `/yolo` slash commands.
270+
During an interactive session, you can also enable all permissions with the `/allow-all` or `/yolo` slash commands.
271+
272+
{% data reusables.copilot.disable-bypass %}
271273

272274
## Further reading
273275

content/copilot/how-tos/copilot-cli/use-copilot-cli/allowing-tools.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ For details of the supported tool kinds, see [AUTOTITLE](/copilot/reference/copi
7979

8080
The following command-line options give {% data variables.copilot.copilot_cli_short %} permission to use all available tools.
8181

82+
{% data reusables.copilot.disable-bypass %}
83+
8284
* `--allow-all-tools` — Full access to the available tools.
8385

8486
* `--allow-all` or `--yolo` — Equivalent to using all of the `--allow-all-tools`, `--allow-all-paths`, and `--allow-all-urls` options when starting the CLI.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1. In your enterprise's `.github-private` repository, navigate to the `.github/copilot/` directory. If you haven't set a `.github-private` repository as your enterprise's source of agent configuration, see [AUTOTITLE](/copilot/how-tos/administer-copilot/manage-for-enterprise/manage-agents/prepare-for-custom-agents).
2+
1. Create or edit the `{% data variables.copilot.managed_setting_file %}` file. (This file was previously named `settings.json`, which is also supported.)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
> [!NOTE] If you have a {% data variables.copilot.copilot_business_short %} or {% data variables.copilot.copilot_enterprise_short %} license, these commands may be blocked by an enterprise administrator.

data/variables/copilot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,3 +254,6 @@ copilot_workspace_short: 'Workspace'
254254

255255
# BYOK
256256
copilot_byok_supported_features: '{% data variables.copilot.copilot_chat_short %}, {% data variables.copilot.copilot_cli_short %}, and {% data variables.product.prodname_vscode_shortname %}'
257+
258+
## File for enterprise client management
259+
managed_setting_file: 'managed-settings.json'

0 commit comments

Comments
 (0)