Skip to content

GH-300 · Domain 6: Configure privacy, content exclusions, and safeguards · 13% of the exam

Task 6.1: Manage privacy settings and exclusions

Content exclusions for repositories, organizations and enterprises, editor settings, data and training choices, and who owns Copilot's output and its limits.

Study it

  • Content exclusions for repositories, organizations and enterprises

    Lesson coming

  • Editor settings, training choices, and the ownership and limits of output

    Lesson coming

Sample questions

Try each one before opening the answer. Every option is explained, with the GitHub documentation page that proves it.

Question 1 · choose 1

An organization owner wants Copilot to ignore every .env file its members open, in any repository and also in folders that are not under Git. Which entry in the organization's content exclusion settings does that?

  1. A"*": ["**/.env"]
  2. Bocto-repo: ["**/.env"]
  3. C- "/.env"
  4. D"**": [".env"]
Show the answer and why
  • A"*": ["**/.env"]

    Correct

    Entering "*": followed by a path excludes matching files anywhere, within a Git repository or elsewhere.

  • Bocto-repo: ["**/.env"]

    Incorrect

    A repository reference limits the rule to that one repository.

  • C- "/.env"

    Incorrect

    A bare path is the repository-settings format, and a leading slash anchors it to the repository root.

  • D"**": [".env"]

    Incorrect

    "**" is not the documented reference for all locations; the organization format uses "*":.

In organization settings (Copilot > Content exclusion), to exclude files located anywhere, within a Git repository or not, enter "*": followed by the paths. The documentation's example "*": ["**/.env"] excludes all .env files from all file system roots. To target one repository, use its reference (such as octo-repo: or a URL) followed by paths.

Question 2 · choose 1

A contractor works in Org A's repositories but gets his Copilot seat from Org B, in the same enterprise. Org A's owner excluded /secrets/** in Org A's settings, yet the contractor still gets suggestions informed by those files. Where should the rule go so it covers him too?

  1. AIn the contractor's personal Copilot settings, under privacy
  2. BIn a .copilotignore file at the root of each repository
  3. CIn the enterprise's content exclusion settings, which cover all Copilot users in the enterprise
  4. DIn Org B's organization custom instructions, telling Copilot never to read Org A's secret files at all
Show the answer and why
  • AIn the contractor's personal Copilot settings, under privacy

    Incorrect

    Individuals cannot define content exclusions in personal settings.

  • BIn a .copilotignore file at the root of each repository

    Incorrect

    Content exclusion is configured in repository, organization or enterprise settings, not with an ignore file.

  • CIn the enterprise's content exclusion settings, which cover all Copilot users in the enterprise

    Correct

    Enterprise rules apply to all Copilot users in the enterprise, whereas organization rules apply only to users assigned a seat by that organization.

  • DIn Org B's organization custom instructions, telling Copilot never to read Org A's secret files at all

    Incorrect

    Custom instructions guide responses; they do not enforce exclusions.

Content exclusion can be set for a repository, an organization or an enterprise. Rules set at the enterprise level apply to all Copilot users in the enterprise, whereas rules set by organization owners only apply to users who are assigned a Copilot seat by that organization. Repository administrators can also exclude content for their own repositories, affecting users across the enterprise.

Question 3 · choose 2

A company relies on content exclusion to keep proprietary algorithms out of Copilot Chat answers. In which environments does content exclusion apply to Copilot Chat today? (Choose TWO.)

  1. AAgent mode in Copilot Chat in VS Code
  2. BCopilot Chat in Xcode
  3. CCopilot Chat in Eclipse
  4. DCopilot Chat in Visual Studio
  5. ECopilot Chat in JetBrains IDEs
Show the answer and why
  • AAgent mode in Copilot Chat in VS Code

    Incorrect

    Content exclusion is not supported in the Edit and Agent modes of Copilot Chat in VS Code.

  • BCopilot Chat in Xcode

    Incorrect

    Xcode supports exclusion for inline suggestions only, not chat.

  • CCopilot Chat in Eclipse

    Incorrect

    Eclipse supports exclusion for inline suggestions only, not chat.

  • DCopilot Chat in Visual Studio

    Correct

    Visual Studio supports content exclusion for both inline suggestions and chat.

  • ECopilot Chat in JetBrains IDEs

    Correct

    JetBrains IDEs support content exclusion for both inline suggestions and chat.

Support for content exclusion varies by tool. Visual Studio and JetBrains IDEs support it for inline suggestions and chat. VS Code supports it for inline suggestions and chat, but not Edit or Agent modes. Xcode and Eclipse support it for inline suggestions only. It is in public preview on the GitHub website and GitHub Mobile.

Question 4 · choose 1

A developer wants Copilot inline suggestions everywhere in VS Code except in YAML files, where suggestions keep interrupting him. Which settings.json entry does that?

  1. A"editor.inlineSuggest.enabled": false
  2. B"github.copilot.enable": { "*": true, "yaml": false }
  3. C"github.copilot.nextEditSuggestions.enabled": false
  4. D"languageAllowList": { "*": true, "yaml": false }
Show the answer and why
  • A"editor.inlineSuggest.enabled": false

    Incorrect

    This turns inline suggestions off for every language, not just YAML.

  • B"github.copilot.enable": { "*": true, "yaml": false }

    Correct

    github.copilot.enable lists languages to enable or disable, so "*": true with "yaml": false keeps Copilot on except for YAML.

  • C"github.copilot.nextEditSuggestions.enabled": false

    Incorrect

    This controls next edit suggestions, not suggestions per language.

  • D"languageAllowList": { "*": true, "yaml": false }

    Incorrect

    languageAllowList is the JetBrains setting, kept in the github-copilot.xml file; VS Code's settings.json uses github.copilot.enable.

In VS Code you can enable or disable GitHub Copilot for specific languages by editing settings.json under github.copilot.enable, for example "*": true with "yaml": false. editor.inlineSuggest.enabled turns inline suggestions on or off overall, and github.copilot.nextEditSuggestions.enabled controls next edit suggestions. The languageAllowList with a wildcard and exceptions is the JetBrains equivalent, set in github-copilot.xml.

Question 5 · choose 1

A freelancer on Copilot Pro+ wants to stop Copilot from reading a folder of client secrets. Which plans offer content exclusion?

  1. AAll plans, including Copilot Free
  2. BCopilot Pro+ and Copilot Max only
  3. CCopilot Business and Enterprise
  4. DCopilot Student only
Show the answer and why
  • AAll plans, including Copilot Free

    Incorrect

    The plans tables list content exclusion as not included in the individual plans.

  • BCopilot Pro+ and Copilot Max only

    Incorrect

    Content exclusion is not included in Pro+ or Max.

  • CCopilot Business and Enterprise

    Correct

    Content exclusion and excluding specified files are included only in Copilot Business and Copilot Enterprise.

  • DCopilot Student only

    Incorrect

    Copilot Student does not include content exclusion.

The plans comparison lists "Exclude specified files from Copilot" and "Content exclusion" as included in Copilot Business and Copilot Enterprise and not included in Copilot Free, Student, Pro, Pro+ or Max. The content exclusion documentation describes the support offered by the Business and Enterprise plans.

Question 6 · choose 1

Which roles can configure content exclusion for Copilot?

  1. AOnly enterprise owners
  2. BAny user with read access to the repository, from the file's menu
  3. COnly the Copilot license holder, in personal settings
  4. DRepository admins, organization owners and enterprise owners
Show the answer and why
  • AOnly enterprise owners

    Incorrect

    Repository administrators and organization owners can also configure it.

  • BAny user with read access to the repository, from the file's menu

    Incorrect

    Read access isn't enough to configure exclusions.

  • COnly the Copilot license holder, in personal settings

    Incorrect

    Individuals can't configure exclusions in personal settings.

  • DRepository admins, organization owners and enterprise owners

    Correct

    These three roles can configure content exclusion, each with its own scope.

Repository administrators, organization owners and enterprise owners can configure content exclusion, each at its own level: repository administrators for their own repositories, organization owners in the organization's settings and enterprise owners in the enterprise's settings. People with the Maintain role can view, but not edit, a repository's content exclusion settings.

Question 7 · choose 1

A repository administrator wants Copilot to ignore every file whose name ends in .cfg, wherever it is in the repository. Which entry under "Paths to exclude in this repository" does that?

  1. A- "*.cfg"
  2. B- ".cfg"
  3. C- "cfg/"
  4. D- "regex:.*\.cfg$"
Show the answer and why
  • A- "*.cfg"

    Correct

    The documentation's example "*.cfg" ignores files whose names end with .cfg anywhere in the repository.

  • B- ".cfg"

    Incorrect

    Like "secrets.json", a plain name matches only files called exactly .cfg, not files whose names end in .cfg.

  • C- "cfg/"

    Incorrect

    This names a directory called cfg, not files ending in .cfg.

  • D- "regex:.*\.cfg$"

    Incorrect

    Patterns use fnmatch notation, not regular expressions.

In repository settings you list paths to exclude in the format - "/PATH/TO/DIRECTORY/OR/FILE", one per line. fnmatch pattern notation is supported and patterns are case insensitive. Examples include "secrets.json" (that name anywhere), "secret*" (names starting with secret), "*.cfg" (names ending in .cfg anywhere) and "/scripts/**" (everything under /scripts).

Question 8 · choose 1

A file is excluded from Copilot in repository settings. Which statement about its effect is correct?

  1. ACopilot still offers inline suggestions in the file, but chat ignores it
  2. BCode review skips it, and it no longer informs other suggestions
  3. CThe file is deleted from Copilot's training data immediately
  4. DThe file is hidden from people without admin access
Show the answer and why
  • ACopilot still offers inline suggestions in the file, but chat ignores it

    Incorrect

    Inline suggestions are not available in excluded files.

  • BCode review skips it, and it no longer informs other suggestions

    Correct

    Excluded files are not reviewed in a Copilot code review and do not inform suggestions or responses.

  • CThe file is deleted from Copilot's training data immediately

    Incorrect

    Exclusion controls what Copilot reads; it is not a training data deletion.

  • DThe file is hidden from people without admin access

    Incorrect

    Exclusion affects Copilot only, not who can see the file.

When you exclude content from Copilot, inline suggestions are not available in the affected files, the content does not inform inline suggestions in other files or Copilot's responses, and the affected files are not reviewed in a Copilot code review.

Practise domain 6 →Practise all domains →