-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Apply reviewer feedback to Security section in agent mode docs #8710
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: agent-security
Are you sure you want to change the base?
Apply reviewer feedback to Security section in agent mode docs #8710
Conversation
Co-authored-by: ntrogh <[email protected]>
@copilot I like the cross-references within the article.
|
@copilot Only update chat-agent-mode.md |
- Reorganize security content per reviewer feedback - Focus on documenting risks in security model section - Enhance built-in protections with clearer structure - Update user best practices based on suggested guidelines - Streamline FAQ answer to match new security content Co-authored-by: ntrogh <[email protected]>
Updated the Security section in chat-agent-mode.md following your detailed outline. The new structure focuses on documenting the specific risks, reorganizes built-in protections with clearer sub-sections, and includes comprehensive user best practices as requested. Commit 8555e8a |
docs/copilot/chat/chat-agent-mode.md
Outdated
|
||
### Understanding the security model | ||
|
||
Agent mode operates with significant autonomy and comes with important security considerations. It's crucial to understand the potential risks: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agent mode operates with significant autonomy and comes with important security considerations. It's crucial to understand the potential risks: | |
Agent mode operates with significant autonomy and comes with important security considerations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the introductory text to be more concise as suggested. Commit 75090be
docs/copilot/chat/chat-agent-mode.md
Outdated
|
||
Agent mode operates with significant autonomy and comes with important security considerations. It's crucial to understand the potential risks: | ||
|
||
**Autonomous file operations**: Agent mode can automatically modify files in your workspace, including sensitive configuration files, source code, or data files. These modifications could potentially trigger watch tasks or scripts that run malicious code if working with untrusted projects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Autonomous file operations**: Agent mode can automatically modify files in your workspace, including sensitive configuration files, source code, or data files. These modifications could potentially trigger watch tasks or scripts that run malicious code if working with untrusted projects. | |
**Autonomous file operations**: Agent mode automatically modifies files in your workspace, including sensitive configuration files, source code, or data files. These modifications might trigger watch tasks or scripts that run malicious code if working with untrusted projects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the autonomous file operations description with the suggested wording improvements. Commit 75090be
docs/copilot/chat/chat-agent-mode.md
Outdated
|
||
**Tool and command execution**: Agent mode can run tools and execute terminal commands that can run arbitrary code, interact with your local file system, communicate with external services, or modify your development environment. These operations have the same privileges as your user account. | ||
|
||
**Context and data access**: Agent mode has access to your workspace files and can use this information to make decisions about what changes to implement. This includes potentially sensitive information like API keys, configuration files, or proprietary code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Context and data access**: Agent mode has access to your workspace files and can use this information to make decisions about what changes to implement. This includes potentially sensitive information like API keys, configuration files, or proprietary code. | |
**Context and data access**: Agent mode has access to your workspace files and uses this information to make decisions about what changes to implement. This includes potentially sensitive information like API keys, configuration files, or proprietary code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the context and data access description with clearer language as suggested. Commit 75090be
docs/copilot/chat/chat-agent-mode.md
Outdated
|
||
#### Workspace Trust integration | ||
|
||
Agent mode respects VS Code's [Workspace Trust](https://code.visualstudio.com/docs/editor/workspace-trust) feature, which is a critical security boundary. Only use agent mode in workspaces you trust completely, as agent mode's autonomous capabilities should not be used with untrusted code or projects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a little more background on what Workspace Trust is?
By default, when your workspace is in restricted mode (untrusted), agent mode and other AI capabilities are disabled for the workspace.
Recommendation is that you carefully review code or projects you downloaded before you trust the workspace, and only then use agent mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added more background on Workspace Trust including details about restricted mode by default and the recommendation to review code before trusting the workspace. Commit 75090be
docs/copilot/chat/chat-agent-mode.md
Outdated
|
||
**Approve tool calls and terminal commands**: Before running tools and terminal commands, agent mode requests explicit confirmation. You can approve actions for the current session, workspace, or all future invocations. See [Manage tool approvals](#manage-tool-approvals) for details. | ||
|
||
**Review file changes**: While agent mode can automatically write files, you can review proposed changes in the chat interface before they are applied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Review file changes**: While agent mode can automatically write files, you can review proposed changes in the chat interface before they are applied. | |
**Review file changes**: While agent mode can automatically write files, you can review proposed changes in a diff editor and decide to keep or reject each individual change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the file changes review description to mention the diff editor and individual change decisions. Commit 75090be
docs/copilot/chat/chat-agent-mode.md
Outdated
|
||
#### Additional safeguards | ||
|
||
**Secure credentials store**: VS Code uses a secure credentials store for tool configuration, helping protect sensitive authentication information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Secure credentials store**: VS Code uses a secure credentials store for tool configuration, helping protect sensitive authentication information. | |
**Secure credentials store**: VS Code uses a secure credentials store for sensitive tool input parameters, helping protect sensitive authentication information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the secure credentials store description to be more specific about "sensitive tool input parameters". Commit 75090be
docs/copilot/chat/chat-agent-mode.md
Outdated
|
||
**Request limits**: The `setting(chat.agent.maxRequests)` setting limits the number of requests agent mode can make, preventing runaway operations. | ||
|
||
**Session isolation**: Tool approvals can be scoped to the current session, allowing you to grant temporary permissions that don't persist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Session isolation**: Tool approvals can be scoped to the current session, allowing you to grant temporary permissions that don't persist. | |
**Session isolation**: You can scope tool approvals to the current session, enabling you to grant temporary permissions that don't persist. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the session isolation description with clearer language about scoping and enabling temporary permissions. Commit 75090be
|
||
### User responsibility and best practices | ||
|
||
While agent mode includes security protections, users should follow these best practices: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While agent mode includes security protections, users should follow these best practices: | |
While agent mode includes security protections, you should follow these best practices: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the user best practices intro with simpler language as suggested. Commit 75090be
### User responsibility and best practices | ||
|
||
While agent mode includes security protections, users should follow these best practices: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a bulleted list for these items
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converted all best practices to a bulleted list format as requested. Commit 75090be
docs/copilot/chat/chat-agent-mode.md
Outdated
|
||
**Verify proposed changes to critical files**: Pay special attention when agent mode wants to modify important files like configuration files, security settings, or build scripts. | ||
|
||
**Consider using dev containers or VMs for isolation**: For enhanced security, run agent mode operations in isolated environments like dev containers or virtual machines to limit potential impact. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**Consider using dev containers or VMs for isolation**: For enhanced security, run agent mode operations in isolated environments like dev containers or virtual machines to limit potential impact. | |
**Consider using dev containers or VMs for isolation**: For enhanced security, run agent mode operations in isolated environments like [dev containers](https://code.visualstudio.com/docs/devcontainers/containers) or virtual machines to limit potential impact. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the dev containers description with the proper link to the dev containers documentation. Commit 75090be
@copilot handle my review comments |
Co-authored-by: ntrogh <[email protected]>
Co-authored-by: ntrogh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Please implement the requested changes
docs/copilot/chat/chat-agent-mode.md
Outdated
|
||
#### Workspace Trust integration | ||
|
||
Agent mode respects VS Code's [Workspace Trust](https://code.visualstudio.com/docs/editor/workspace-trust) feature, which is a critical security boundary. By default, when your workspace is in restricted mode (untrusted), agent mode and other AI capabilities are disabled for the workspace. Recommendation is that you carefully review code or projects you downloaded before you trust the workspace, and only then use agent mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Add a high-level introduction about what Workspace Trust is, so the reader can better frame this section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a high-level introduction explaining that Workspace Trust is VS Code's security feature that helps users decide whether code in a folder can be executed safely. This provides better context for readers to understand the section. Commit 30d8155
docs/copilot/chat/chat-agent-mode.md
Outdated
@@ -324,3 +400,20 @@ A chat request can have a maximum of 128 tools enabled at a time. If you have mo | |||
|
|||
* [Configure MCP servers to add tools to agent mode](/docs/copilot/chat/mcp-servers.md) | |||
* [Customize AI with instructions and prompts](/docs/copilot/copilot-customization.md) | |||
ot/copilot-customization.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot What is this? Can you review and remove where appropriate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaned up the corrupted text that was duplicating parts of the customization documentation link. The Related resources section now ends cleanly with just the two proper links as intended. Commit 30d8155
… up corrupted text Co-authored-by: ntrogh <[email protected]>
This PR applies comprehensive reviewer feedback to improve the Security section of the agent mode documentation. The changes enhance clarity, structure, and completeness based on detailed review comments.
Key Improvements Made
Enhanced language and clarity:
Expanded Workspace Trust explanation:
Better structure and formatting:
Improved technical accuracy:
User-focused improvements:
These changes address all reviewer feedback while preserving the comprehensive security guidance and maintaining the security-first approach of the original implementation.
Fixes #8571
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.