Configure Privacy, Content Exclusions & Safeguards
This skill area accounts for 10–15% of the exam. It covers content exclusion configuration, output ownership, duplication detection, security warnings, and troubleshooting suggestion issues.
Manage Privacy Settings & Exclusions
Content Exclusions & Editor Settings
Content exclusions are a key admin control on Business/Enterprise plans. Reference: Excluding content from GitHub Copilot.
Configuration Scopes
| Level | Location in GitHub | Scope of Effect |
|---|---|---|
| Repository | Repo Settings → Copilot → Content exclusion | That repository only |
| Organization | Org Settings → Copilot → Content exclusion | All users with seats from that org |
| Enterprise | Enterprise AI controls → Copilot → Content exclusion | All orgs and users in the enterprise |
What Gets Excluded
When a file matches an exclusion rule, Copilot:
- Does not provide inline code completion suggestions when editing that file
- Does not use that file's content as context in Copilot Chat (excluded files won't appear as references)
- Does not send the excluded content to Copilot's servers
Pattern Syntax — fnmatch (case-insensitive)
Exclusion paths use fnmatch pattern matching notation:
| Pattern | Matches |
|---|---|
* | Any string of characters (within one path segment) |
? | Any single character |
[abc] | Any one of the listed characters |
[a-z] | Any character in the range |
{server,session}* | Brace expansion: files starting with "server" or "session" |
**/directory/** | Recursive match: any file under "directory" at any depth |
Example Configuration Syntax
Repository-level (one path per line):
# Exclude secrets and config files
secrets.json
secret*
*.cfg
**/.env
/scripts/**
Organization/Enterprise-level (YAML, keyed by repo):
"*":
- "**/.env"
my-repo:
- "/src/internal/kernel.rs"
- "secrets.json"
https://github.com/org/repo.git:
- "/PATH/TO/FILE"
"GitHub Copilot CLI, Copilot cloud agent, and Agent mode in Copilot Chat in IDEs, do not support content exclusion." — This is a major caveat that is very likely to be tested. Content exclusions only apply to IDE inline suggestions and Chat (non-agent mode).
Propagation & Verification
- Changes to exclusion rules take up to 30 minutes to propagate to IDE clients
- To force refresh in VS Code: Command Palette → Developer: Reload Window
- To force refresh in JetBrains / Visual Studio: close and reopen the IDE
- In Vim/Neovim: exclusions are fetched automatically when a file is opened
- Verification method: Open an excluded file → attempt an edit that normally triggers suggestions → no suggestions should appear
- For Chat verification: open the excluded file as context → prompt "explain this file" → the file should not appear in the references list
API Management
- Org and enterprise owners can manage exclusions programmatically via the Copilot REST API
- Useful for automating exclusion rule deployment at scale
Editor-Level User Settings
- VS Code:
github.copilot.enablesetting — can be set per language (e.g., disable for*.md) - JetBrains: Toggle in Copilot settings with language-specific controls
- Telemetry: Individual/Pro users can opt in/out of sharing usage data
- Training data: Free/Pro/Pro+/Max users can opt in/out of having their data used to train Copilot models; Business/Enterprise: data is never used for training
Content exclusions are Business and Enterprise plans only — not available on Free, Pro, Pro+, or Max (Max is still an individual plan, no matter how expensive — it gets no org-admin controls). Also know the three configuration levels (repo, org, enterprise) and their relative scope.
Ownership & Limitations of Outputs
Who Owns AI-Generated Code?
- GitHub does not claim ownership over Copilot-generated suggestions
- Responsibility for the code lies with the developer who accepts and commits it
- Suggestions may resemble existing open-source code — licensing must be considered
- Enable duplication detection to identify suggestions matching public code
- IP indemnity coverage varies by plan — consult your Copilot agreement
Limitations to Remember
- No guarantee that suggestions are original, unique, or free of vulnerabilities
- Suggestions are not legal advice — review for compliance independently
- Organizations should establish written AI usage policies for developers
- Copilot cannot guarantee correctness — only the developer's validation can
Apply Safeguards & Troubleshoot
Duplication Detection & Security Warnings
"Suggestions Matching Public Code" (Duplication Detection / Code Referencing)
The exam guide names this policy "suggestions matching public code filtering" — Copilot compares a suggestion plus ~150 characters of surrounding code against public code on GitHub, and can block or allow matches:
| Setting | Behaviour | Use Case |
|---|---|---|
| Block | Suppress suggestions that match (or near-match) public code; user sees no suggestion | Strict IP compliance, open-source projects |
| Allow | Show matching suggestions and let the user view the matched repositories ("code referencing") | Maximum productivity, less IP-sensitive projects |
- Personal accounts configure this individually — unless they belong to an org/enterprise, in which case the setting is inherited and the personal option is unavailable
- Org/enterprise admins configure it under Settings > Copilot > Policies
- When blocked, the suggestion is filtered before reaching the user
- Exception: Copilot coding agent does not support Block mode for this policy — matches are highlighted in the session logs instead of being suppressed
- Note: if this policy is set to Block and no suggestions appear, that is expected behaviour — know this for troubleshooting questions
Security Warnings
- Copilot includes safety filters to detect potentially insecure code patterns
- Suggestions with known vulnerability patterns may be flagged or suppressed
- Complements — but does not replace — GitHub's dedicated security tools (Dependabot, Secret Scanning, Code Scanning / SAST)
- Always run dedicated security tooling in addition to Copilot's built-in checks
| Content Exclusions | Duplication Detection | |
|---|---|---|
| What it does | Prevents Copilot from accessing specific files/repos | Checks if suggestions match publicly available code |
| Direction | Controls input (what Copilot can see) | Controls output (what Copilot can suggest) |
| Plan required | Business / Enterprise | All plans (configurable) |
| Configured by | Org/Enterprise admin | Individual (if unaffiliated) or Org/Enterprise admin (policy is inherited if affiliated) |
Troubleshooting Suggestions & Exclusions
| Symptom | Likely Cause | Resolution |
|---|---|---|
| No suggestions in any file | Extension disabled, no valid subscription, authentication error | Check extension toggle, verify account/subscription, re-authenticate |
| No suggestions in a specific file | File matches a content exclusion rule, or duplication detection is blocking | Check org/repo exclusion settings; check duplication detection policy |
| Low-quality or irrelevant suggestions | Insufficient context (few open files, vague prompt) | Open relevant files, write descriptive comments, use few-shot examples |
| Exclusions not taking effect | 30-minute propagation delay, incorrect glob pattern, wrong scope level | Wait 30 min or force reload IDE; verify pattern syntax and config scope |
| Excluded file still referenced in Chat | Cache delay or stale IDE session | Reload IDE window; re-open the chat session |
| Chat rate limit reached | Premium request quota exhausted for the month | Wait for quota reset (monthly); upgrade plan or purchase additional requests |
| Agent/CLI ignoring exclusions | Content exclusions do not apply to CLI, cloud agent, or Agent Mode | This is by design — use alternative safeguards for agentic workflows |
Study Resources
- Excluding Content from GitHub Copilot (GitHub Docs) Full guide: fnmatch patterns, scope levels, propagation time, verification steps, API management.
- GitHub Trust Center Data handling, privacy policies, and security information for Copilot.
- Copilot Plans & Features (GitHub Docs) Which privacy and safeguard features are available on each plan.
- GH Certified — Practice Questions Community practice tests covering privacy, exclusion, and safeguard topics.