Security & Privacy
How Copilot handles your code data, telemetry options, and security best practices
Read time: 4 min
title: "Security & Privacy" description: "How Copilot handles your code data, telemetry options, and security best practices" section: "Copilot" readTime: "4 min"
Security & Privacy
Telemetry and Data Collection
VS Code telemetry is enabled by default, including with Copilot Free. You can opt out:
- Disable telemetry: Set
telemetry.telemetryLeveltooffin VS Code settings - Public code matching: Control whether suggestions matching public code are allowed in your Copilot settings. Note that some agent experiences, such as the Copilot app, may still produce matches or near matches even when the policy is set to Block
- Organization-managed: In Business and Enterprise plans, many settings are controlled by your administrator
How Copilot Uses Your Code
- Copilot sends code context to GitHub's servers (and the model provider) to generate responses
- Business and Enterprise: GitHub does not use your Copilot data to train AI models; this is protected by the GitHub Data Protection Agreement
- Free, Pro, Pro+ and Max: since April 24, 2026 GitHub may use interaction data (inputs, outputs, code snippets, and context) to train and improve models unless you opt out. Opt out in your personal Copilot settings (the "Allow GitHub to use my data for AI model training" setting); opting out does not affect access to Copilot features. Members or outside collaborators of a paid organization are excluded from training
- Read the GitHub Privacy Statement and the Trust Center for the current terms
Data-use terms for individual plans changed in 2026. If you work with private or client code on a personal account, check your Copilot settings and opt out if needed.
Content Exclusions
Content exclusion keeps specified files from being used as context. It is available on Copilot Business and Enterprise:
- Repository administrators configure exclusions for their repositories
- Organization owners configure exclusions for users with a seat from their organization
- Supported for inline suggestions in VS Code and other IDEs, and for chat in the Copilot app, Copilot CLI, GitHub.com, Visual Studio, and JetBrains. In VS Code, chat is supported but Edit and Agent are not
- Limitations: Copilot may still use semantic information from excluded files that the IDE provides indirectly (type information, hover definitions), and exclusions do not apply to symbolic links or repositories on remote filesystems
Organizational Controls
Business and Enterprise admins can:
- Enable or disable agents and features through Copilot policies and enterprise AI settings (
chat.agent.enabledcan be policy-managed) - Restrict which AI models are available to users
- Disable Bring Your Own Language Model Key in VS Code
- Control Copilot Memory and the Copilot app by policy
See Enterprise AI settings and the GitHub Copilot Trust Center.
Agent Safety in VS Code
- Review tool calls before approving them, and be careful with Allow all and Autopilot
- Sandboxing restricts file system and network access for terminal commands (Preview on macOS, Linux, WSL2; Experimental on Windows)
- Terminal auto-approval rules are a convenience, not a security boundary
Security Best Practices for Users
- Never paste credentials, API keys, or secrets into chat prompts — treat prompts like code in a shared repo
- Always review AI-generated code before accepting — AI can introduce subtle vulnerabilities
- Watch for common vulnerabilities in generated code: SQL injection, XSS, hardcoded secrets, missing input validation
- Use the Review smart action (right-click → Generate Code → Review) for an AI review of selected code
- Keep the Copilot extension updated — security fixes are released regularly
Compliance and Transparency
- Full compliance information: GitHub Copilot Trust Center
- Privacy statement: GitHub Privacy Statement
- For support: support.github.com