TL;DR
On April 24 2026 GitHub flipped a default: Copilot Free, Pro and Pro+ now use your prompts and code snippets to train models unless you opt out. Cursor's equivalent switch, Privacy Mode, is default-on for Teams and Enterprise but undocumented for individual accounts. Neither tool can be self-hosted, and both ship agents that can run commands. The meaningful difference is not which is "safer" in the abstract, it is which defaults you inherit on the plan you are actually paying for.
Most comparisons of these two tools argue about autocomplete quality. That is not the part that will get you in trouble. The part that matters is what each tool does with your source code when you have not touched a single setting, and that answer changed this year.
The default that changed in April 2026
GitHub announced that starting April 24 2026, interactions with Copilot on the Free, Pro and Pro+ plans may be used to train and improve its AI models. The data in scope is not just the text you type. GitHub's description covers "outputs accepted or modified by the user, inputs sent to GitHub Copilot, including code snippets shown to the model, code context surrounding the user's cursor position."
It is opt-out. The setting is on unless you go and switch it off, under Settings > Copilot > Features, in the privacy section at the bottom.
Copilot Business and Copilot Enterprise are excluded. Those plans are covered by GitHub's Data Protection Agreement, which contractually prevents it.
The plan you are on decides this, not the product name. A founder on Copilot Pro and an engineer at a company on Copilot Business are using the same editor with opposite data policies. If you pay the $10 a month yourself, you are in the training pool by default.
The developer reaction to the announcement is worth noting: the community discussion where GitHub published the FAQ drew 312 downvote reactions against 4 upvotes. Not a scientific sample, but a clear read on how much of a surprise the change was.
What Cursor does instead
Cursor's control is a single switch called Privacy Mode. With it enabled, Cursor maintains zero data retention agreements with its model providers, so the providers do not store inputs and outputs or train on them. Cursor's docs add that cached file contents are "temporary, never permanently stored, and never used as training data."
With Privacy Mode off, Cursor's data use page is direct about it: the company may "use and store codebase data, prompts, editor actions, code snippets, and other code data and actions to improve our AI features and train our models."
So far that sounds like the same trade as Copilot. The difference is the default, and here the documentation is uneven. Cursor states that Privacy Mode is on by default for Enterprise teams, and enabled by default for all team members on Teams. For an individual Free or Pro account, it does not state a default at all.
Go look at the toggle rather than trusting any article, including this one. Both settings live two clicks deep, both are per-account, and both are the kind of thing that gets reset when you sign in on a new machine. Check it, then check it again on your laptop.
One more Cursor detail that rarely makes it into comparisons: some models fall outside Cursor's zero-retention agreements entirely. Those models are off by default and need admin approval before anyone on a team can use them. That is a genuinely good default.
Data handling, corrected
The table below replaces the one this post carried before. Two rows in the old version were wrong, and they were wrong in the direction that flatters Copilot.
| Cursor | GitHub Copilot | |
|---|---|---|
| Trains on your code by default | No on Teams and Enterprise; undocumented for individual plans | Yes on Free, Pro, Pro+ and Max since April 24 2026. No on Business and Enterprise |
| How you turn it off | Privacy Mode toggle | Settings > Copilot > Features, privacy section |
| Zero retention with model providers | Yes, when Privacy Mode is on | Zero retention for IDE completions and chat |
| Self-hosted option | No | No |
| Model choice | Multiple providers, user-selectable | GitHub-selected set |
| Non-zero-retention models | Off by default, admin approval required | Not user-selectable |
"Enterprise Cloud" is not self-hosting. An earlier version of this page listed Copilot's self-hosted option as "Enterprise Cloud." That was a licensing tier being mistaken for a deployment model. Neither of these tools runs on your own hardware. If your threat model genuinely requires that code never leaves your network, neither product qualifies, and no plan upgrade changes it.
Agent permissions: the newer risk
Both tools moved from suggesting code to running it, and that shifted where the real exposure sits. An autocomplete that suggests a bad line is a code review problem. An agent with a terminal is an access-control problem.
Cursor has three Run Modes. Auto-review is the default as of version 3.6. Allowlisted calls run immediately, other shell commands run in a sandbox where feasible, and the rest go to a classifier that can allow, block, or ask you. The sandbox blocks network access by default and opens it through a built-in allowlist of roughly 100 domains covering package managers and language tooling. The third mode, Run Everything, does what the name says: every tool call executes with no intervention.
Cursor's documentation includes a sentence that deserves more attention than it gets. Auto-review, the default, "is not a security boundary."
That is the vendor telling you not to treat it as one. Take them at their word.
GitHub Copilot's coding agent takes a different shape. It works in an ephemeral environment powered by GitHub Actions, opens exactly one pull request per task it is assigned, and works on one branch at a time. By default it can only access context in the repository you specified when you started the task.
The PR-shaped output is the underrated safety property here. Everything the agent did arrives as a diff somebody has to approve, rather than as changes already sitting in your working tree.
Neither default is wrong, they are tuned for different failure modes. Cursor optimizes for staying out of your way in a local checkout you can git reset. Copilot's agent optimizes for a reviewable artifact in a shared repository. Pick the one that matches where your risk actually lives.
Both still generate insecure code
Nothing above addresses the vulnerability that ships to production. Both tools produce the same recurring patterns, and we see these constantly in scans of AI-built apps:
- Hardcoded secrets. API keys pasted inline because the model saw that pattern a million times in public repos.
- String-concatenated SQL instead of parameterized queries.
- Missing output escaping in generated UI code.
- Disabled TLS verification and permissive CORS, added to make something work locally and never reverted.
The model you picked barely moves this. Your prompt and your review do.
Do not ask either tool to write authentication or cryptography from scratch. These are the two areas where a plausible-looking answer is most likely to be subtly broken, and where the failure is silent until somebody exploits it.
Which should you choose?
Choose Cursor if
You want to pick your own model, you work in a full IDE rather than a plugin, and you are on Teams or Enterprise where Privacy Mode is already on for everyone. The per-model retention controls are the strongest thing here.
Choose GitHub Copilot if
You are on Business or Enterprise, where the Data Protection Agreement rules out training entirely and you get audit logs and IP indemnity along with it. On Free or Pro, go turn the training setting off first.
If you are an individual paying for either one, the honest answer is that the plan tier matters more than the brand. Both vendors give their contracted business customers stronger guarantees than their self-serve users, and they are upfront about it in their own documentation.
Further reading
Made your choice? Here's how to secure the stack you picked.
Does GitHub Copilot train on my code?
Since April 24 2026, yes, if you are on Copilot Free, Pro, Pro+ or Max, unless you turn it off. GitHub's own FAQ describes it as opt-out: the setting is already on and you have to go disable it in Settings > Copilot > Features. Copilot Business and Copilot Enterprise are excluded and are covered by GitHub's Data Protection Agreement instead.
Is Cursor's Privacy Mode on by default?
It depends on your plan, and this is the detail most comparisons get wrong. Cursor's docs state Privacy Mode is on by default for Enterprise teams and enabled by default for all team members on Teams. For an individual Free or Pro account the docs do not state a default, so check the toggle yourself rather than assuming.
What does Cursor store if Privacy Mode is off?
Cursor's data use page says that with Privacy Mode off it may "use and store codebase data, prompts, editor actions, code snippets, and other code data and actions to improve our AI features and train our models." With Privacy Mode on, cached file contents are temporary, never permanently stored, and never used as training data.
Can GitHub Copilot be self-hosted?
No. Neither Cursor nor Copilot can run entirely on your own hardware. GitHub Copilot Enterprise is still GitHub's cloud, and "Enterprise Cloud" is a licensing tier rather than a self-hosting option. If a comparison table tells you otherwise, it is wrong.
Which one is riskier to let run commands on its own?
Both ship an agent that can execute things, and both default to asking first. Cursor's default Run Mode is Auto-review, and Cursor's own documentation says plainly that it "is not a security boundary." Copilot's coding agent runs in an ephemeral GitHub Actions environment, can open exactly one pull request per task, and by default only sees the repository you started the task in.
Scan Your AI-Generated Code
Check for security vulnerabilities introduced by AI assistants.