概要

AI coding tools do not violate HIPAA by themselves; sending ePHI to a vendor with no BAA does. Rules for teams building healthcare software for US clients.

AI coding tools HIPAA compliance is a question about data, not tools: Cursor, GitHub Copilot or ChatGPT do not put you in violation just by being used. The risk starts when electronic protected health information (ePHI) reaches a vendor's servers and that vendor has not signed a Business Associate Agreement (BAA) with you. If prompts, indexed files and logs contain no ePHI, using AI to write code for a healthcare product creates no HIPAA obligation.

This is for engineering leads at software companies, including offshore teams, building or supporting healthcare products for US covered entities.

When does an AI coding tool become a HIPAA issue?

An AI tool becomes a HIPAA issue when it creates, receives, maintains or transmits ePHI on your behalf. That is the definition of a business associate in 45 CFR §160.103: a vendor doing any of those four things with your PHI needs a BAA before the data is sent. In engineering teams, ePHI usually reaches AI tools in three ways:

  1. Real records pasted into a prompt. For example, a production JSON record with patient ID, name, date of birth and lab results pasted in to debug a parser.
  2. A codebase indexed with PHI in it. Cursor and Copilot send context from workspace files. Seed data, fixtures or test files containing real patient data can be sent to the vendor.
  3. Production logs or exports opened locally. Logs pulled to a developer laptop to investigate an incident often contain identifiers and clinical data.

In every case the risk comes from the data you supply, not from the AI writing code.

Does the vendor sign a BAA for the plan you use?

There is no single answer to "does Cursor, Copilot or ChatGPT have a BAA", because whether a BAA is available depends on the vendor, the product, the plan and your contract, and it changes over time. Before any AI tool touches an environment with ePHI, check the vendor's current compliance page, ask in writing, and keep the answer.

ToolQuestion to ask the vendorSafe default until a BAA is signed
CursorDo you sign a BAA for our plan, and which privacy mode applies?Use with code and synthetic data only; do not index folders with real data
GitHub CopilotDoes GitHub sign a BAA covering Copilot on our plan?Keep ePHI out of prompts and out of files sent as context
ChatGPT and the OpenAI APIDo you sign a BAA for the product and plan we use (ChatGPT and the API are separate)?Never paste ePHI into ChatGPT; with the API, send ePHI only once a BAA is signed
Other AI tools (IDE plugins, agents, internal chatbots)Where is data stored, for how long, is it used for training, and is a BAA available?Treat as no BAA until you have it in writing

A common mistake: one company's BAA does not cover every product carrying its brand. Microsoft's HIPAA page lists the specific services in scope of its BAA, such as Azure, Office 365, Microsoft Copilot and Dynamics 365, and GitHub is not on that list (Microsoft Learn, HIPAA/HITECH). Do not assume a Microsoft 365 BAA covers Copilot in your IDE; ask GitHub directly.

What can the team do once a BAA is signed?

A BAA moves part of the obligation to the vendor; configuration and use remain your responsibility. Microsoft states plainly that having a BAA does not by itself make an organization HIPAA compliant. For AI tools that means:

  • Use only the product, plan and organization account the BAA covers, never personal accounts.
  • Apply the minimum necessary standard: send only the data the task needs.
  • Add the vendor to your list of vendors processing ePHI, with the BAA's signing and expiry dates.
  • Update the risk analysis (45 CFR §164.308(a)(1)) when a new tool enters the data flow.

What rules should an engineering team adopt?

The safest rule is that real data never enters a tool not approved for ePHI. In practice:

  1. Use synthetic data with the production schema; libraries such as Faker or Mimesis cover most needs.
  2. Remove real patient data from repositories, fixtures and seeds, and exclude data folders from the AI tool's context.
  3. Do not pull production logs to developer machines; if you must, mask identifiers first.
  4. Write the AI-tool rules into your security policy and cover them in security awareness training (45 CFR §164.308(a)(5)).
  5. Keep vendors' BAA answers with the vendor record as evidence of due diligence.

If data was already sent, it may be an impermissible disclosure. Under 45 CFR §164.402 it is presumed to be a breach unless a four-factor risk assessment shows a low probability that the PHI was compromised, so report it to your security official immediately instead of handling it alone. The full set of safeguards is in the HIPAA compliance checklist for software companies.

How pTrackly helps

pTrackly does not inspect prompts or block data sent to AI tools; that belongs to tool configuration and your team's process. What it keeps is the record: in the Vendors module you mark a vendor as a HIPAA business associate, record its BAA status (no BAA, draft, signed, expired) and dates, and get reminded before a BAA expires. Security awareness training records completion as evidence, and an AI-tool usage policy can be drafted, approved and acknowledged by staff in Documents. Deciding which tools may touch ePHI stays with your team.

Related reading: HIPAA technical safeguards for developers, HIPAA BAAs for offshore vendors and pTrackly for HIPAA.

Frequently asked questions

Does using Cursor or Copilot to build a healthcare app violate HIPAA?

No, as long as prompts and the files sent as context contain no ePHI. HIPAA governs identifiable health data; it does not ban coding tools.

Can we use a paid personal ChatGPT plan with patient data?

Not until you have a written BAA for that exact product and plan. Paying does not create a BAA; check OpenAI's current compliance page.

If we have a BAA with Microsoft, is GitHub Copilot covered?

You cannot assume so. GitHub is not on the list of services in scope of Microsoft's BAA, so confirm directly with GitHub.

What should we do if someone pasted patient data into an AI tool?

Report it to your security official at once so they can run the risk assessment under 45 CFR §164.402. Unless a low probability of compromise can be shown, it is treated as a breach and must be notified as required.


Sources: 45 CFR §160.103 (business associate definition) · 45 CFR §164.402 (breach definition) · Microsoft Learn: HIPAA/HITECH · HHS: Business Associates

pTrackly の HIPAA 対応を見る
タグ:
HIPAAAI coding toolsGitHub CopilotCursorbusiness associate