If your engineering team is using GitHub Copilot under Individual licenses on company machines, stop reading configuration guides and revoke those seats immediately.
That sounds blunt, but at 365Finds we see teams waste weeks tweaking editor settings while their underlying contract permits data harvesting. Individual GitHub Copilot plans allow prompt retention and model training unless each engineer manually navigates their personal settings to opt out. That is an unacceptable compliance posture.
Securing proprietary code in GitHub Copilot requires a deliberate, multi-layered architecture: commercial contract isolation, organization-level policy enforcement, file-level content exclusion, and IDE telemetry lockdown. Here is how to configure each layer properly.
1. Commercial Foundation: Zero-Retention Contracts
The absolute prerequisite for preventing proprietary code leakage is switching to GitHub Copilot Business or GitHub Copilot Enterprise.
Under GitHub’s Data Protection Agreement (DPA) for Business and Enterprise tiers:
- No Model Training: Prompts (your code snippets, cursor positions, adjacent open tabs) and suggestions are never used to train GitHub or third-party foundational models.
- Transient Processing Only: Code sent across the wire is evaluated in-memory and discarded the moment the suggestion is generated or dismissed.
If developers sign in with personal GitHub accounts, organizational policies cannot be enforced. Enterprise administrators must mandate GitHub Single Sign-On (SSO) and assign seats strictly through managed enterprise accounts.
2. Organization Policies: The First Defense Line
Enterprise and Organization owners must enforce two critical policies in GitHub’s administrative console before developers write a single line of code.
Navigate to Organization Settings > Copilot > Policies (or Enterprise Settings > Policies > Copilot):
Block Suggestions Matching Public Code
Set Suggestions matching public code to Blocked. When this setting is enabled, GitHub Copilot’s duplication detection filter cross-checks all completions against public GitHub repositories. If an inline suggestion contains approximately 150 characters of matching code, GitHub suppresses the completion entirely. This prevents unintentional license contamination (such as accidentally importing GPL-licensed blocks into proprietary commercial software).
Restrict Ancillary Copilot Surfaces
Evaluate whether Copilot Chat on mobile or CLI workflows align with your data loss prevention (DLP) perimeter. If your corporate endpoints require proxy inspection and egress filtering, disable Copilot in the CLI and Copilot Chat in GitHub Mobile until endpoint security tooling can govern those clients.
3. Content Exclusions: Keeping Proprietary Files Out of Prompts
Zero retention protects your code from model training, but it does not stop raw source code from leaving your workstation and hitting cloud endpoints.
For many engineering teams, client contracts, export controls, or strict NDAs prohibit sending sensitive files outside the perimeter under any circumstances. GitHub Copilot's Content Exclusion feature solves this by cutting off Copilot’s awareness of designated files and directories.
Where to Configure Content Exclusions
You can apply exclusions across an entire organization or on individual repositories:
- Navigate to your Organization Settings or repository Settings.
- In the left sidebar, click Copilot > Content exclusion.
- Under Repositories and paths to exclude, enter paths using YAML list syntax and standard glob pattern (
fnmatch) notation.
Recommended Exclusion Patterns
365Finds recommends establishing a baseline exclusion rule set that covers secrets, private crypto implementations, compliance-regulated data, and proprietary algorithms:
# Environment and credential files
- "*.env"
- "*.pem"
- "*.key"
- "*.p12"
- "secrets.json"
- "credentials.yml"
# Algorithmic core and proprietary trade secrets
- "/src/core/crypto/**"
- "/packages/proprietary-engine/**"
# Compliance, customer PII, and financial schemas
- "/src/billing/pci/**"
- "/data/schemas/pii/**"
What Content Exclusion Actually Blocks
When a developer opens an excluded file in an editor:
- Inline completions are silenced: Copilot will not offer completions inside the file.
- Context injection is blocked: The excluded file will not be silently read in the background to provide context for suggestions in other open tabs.
- Copilot Chat ignores the file: The assistant cannot inspect, summarize, or refactor code within excluded paths. Supported IDEs display an exclusion shield icon indicating the file is masked.
The Boundary Limitations You Must Know
Content exclusion is a platform-level guardrail, not an operating-system sandbox. At 365Finds, we emphasize two critical caveats that security teams overlook:
- Semantic Symbol Leakage: If an unexcluded file imports an excluded class or interface, your IDE's language server may still pass type definitions or method names to Copilot as surrounding semantic context.
- Autonomous Agent and Terminal Bypass: In advanced IDE agent modes, if an AI agent runs terminal commands (
cat,grep, or build scripts), it operates with the developer’s local shell permissions and can read excluded files unless terminal execution is strictly sandboxed.
4. IDE-Level Telemetry and Diagnostic Lockdown
Telemetry sharing is the second half of the data leakage equation. By default, development environments collect diagnostic telemetry and interaction metadata (whether a suggestion was accepted, typing latency, and extension errors).
While GitHub Copilot Business segregates diagnostic metadata from customer code, high-security environments should disable telemetry at the IDE layer entirely.
Visual Studio Code
In corporate environments, administrators should distribute managed configuration profiles or push settings via MDM (Intune, Jamf) with the following in settings.json:
{
"telemetry.telemetryLevel": "off",
"github.copilot.advanced": {
"debug.overrideEngine": "",
"debug.testOverrideProxyUrl": ""
}
}
Setting telemetry.telemetryLevel to "off" stops VS Code and first-party extensions from transmitting crash reports, usage metrics, and operating environment signatures to Microsoft servers.
JetBrains IDEs (IntelliJ, WebStorm, PyCharm)
In JetBrains environments:
- Open Settings / Preferences > Appearance & Behavior > System Settings > Data Sharing.
- Uncheck Send usage statistics.
- Under Tools > GitHub Copilot, review local prompt cache settings to ensure transient suggestion caches are cleared upon IDE shutdown.
5. Network Egress and Gateway Inspection
Relying on developer compliance inside individual IDEs is fragile. Enterprise security teams should enforce network perimeter controls to guarantee that only authorized GitHub accounts reach Copilot endpoints.
Configure corporate firewalls or forward proxies to inspect traffic directed to:
api.githubcopilot.comcopilot-proxy.githubusercontent.comdefault.exp-tas.com(feature experimentation)
If an employee signs into a personal GitHub Copilot account on a corporate machine, an enterprise proxy can inspect the HTTP authorization header and block requests whose bearer tokens do not originate from your corporate GitHub Enterprise tenant ID.
The 365Finds Take
Content exclusion rules and telemetry toggles are essential hygiene, but they do not replace automated secret scanning.
Developers will inevitably paste API keys or internal database connection strings into chat prompts when they encounter a late-night production bug. Content exclusion prevents Copilot from reading files on disk; it does not slap a developer's hand when they paste a raw secret into Copilot Chat.
Pair GitHub Copilot’s Content Exclusion policies with pre-commit hooks (such as Gitleaks or TruffleHog) and push-protection rules in your central repository. That ensures sensitive tokens are revoked before Copilot—or any external API—ever sees them.