Configure privacy, content exclusions, and safeguards
Five controls, five questions: match the control to the question
Legal wants no Copilot suggestion copied from a GPL-licensed project, the security lead wants secrets.json kept away from Copilot, and one developer wants Copilot quiet in Markdown. All three sound like privacy, yet this domain rests on one rule: each question a scenario asks has exactly one control that answers it; a scenario where something misbehaves is a troubleshooting question, so diagnose it before changing any control (the second step below, Apply safeguards and troubleshoot). Content exclusion (an administrator rule on GitHub) decides which files Copilot may read as context, the code and files it gathers to build a request; editor settings (a developer's own switches in the IDE) decide where Copilot offers inline suggestions (which some IDE menus label "completions") to that one developer; and the Copilot terms (the agreement that governs your Copilot use) decide who owns output (GitHub does not claim ownership of your inputs or outputs), whether your data may train AI models (individual plans have a training opt-out in personal Copilot settings), and whether GitHub defends you against third-party claims about output (claim defense). Two output controls (this guide's grouping, not GitHub terminology) decide what Copilot may show you: the Suggestions matching public code policy (also called the public code filter, or duplicate detection), whose Block value withholds suggestions that match code in public repositories on GitHub.com and whose Allow value shows them with a code reference (a record of the matching public files and any license found), and GitHub's content filters, which scan prompts (what you send Copilot) and responses (Copilot's output) to detect and block harmful or offensive content and insecure code before it is shown to you, making them an output control by what they stop, not where they look. Despite the shared word, content filters judge what content says, while content exclusion decides which files Copilot may read, whatever they contain. The classic trap swaps controls, such as setting Block to protect a secrets file: Block acts only on what Copilot shows and never keeps that file out of Copilot's context.
The domain unfolds in two steps: privacy settings and exclusions, then safeguards and troubleshooting
Start with Manage privacy settings and exclusions, covering the first three controls: writing content exclusion rules at repository, organization or enterprise scope (the enterprise account containing the organizations, not the Copilot Enterprise plan; exclusion is available only to organizations on Copilot Business or Copilot Enterprise), switching inline suggestions and next edit suggestions (Copilot's predicted next edit and its location) on or off in editor settings, and reading which Copilot terms apply, set by the purchase channel, and what they say on ownership, training and claim defense. Reach for it when a question asks what Copilot may read, whom a rule reaches, or who owns output. Then Apply safeguards and troubleshoot covers both output controls, which decide what Copilot may show, and sets them beside content exclusion as the input control, which decides what Copilot may read (also this guide's grouping), and diagnoses Copilot by how far a failure reaches, pointing to one of four layers: the service, the client and sign-in (the Copilot extension, its editor settings and the signed-in account), the network, or policy (an administrator setting such as content exclusion). Reach for it when a question asks what Copilot may show, who sets Block or Allow, or why suggestions, Chat or an exclusion misbehave; the decision tree on this page first asks whether something misbehaves, then routes by the question each control answers.
When two answers both work, pick the one that knows the control's limit
Every control here has a documented edge, and the exam rewards the answer that respects it over trusting the setting. Content exclusion is not supported in Edit and Agent modes of Copilot Chat in Visual Studio Code and other editors and does not apply to symbolic links (file entries that point to another file), among other limits listed on Manage privacy settings and exclusions; Block does not fully stop public-code matches from Copilot cloud agent (which works on a task in a GitHub Actions-powered environment) or Copilot CLI (Copilot in the terminal), among other surfaces covered in Apply safeguards and troubleshoot; content filters reduce harmful or insecure output without certifying it; and GitHub not claiming ownership of an output does not clear that output's license terms. So prefer the answer that keeps a person reviewing and testing what Copilot produces, and when a control seems to fail, prefer confirming it is in effect before rewriting it: a new exclusion can take up to 30 minutes to reach an IDE that has already loaded its settings.
Five controls in two steps: what each answers, and the swap to avoid
| Step | Controls covered | Question each control, or troubleshooting, answers | Tempting swap | Drill into |
|---|---|---|---|---|
| Privacy settings and exclusions | Content exclusion, editor settings, Copilot terms | Content exclusion: which files may Copilot read as context? Editor settings: where does Copilot offer inline suggestions to me? Copilot terms: who owns output, may data train models, who defends you against third-party claims? | An editor setting used to exclude files for a team, or content exclusion used as a training opt-out | Manage privacy settings and exclusions |
| Safeguards and troubleshooting | The output controls, which decide what Copilot may show (Suggestions matching public code, content filters), plus troubleshooting | Suggestions matching public code: is a matching suggestion blocked, or shown with a code reference? Content filters: is harmful, offensive or insecure content, in a prompt or a response, blocked before it is shown? Troubleshooting: how far does the failure reach? | Block used to keep a secrets file out of Copilot's context, or filtered output treated as verified | Apply safeguards and troubleshoot |