Copilot must not read files in your secrets configuration folder. What do you configure?
Why C is the answer
Content exclusions for those paths
Content exclusions stop specified files or paths being used by Copilot.
In detail
- Content exclusions tell Copilot not to use given paths.
- They are a setting, not a request.
- Exclusion has limits, so also keep real secrets out of repositories.
Use case
An illustrative scenario, not a real incident.
A repository holds deployment configuration with secrets. A content exclusion for that folder stops Copilot using those files in the features that support it.
See it in different ways
flowchart TD A["Content exclusion"] --> B["Applies: supported chat and completions"] A --> C["Applies: code review on GitHub"] A --> D["Not supported: Edit and Agent modes"] A --> E["Not guaranteed: third-party MCP servers"]
stateDiagram-v2 [*] --> Excluded Excluded --> Respected: inline suggestions and chat Excluded --> NotSupported: Edit and Agent modes Excluded --> NotGuaranteed: third-party MCP servers Excluded --> Indirect: IDE semantic information
flowchart TD
Q{"What do you need?"}
Q -->|"A setting that excludes paths"| A0["Content exclusion"]
Q -->|"A preference for Copilot"| A1["Instructions"]Key point: Content exclusions keep paths away from Copilot.
Why the other options are wrong
- A. An instructions file asking it to skip those paths
- An instruction is guidance, and can be missed.
- B. A private fork of the repository
- A fork does not change what Copilot reads.
- D. A pull request template for those files
- A template has no effect on file access.

