Is GitHub Copilot HIPAA Compliant? A 2026 Guide for Healthcare Developers
Sonomos Research
The Sonomos research team writes about AI privacy, data protection, and how to use generative AI safely at work.
Short answer: GitHub Copilot is not HIPAA compliant by default on any tier. As of 2026, GitHub does not offer a Business Associate Agreement (BAA) for Copilot as a standalone product. GitHub Enterprise Cloud includes a HIPAA BAA through the Microsoft Health Data Services agreement, but only when configured correctly and combined with Copilot for Business or Copilot Enterprise — and even then, the compliance posture depends on what code the developer feeds the model. This guide explains what HIPAA actually requires of an AI coding assistant, which GitHub products are closest to BAA-eligible, and how healthcare engineering teams can use AI code assistance without putting protected health information (PHI) into a non-covered model.
What HIPAA requires of an AI tool used in healthcare software development
HIPAA regulates covered entities (hospitals, clinics, health plans, clearinghouses) and their business associates (vendors that create, receive, maintain, or transmit PHI on the covered entity's behalf). A software developer writing code that touches a healthcare system is often a business associate. When that developer pastes a patient record, a medical schema, or a sample API response containing real PHI into an AI coding assistant, two things happen simultaneously:
- The PHI leaves the developer's device and travels to the AI provider's infrastructure.
- The developer (and the covered entity they work for) may have just made an unauthorized disclosure.
HIPAA requires a signed Business Associate Agreement (BAA) before any business associate can receive PHI. The BAA commits the vendor to specific safeguards: limiting PHI use, reporting breaches, and supporting the covered entity's obligations. Without a BAA, even a single prompt containing real patient data can constitute a reportable HIPAA breach.
The catch with coding assistants. Developers often argue that they are not actually sharing PHI — they are pasting code structure, schemas, or test data. The distinction breaks down quickly:
- A SQL query that references a real patient ID is PHI if it could identify the patient.
- A sample API response with a real name, DOB, and diagnosis is PHI.
- A code comment like "patient_id = 12345 (John Doe, DOB 1985-03-12)" is PHI.
Real-world code reviews routinely surface PHI embedded in tests, fixtures, seed files, and log snippets. The safer assumption is that any prompt from a healthcare codebase should be treated as potentially PHI-containing.
GitHub Copilot tiers and their HIPAA posture
GitHub Copilot Free / Individual
No enterprise contract, no BAA, no DPA alignment with HIPAA. Prompts (called "suggestions context" in GitHub's documentation) are transmitted to GitHub's servers to generate completions. Training opt-out is available but does not change the fundamental BAA-ineligibility.
Verdict: Not suitable for workflows involving PHI.
GitHub Copilot Business
Copilot Business adds organizational management, policy enforcement, and a commitment that GitHub will not use prompts for training by default. It also includes a Data Protection Agreement (DPA). However, as of 2026, the GitHub Copilot Business DPA does not include HIPAA BAA terms for Copilot specifically.
Verdict: Significantly better than Individual from a privacy standpoint, but not BAA-covered for Copilot. Not suitable for PHI workflows without additional legal review.
GitHub Copilot Enterprise (on GitHub Enterprise Cloud)
GitHub Enterprise Cloud includes Microsoft's standard enterprise BAA through the Microsoft Customer Agreement / Microsoft Online Services Terms. The BAA covers specific Microsoft services listed in the Microsoft HIPAA Implementation Guide. Whether Copilot features are explicitly covered under that BAA has been a point of ambiguity — organizations should confirm with their Microsoft/GitHub account team that the specific Copilot features they intend to use are within the BAA scope.
Even if covered, the BAA is necessary but not sufficient. The organization still needs to:
- Ensure Copilot Business or Enterprise is the tier in use (not individual seats).
- Configure organization-level policies to disable public code suggestions and limit context sharing.
- Train developers not to paste real PHI into prompts.
- Log and audit AI-assisted development workflows.
Verdict: The closest GitHub Copilot gets to HIPAA-eligible, but requires legal confirmation that the specific Copilot features are within the BAA scope, plus organizational controls on top.
Alternative: Azure OpenAI Service for custom coding assistants
Some healthcare engineering teams build their own code-assistance tooling on top of Azure OpenAI Service, which is explicitly covered by Microsoft's Healthcare HIPAA BAA when configured correctly. This approach gives organizations more control but requires significantly more engineering investment.
What "not sending PHI" actually means in practice
The safest approach for healthcare developers is to never send real PHI into any AI coding assistant, regardless of tier. In practice that means:
Synthetic test data. Replace all real patient values in test fixtures, seed files, and sample API responses with generated but realistic data (fake names, plausible-but-nonexistent MRNs, fabricated DOBs). Libraries like Faker can generate synthetic FHIR resources.
Schema without values. When asking Copilot to help with a database migration or API schema, paste the table structure or schema definition — not a row export from production.
Code structure, not code in context. "Help me write a FHIR R4 MedicationRequest resource parser" works without any patient data. "Debug why this parser fails on this record [pastes real patient data]" sends PHI.
Use Copilot Chat for architecture, not debugging. Architectural and algorithmic questions rarely need real data. Debugging questions are the most likely to involve copy-pasted production content.
Local redaction at the keyboard. A browser-level or IDE-level tool that detects PHI patterns — MRNs, DOBs, names combined with medical terms — before a prompt is submitted is the technical backstop when habit slips. This is particularly valuable in environments where developers paste from log files or Postman collections.
Settings to configure for healthcare development teams
If your organization uses GitHub Copilot Business or Enterprise:
-
Disable suggestions matching public code. Settings → Policies → Suggestions matching public code → Blocked. Reduces the risk of Copilot suggesting code that matches open-source repositories containing real-world PHI samples (rare but documented).
-
Disable "Allow GitHub to use my code snippets for product improvements." This is the training-opt-out for your organization. In Business/Enterprise, prompts are excluded from training by default; verify this in your admin console.
-
Restrict which extensions can use Copilot APIs. In VS Code and JetBrains, Copilot Chat can be invoked by third-party extensions. Limit this surface area.
-
Enable audit logging. GitHub Enterprise includes audit log streaming. Configure it so that your security team can review AI-assisted activity if a PHI exposure is suspected.
-
Write a Copilot-specific acceptable-use addendum. Your existing acceptable-use policy probably does not address AI coding assistants specifically. Add: prohibited uses (pasting real PHI), required practices (synthetic test data), and incident-response steps if a developer believes they pasted real data.
How GitHub Copilot compares to alternatives for healthcare developers
| Tool | BAA available? | Training opt-out | PHI-safe configuration possible? | | --- | --- | --- | --- | | GitHub Copilot Free/Individual | No | Yes (individual opt-out) | No | | GitHub Copilot Business | No (DPA only) | Yes (org-level) | No (without BAA) | | GitHub Copilot Enterprise (GHEC) | Potentially (confirm scope) | Yes (org-level) | Possibly with controls | | Amazon CodeWhisperer (Q Developer) | Requires AWS BAA | Yes | Yes (with AWS BAA) | | Azure OpenAI Service (custom) | Yes | Yes | Yes (requires setup) | | Local/on-device models (Ollama, etc.) | N/A | N/A | Yes (no data leaves device) |
For teams that cannot confirm a BAA or cannot fully control what developers paste, the practical answer is often to combine whatever AI coding assistant the team uses with a local-first redaction tool that masks PHI before it leaves the developer's machine — reducing the risk without blocking the workflow.
Frequently asked questions
Does GitHub have a HIPAA BAA for Copilot?
As of 2026, GitHub does not offer a standalone HIPAA BAA for GitHub Copilot. GitHub Enterprise Cloud customers may have HIPAA coverage through Microsoft's enterprise healthcare BAA, but whether it explicitly covers Copilot's AI features requires confirmation with your Microsoft/GitHub account team. GitHub Copilot Business and Individual accounts are not covered by a HIPAA BAA.
Can I use GitHub Copilot to write HIPAA-compliant code?
Yes — writing code that complies with HIPAA regulations is entirely different from using a HIPAA-covered tool. Copilot can help you write code that implements encryption, access controls, audit logging, and other HIPAA security controls. The HIPAA issue arises only if you paste real PHI (actual patient data) into the prompt. Copilot writing code that handles PHI is fine; Copilot receiving PHI as prompt input is not.
What is the difference between a DPA and a HIPAA BAA?
A Data Protection Agreement (DPA) is a general-purpose contract for GDPR-style data processor relationships. A Business Associate Agreement (BAA) is a HIPAA-specific contract with particular language required by 45 CFR § 164.308(b). GitHub Copilot Business includes a DPA; it does not include a HIPAA BAA for Copilot specifically. The existence of a DPA does not satisfy HIPAA's BAA requirement.
Is it safe to use Copilot to debug healthcare APIs?
It depends on what you paste. If you paste an API request/response that contains real patient data (names, DOBs, MRNs, diagnoses), that data is transmitted to GitHub's servers. If you paste a synthetic or anonymized example, there is no PHI in scope. The practice of "paste your real API response into Copilot Chat to debug it" is the single most common source of accidental PHI exposure in healthcare engineering teams.
What about GitHub's "content exclusions" feature?
GitHub Copilot's content exclusions feature lets admins specify files or paths that Copilot will not use as context. This is useful for keeping secrets and proprietary algorithms out of AI context, but it operates at the file path level — it cannot detect and exclude PHI within files. A file containing synthetic test data is fine even without exclusion; a log file containing real patient data should be excluded, but the exclusion needs to be configured before the developer opens the file in a Copilot-enabled IDE.
Should we use an on-device coding assistant instead?
For teams with strict PHI containment requirements and a technical staff capable of deploying local models, on-device AI coding assistants (using Ollama, LM Studio, or similar) eliminate the data-transit risk entirely. The trade-off is that local models are generally less capable than hosted models for complex code generation, and require infrastructure investment. Most healthcare engineering teams use a tiered approach: local models for sensitive contexts, GitHub Copilot for generic code.
A checklist for healthcare engineering teams
- Confirm whether your GitHub Enterprise agreement includes Copilot in its HIPAA BAA scope.
- Switch all developers to Copilot Business or Enterprise; revoke individual seats.
- Enable organization-level training exclusion in the admin console.
- Write a Copilot-specific addendum to your acceptable-use policy.
- Build synthetic test data generation into your CI/CD pipeline to reduce reliance on production data.
- Configure content exclusions for paths known to contain sensitive data.
- Deploy a local-first redaction tool for developer workstations that flags PHI before submission.
- Add "pasted PHI into AI coding assistant" to your incident-response runbook.
- Conduct an annual review of Copilot's HIPAA documentation as Microsoft/GitHub's policies evolve.
The bottom line
GitHub Copilot is a powerful tool for healthcare software developers, but it is not HIPAA compliant out of the box on any currently available tier. The path to an acceptable risk posture runs through GitHub Enterprise Cloud (to get closest to BAA coverage), organizational configuration, developer training, and — most importantly — a culture where synthetic data replaces real PHI in development workflows. The developers most at risk are not the ones who know about HIPAA; they are the ones debugging a production issue at 11pm who paste a log line without thinking. Technical controls that intercept PHI before it leaves the workstation are the backstop that makes the policy durable.
For the broader HIPAA picture across consumer AI tools, see Is ChatGPT HIPAA Compliant?. For teams evaluating Cursor as an alternative AI coding environment, see Is Cursor AI Safe for Sensitive Code?.
Related HIPAA guides
Protect your data while using AI
Sonomos detects and masks sensitive information before it reaches AI models. 100% local, zero data collection.
Install FreeRelated Articles
AI Meeting Notetakers: HIPAA, GDPR, and Privacy Compliance in 2026
Otter.ai litigation, Fireflies BIPA claims, Zoom BAA requirements, GDPR DPA gaps — AI notetakers create real compliance obligations that most organisations have not fully addressed. A practical guide to consent, HIPAA, GDPR, and the specific risks of AI transcription at scale.
EU AI Act Compliance Checklist for Enterprise Deployers (2026)
Prohibited AI practices are enforceable now. GPAI obligations live August 2025. High-risk Annex III requirements hit in August 2026. A practical deployer-focused checklist covering every phase — including employment screening, credit tools, and GDPR overlap.
Is Grok GDPR Compliant? A 2026 Guide for European Teams
Grok and xAI carry the highest GDPR regulatory risk of any major AI tool in 2026 — with active investigations by the Irish DPC, France's CNIL, and the UK ICO over training-data practices, no enterprise DPA, and no EU data residency. Here is what European organisations need to know.