HEBook a call
Book a callHE
Blog

Securing GitHub Copilot in the enterprise: what to lock down before developers get AI

8 November 2026 · Shlomi Fanan

Buy GitHub Copilot and you also get repositories, Actions, Pages, agents and MCP servers. If your developers only need a coding assistant in the IDE, everything else should be off. Here's how we did it for a large financial organization.

We recently worked with a large Israeli financial organization that wanted to give its developers GitHub Copilot. Its code stays in its existing source control, and GitHub Enterprise is used only to license and govern Copilot. We've already published the full customer story. This post collects the actual settings, layer by layer, so you can check them in your own environment.

Why turning on Copilot and trusting the defaults isn't enough

Copilot Business and Copilot Enterprise are managed through a GitHub Enterprise account, and that account comes with the whole platform: repository creation, forks, GitHub Pages and Actions. Copilot itself also does more than code completion: web search, agents, MCP servers and Spaces. Each of these is one more way for code or data to leave the organization. If all you need is a coding assistant, everything you don't use should be off.

1. GitHub Enterprise: keep only what you need

2. Copilot itself: models and features

3. Identity: organization accounts only

4. The IDE: settings developers can't override

GitHub settings don't help if a developer signs in to the IDE with a personal account, or installs an extension that works around them. So:

5. Network and DLP: the layer most people forget

No GitHub setting knows what a developer pastes into a prompt. An API key, a password or a piece of a config file can leave inside an ordinary question.

6. Monitoring: know when something changes

Settings drift. Send GitHub audit logs (including the repo, copilot, personal_access_token and enterprise categories) and Entra ID sign-in logs to your SIEM, such as Microsoft Sentinel. Also watch changes to the groups that grant GitHub access and to the Enterprise Owner group. Any activity by the break-glass account should trigger a review.

Finally, training: even with everything locked down, developers need to know how to check what Copilot suggests, and not to paste anything into a prompt they wouldn't email outside the company. We do all of this in our Copilot security service, as part of our Microsoft 365 security projects.

Does GitHub use our code to train models?

According to GitHub, with Copilot Business and Copilot Enterprise your code and prompts aren't used to train the models.

Can we use Copilot without hosting code on GitHub?

Yes. That's the setup in this project: GitHub Enterprise handles licensing and governance, and the code stays in the existing source control.

Which Microsoft licences do we need?

Entra ID P1 for Conditional Access, Entra ID P2 for risk-based blocking and PIM, and Intune to manage the IDE.

Want to give developers Copilot without opening up the organization? We'll go through the settings with you.

Talk to us

Sources