When you write code inside a private repository, GitHub Copilot does not stay confined to your local machine. Every time your cursor pauses and an autocomplete suggestion appears, snippets of your proprietary source code have already traveled over an encrypted network connection to cloud servers, run through a machine learning model, and returned as a completion.
At 365Finds, we see developers swing between two unhelpful extremes: cynical paranoia ("Copilot is stealing my private code to train everyone else's AI") and reckless indifference ("It is just an IDE plugin doing local text expansion"). The technical reality sits squarely in the middle. GitHub Copilot does transmit your private code, but whether that code vanishes from memory or gets archived into Microsoft's data pools depends entirely on your subscription tier and account configuration.
The Transmission Pipeline: What Actually Leaves Your Editor
GitHub Copilot does not wait for git commits or push events. Autocomplete operates in real time.
As you type, the Copilot extension in your editor—whether VS Code, JetBrains, Visual Studio, or Neovim—packages an ephemeral payload called a Prompt. This prompt is not just the single line you are working on. To generate syntactically coherent completions, Copilot bundles:
- Prefix and Suffix: Several hundred lines of code immediately preceding and following your active cursor.
- Neighboring Tabs: Code excerpts from other files currently open in your editor workspace. Copilot inspects these background tabs to resolve import statements, custom type definitions, function signatures, and shared utilities.
- Workspace Metadata: File paths, language identifiers, and repository context.
This bundle is sent via HTTPS (TLS 1.2 or higher) to GitHub's routing infrastructure and Microsoft Azure OpenAI Service. The model computes the probabilistic next tokens, streams the Suggestion back to your editor, and renders inline ghost text.
The inclusion of neighboring tabs catches many engineering teams off guard. If you have an internal proprietary authentication module or a file containing environment definitions open in an adjacent editor tab, snippets from that second file can be packaged into the prompt payload even if you are editing an innocuous utility function.
Retention and Training: The Subscription Divide
The defining privacy question is what happens to that prompt once the suggestion returns. GitHub maintains two fundamentally different operational postures depending on your license.
Copilot Business and Copilot Enterprise
For corporate accounts running Copilot Business or Enterprise licenses, GitHub's data processing terms are explicit:
- Zero Prompt Retention: Prompts and generated suggestions are transient. They are processed in volatile memory for the milliseconds required to compute inference and are discarded immediately after delivery.
- No Model Training: GitHub and Microsoft Azure OpenAI Service do not retain, index, or feed private repository prompts into public or foundation training sets.
- Enterprise Data Protection: Customer code processed through business tiers is bound by GitHub's Data Protection Agreement (DPA).
If your team pays for seat licenses managed by an organization, GitHub treats your private autocomplete payloads as transient processing pipelines.
Copilot Individual (Free, Pro, Pro+)
Individual developer tiers carry a completely different risk profile.
By default, GitHub may retain prompts, suggestions, and editor interactions from individual accounts to evaluate model accuracy and fine-tune future AI architectures. This means snippets extracted from your private project could persist in GitHub's internal telemetry databases unless you intervene.
There is an important protection built into the platform: if an individual subscriber works inside a repository owned by an organization with an active Copilot Business or Enterprise agreement, the enterprise privacy policy automatically supersedes individual settings. However, for personal side projects, freelance contracts, or startups where developers use personal Copilot subscriptions against private repositories, individual policies apply.
To prevent GitHub from retaining or training on your individual autocomplete prompts, you must manually change your privacy preference:
- Navigate to GitHub Settings.
- Select Copilot.
- Under Model training and improvements (or Allow GitHub to use my data for AI model training), change the setting to Disabled.
365Finds considers leaving this toggle on default inside commercial environments an unacceptable operational hazard.
What GitHub Keeps: Telemetry vs. Code
Even when prompt retention is disabled, GitHub Copilot is never completely silent. The service collects User Engagement Data (telemetry) to maintain service reliability and monitor abuse.
Telemetry includes:
- Latency metrics and prompt generation round-trip times.
- Suggestion acceptance or rejection events.
- Feature invocations, such as triggering inline completions versus Copilot Chat.
- Error codes, plugin diagnostic logs, and environment metadata (IDE version, OS version).
GitHub retains telemetry data for up to two years. Crucially, on Business and Enterprise accounts—and on Individual accounts with training disabled—telemetry records performance metadata without storing raw source code snippets or AST representations.
Real-World Vulnerabilities and Content Exclusion
The most acute data-leakage danger in private repositories rarely stems from malicious server-side eavesdropping. It stems from human oversight during context collection.
Because Copilot extracts context automatically, hardcoded credentials, API keys, or regulated personal data (such as test databases containing real customer records) can inadvertently be bundled into prompt payloads. If an unredacted configuration file sits open in an editor tab, Copilot will read it.
To counteract this, GitHub provides Content Exclusion. Administrators can define rules at the repository, organization, or enterprise level to restrict Copilot from accessing sensitive paths:
# Example content exclusion patterns configured in repository settings
secrets/
*.env
src/proprietary_core/
compliance/
When a file matches an exclusion pattern:
- Copilot disables inline autocomplete suggestions entirely within that file.
- The file's content is blocked from being extracted as neighboring-tab context for other files.
- Copilot Chat and background agents are barred from inspecting the excluded paths.
Content exclusion serves as a governance firewall within the GitHub ecosystem, though 365Finds cautions that it operates at the application layer rather than as an operating system filesystem permission.
Public Code Matching: The IP Mirror
Handling private code also involves preventing external code from seeping in. GitHub includes a duplication detection filter titled Suggestions matching public code.
When enabled, Copilot runs candidate completions exceeding roughly 150 characters against an index of public code on GitHub. If a match occurs, the suggestion is suppressed.
For private repositories where intellectual property cleanliness is mandatory, 365Finds recommends enforcing the "Block" policy organization-wide. Receiving an unvetted snippet from a copyleft public repository inside a proprietary codebase creates downstream licensing liabilities that far outweigh the microsecond convenience of accepting an auto-suggested helper.
The 365Finds Verdict
GitHub Copilot does not steal private repository code to train public models when properly provisioned. But the security boundary is contractually enforced, not locally isolated.
If your organization allows developers to use individual personal Copilot licenses on private proprietary repositories without verified training opt-outs, you are leaking context. If your engineering workflows leave secret-bearing files open across adjacent tabs without Content Exclusion rules in place, your proprietary architecture is actively traversing third-party cloud infrastructure.
365Finds recommends three baseline configurations for any private development environment: migrate all contributors to Copilot Business or Enterprise licenses, enforce repository-level Content Exclusions on sensitive modules, and set the public code filter to block.