GitHub Copilot allows users and engineering leaders to prevent the AI model from outputting code that duplicates public repositories. The feature is controlled by a dedicated policy setting called Suggestions matching public code. When set to Block, Copilot checks code completions and roughly 150 characters of surrounding context against public code on GitHub.com; if an exact or near-exact match is detected, the suggestion is suppressed before it ever appears in your editor.
At 365Finds, we consider configuring this switch one of the first baseline actions any engineering team must take before rolling out Copilot to production repositories. Here is how to configure it across personal accounts, organizations, and enterprises, along with the operational trade-offs 365Finds evaluates when auditing AI code compliance.
1. Configure as an Individual Subscriber (Copilot Individual / Pro / Free)
If you pay for your own subscription or use an individual tier, you manage the filter directly from your personal GitHub account.
- Navigate to GitHub.com and sign in.
- In the upper-right corner, click your profile photo and select Settings.
- In the left navigation sidebar, scroll to the Code, planning, and automation section and click Copilot (or Copilot settings).
- Locate the section titled Suggestions matching public code.
- Open the dropdown menu and select Block.
- GitHub saves your preference immediately (or click Save if prompted by the interface).
Note: If you hold an individual subscription but your seat is linked to an organization that enforces central governance, this dropdown will be disabled or overridden by your organization's policy.
2. Configure for an Organization (Copilot Business)
Organization owners can enforce the public code filter across every developer seat assigned to the organization. Once configured here, individual developers cannot weaken the restriction.
- Go to your organization's main page on GitHub (
https://github.com/organizations/<your-org>). - Under the organization name, click the Settings tab.
- In the left sidebar, find the Copilot section and click Policies (or Policies and features).
- Locate the Suggestions matching public code dropdown.
- Change the setting to Block (or Blocked).
- Click Save to lock in the policy across all active and future organization members.
3. Configure across an Enterprise (GitHub Enterprise Cloud / Copilot Enterprise)
Enterprise administrators managing multiple organizations under a single GitHub Enterprise account can dictate policy centrally across the entire corporate estate.
- Navigate to your Enterprise dashboard on GitHub (
https://github.com/enterprises/<your-enterprise>). - In the enterprise sidebar, click Policies, then select Copilot.
- Under the Policies tab, find Suggestions matching public code.
- Select Blocked to enforce blocking across every single child organization.
- Alternative: Selecting No policy delegates the decision to individual organization owners, while selecting Allowed permits matches enterprise-wide.
- Confirm and save the policy.
The Precedence Rule: Inheritance and Conflicts
When configuring these controls, remember how GitHub resolves policy conflicts:
- Strict Hierarchy: Enterprise policies override Organization policies; Organization policies override Individual settings. An individual developer cannot switch to "Allow" if the managing organization selects "Block".
- The Most Restrictive Wins: If an engineer belongs to multiple organizations with differing Copilot policies, GitHub applies the most restrictive rule across their active environment. A single organization enforcing "Block" will suppress matching suggestions even if a second organization allows them.
The 365Finds Perspective: Essential Baseline, but No Magic Bullet
We frequently encounter engineering managers who assume that flipping "Suggestions matching public code" to Block completely eliminates intellectual property and licensing risks. 365Finds views this setting as a necessary defensive layer, but it is critical to understand its limitations:
- The 150-Character Blind Spot: Copilot’s matching engine tests code suggestions alongside roughly 150 characters of surrounding context. Syntactic boilerplate, short algorithmic helper routines, or code that differs by minor variable renames can bypass the filter while still carrying architectural similarity.
- GitHub-Centric Indexing: The filter checks public repositories indexed on GitHub.com. It does not actively cross-reference GitLab, Bitbucket, Stack Overflow snippets, or unindexed private code dumps.
- The "Silent Copilot" Experience: When blocking is turned on, developers occasionally experience unexplained latency or empty completions. Copilot generated an answer behind the scenes, hit the duplicate filter, and discarded it silently. Teams should communicate this behavior so developers do not mistake it for plugin failures.
Our Recommendation
For commercial proprietary software development, 365Finds recommends setting Suggestions matching public code to Block at the Enterprise or Organization level without exception. It shields teams from verbatim GPL or copyleft contamination in automated completions.
However, for teams engaged in open-source projects or internal exploratory tooling, setting the policy to Allow while enabling Code Referencing can actually offer superior visibility: rather than Copilot silently hiding public matches, the editor displays the matching repository, file path, and license type, giving developers the context needed to make an informed architectural decision.