Github Copilot · Free Practice Question Medium

Question 5

You are an administrator for a company that uses GitHub Copilot for Business. Your team members have raised concerns about Copilot potentially suggesting code snippets from internal repositories. You want to configure the Copilot editor config file to ensure that private code is not included in training data or suggestions. Which of the following configurations is correct for ensuring these exclusions?

  • A

    Use the "excludePatterns" directive in the editor config file to exclude private repositories or directories from Copilot completions

  • B

    Set "useBusinessRules": true to enable business-level privacy controls and exclude internal code from Copilot suggestions

  • C

    Add "corporateDataProtection": true to comply with business privacy standards and prevent proprietary code suggestions

  • D

    Add "trainingData": false to the editor config file to prevent private code from being used in model training

Reveal correct answer

Correct answer: A

A.

The "excludePatterns" directive is the correct way to ensure that specific directories, files, or repositories are excluded from GitHub Copilot’s completions. By defining patterns for which files or directories should be excluded, you can prevent Copilot from using these in completions, thereby protecting proprietary or internal code from being suggested. This is particularly important for businesses that deal with sensitive data.

B.

This option is incorrect because there is no such directive as "useBusinessRules" in the Copilot editor config file. While GitHub Copilot for Business does offer enhanced privacy features, these are managed through settings outside of the editor config file, such as organizational policies and repository settings.

C.

This directive does not exist in the GitHub Copilot editor config file. Privacy and data protection in GitHub Copilot are managed through other mechanisms, such as exclusions via the "excludePatterns" directive or business-level policies. There is no need for a separate "corporateDataProtection" flag.

D.

There is no "trainingData": false directive in the Copilot editor config file. GitHub Copilot already excludes private repositories from being used in its training data. Configuring this via the editor config file is unnecessary, and there is no such option available.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need