Skip to content

Commit 8c0fb5d

Browse files
authored
Merge pull request #8848 from microsoft/ntrogh/security-crosslinks
Add cross-links to security doc
2 parents 6807aa7 + 599a839 commit 8c0fb5d

File tree

5 files changed

+27
-6
lines changed

5 files changed

+27
-6
lines changed

docs/copilot/chat/chat-agent-mode.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,24 @@ With chat _agent mode_ in Visual Studio Code, you can use natural language to sp
1515

1616
## Why use agent mode?
1717

18-
Agent mode is optimized for making autonomous edits across multiple files in your project. It is particularly useful for complex tasks that require not only code edits but also the invocation of tools and terminal commands. You can use agent mode to:
18+
Agent mode is optimized for the following scenarios:
19+
20+
* Coding tasks based on high-level requirements or less well-defined implementation details
21+
* Making autonomous edits across multiple files in your project
22+
* Handling complex tasks that require not only code edits but also the invocation of tools and terminal commands
23+
24+
Agent mode autonomously determines the relevant context and tasks to accomplish a given request. It can also iterate multiple times to resolve intermediate issues, such as syntax errors or test failures.
25+
26+
Some examples of tasks you can use agent mode for:
1927

2028
* Refactor parts of your codebase, such as "refactor the app to use a Redis cache".
2129
* Plan and implement new features, such as "add a login form to the app using OAuth for authentication".
2230
* Migrate your codebase to a new framework, such as "migrate the app from React to Vue.js".
2331
* Generate an implementation plan for a complex task, such as "create a meal-planning web app using a Swift front-end and a Node.js back-end".
2432
* Define a high-level requirement, such as "add social media sharing functionality".
2533

26-
Agent mode is particularly useful for coding tasks when you have a less well-defined task that might also require running terminal commands and tools. Agent mode autonomously determines the relevant context and tasks to accomplish the request. It can also iterate multiple times to resolve intermediate issues, such as syntax errors or test failures.
34+
> [!IMPORTANT]
35+
> It's important to be aware of the security considerations of using AI-powered development. Review the [Security documentation](/docs/copilot/security.md) for using AI in VS Code.
2736
2837
## Agent mode vs Copilot coding agent
2938

@@ -114,6 +123,9 @@ Follow these steps to get started:
114123

115124
You can view the list of changed files in the Chat view. The editor overlay controls enable you to navigate between the suggested edits.
116125

126+
> [!NOTE]
127+
> AI-generated code edits are restricted to the files in your current workspace.
128+
117129
1. Review the suggested edits and [accept or discard the suggested edits](#accept-or-discard-edits).
118130

119131
1. Continue to iterate on the code changes to refine the edits or implement additional features.
@@ -180,12 +192,15 @@ In the Chat view, when a tool or terminal command invocation occurs, use the **C
180192

181193
You can reset the tool confirmations by using the **Chat: Reset Tool Confirmations** command in the Command Palette.
182194

195+
> [!IMPORTANT]
196+
> It's important to be aware of the security considerations of using AI-powered development. Review the [Security documentation](/docs/copilot/security.md) for using AI in VS Code.
197+
183198
### Auto-approve all tools and commands (Experimental)
184199

185200
In case you want to auto-approve _all_ tools and terminal commands, you can now use the experimental `setting(chat.tools.autoApprove)` setting. This will automatically approve all tool and command invocations, and VS Code will not ask for confirmation when a language model wishes to run tools.
186201

187202
> [!CAUTION]
188-
> With this setting enabled, you don't have the opportunity to cancel potentially destructive actions a model wants to take.
203+
> With this setting enabled, you don't have the opportunity to cancel potentially destructive actions a model wants to take. Read the [Security documentation](/docs/copilot/security.md) for using AI in VS Code to understand the implications of this setting.
189204
190205
As an enhanced boundary, you might choose to set `setting(chat.tools.autoApprove)` only when connected to a [remote environment](/docs/remote/remote-overview.md). You'll want to set this as a remote, rather than user-level, setting. Note that remote environments that are part of your local machine (like dev containers) or that have access to your credentials will still pose different levels of risk.
191206

@@ -233,7 +248,7 @@ For a terminal command to be auto approved, both the subcommand and command line
233248

234249
## Accept or discard edits
235250

236-
Copilot lists the files that were edited in the list of the changed files in the Chat view. Files with pending edits also have an indicator in the Explorer view and editor tabs.
251+
VS Code lists the files that were edited in the list of the changed files in the Chat view. Files with pending edits also have an indicator in the Explorer view and editor tabs.
237252

238253
![Screenshot that shows the Chat view, highlighting the changed files list and the indicator in the Explorer view and editor tabs.](images/copilot-edits/copilot-edits-changed-files-full.png)
239254

docs/copilot/chat/copilot-chat.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,3 +308,4 @@ Or check out the [VS Code Copilot Series](https://www.youtube.com/playlist?list=
308308
* [Use ask mode to ask questions about your code](/docs/copilot/chat/chat-ask-mode.md)
309309
* [Use agent mode to start an autonomous coding session](/docs/copilot/chat/chat-agent-mode.md)
310310
* [Use edit mode to make code edits across multiple files](/docs/copilot/chat/copilot-edits.md)
311+
* [Learn about security considerations of using AI in VS Code](/docs/copilot/security.md)

docs/copilot/customization/mcp-servers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ You have two options to centrally manage MCP support in your organization:
5959
## Add an MCP server
6060

6161
> [!CAUTION]
62-
> MCP servers can run arbitrary code on your machine. Only add servers from trusted sources, and review the publisher and server configuration before starting it. VS Code prompts you to confirm that you [trust the MCP server](#mcp-server-trust) when you start an MCP server for the first time.
62+
> MCP servers can run arbitrary code on your machine. Only add servers from trusted sources, and review the publisher and server configuration before starting it. VS Code prompts you to confirm that you [trust the MCP server](#mcp-server-trust) when you start an MCP server for the first time. Read the [Security documentation](/docs/copilot/security.md) for using AI in VS Code to understand the implications.
6363
6464
You have multiple options to add an MCP server in VS Code:
6565

@@ -319,7 +319,7 @@ VS Code extensions can also contribute MCP servers and configure them as part of
319319

320320
## MCP server trust
321321

322-
MCP servers can run arbitrary code on your machine. Only add servers from trusted sources, and review the publisher and server configuration before starting it.
322+
MCP servers can run arbitrary code on your machine. Only add servers from trusted sources, and review the publisher and server configuration before starting it. Read the [Security documentation](/docs/copilot/security.md) for using AI in VS Code to understand the implications.
323323

324324
When you add an MCP server to your workspace or change its configuration, you need to confirm that you trust the server and its capabilities before starting it. VS Code shows a dialog to confirm that you trust the server when you start a server for the first time. Select the link to MCP server in the dialog to review the MCP server configuration in a separate window.
325325

docs/copilot/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,4 @@ You can start using GitHub Copilot for free with monthly limits on completions a
224224
- [Set up Copilot in VS Code](/docs/copilot/setup.md)
225225
- [Get started with hands-on examples](/docs/copilot/getting-started.md)
226226
- [Customize the AI for your workflow](/docs/copilot/customization/overview.md)
227+
- [Learn about security considerations of using AI in VS Code](/docs/copilot/security.md)

docs/setup/enterprise.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,7 @@ Users can still uninstall extensions that were preinstalled. Restarting VS Code
227227
### Does VS Code support configuration profiles on Linux?
228228

229229
Support for Linux is not on the roadmap. If you're interested in configuration profiles on Linux, open an issue in the VS Code [GitHub repository](https://github.com/microsoft/vscode/issues) and share details about your scenario.
230+
231+
## Related resources
232+
233+
- [Learn about security considerations of using AI in VS Code](/docs/copilot/security.md)

0 commit comments

Comments
 (0)