An offboarded contractor still has access to the internal code‑assistant that powers rapid feature development. The AI tool, Cursor, continues to query patient‑record APIs and suggest code that reads protected health information (PHI). When the contractor’s credentials are revoked, the assistant’s service account remains active, leaving a silent channel that can exfiltrate PHI without any human review.
HIPAA expects exactly this kind of hidden channel to be closed. The regulation requires covered entities to enforce strict access controls, maintain immutable audit logs of every interaction with electronic PHI, and ensure that only the minimum necessary data is disclosed. Auditors look for evidence that shows who accessed PHI, when the access occurred, what actions were performed, and whether any data was altered or transmitted securely.
How hipaa defines the evidence you must collect
HIPAA’s Security Rule lists several technical safeguards that translate directly into observable data:
- Audit controls (164.312(b)): Systems must record successful and failed attempts to access PHI, including user identity and timestamps.
- Integrity controls (164.312(c)): You must protect logs from tampering so that the record of an access event cannot be altered.
- Transmission security (164.312(e)): You must protect any data moving over a network, and you must log the transmission.
- Minimum necessary (164.502): Access policies must limit the amount of PHI returned to the requester, and you must be able to detect any over‑exposure.
Most organizations satisfy the identity portion of these requirements by integrating Cursor with an OIDC provider such as Okta or Azure AD. The provider confirms who is making the request and whether the user has a role that permits access. However, identity alone does not produce the audit trail or enforce the minimum‑necessary principle. Once the request reaches the backend database or API, the system typically returns raw results, and you cannot record each query, mask PHI in the response, or require a human approval for risky operations.
Why a data‑path gateway is required
The missing piece is a control point that sits on the actual traffic between Cursor and the protected resource. This gateway must be able to:
- Capture every request and response, attaching the verified user identity from the OIDC token.
- Mask or redact PHI fields in real time, ensuring that only the data required for the developer’s task is visible.
- Require a just‑in‑time approval workflow for queries that could return large volumes of PHI.
- Record the full session for replay, giving auditors a complete view of what the AI assistant did on behalf of a user.
Without such a gateway, the organization cannot demonstrate compliance with the audit‑control and minimum‑necessary safeguards that HIPAA mandates.
hoop.dev provides the required enforcement point
hoop.dev is an open‑source Layer 7 gateway that proxies connections to databases, APIs, and other infrastructure. When Cursor connects through hoop.dev, the gateway becomes the sole data‑path for the session. hoop.dev then applies the following controls, each of which directly generates the evidence HIPAA auditors expect:
- Session recording: hoop.dev stores every command issued by Cursor and every response from the target, attaching the user’s identity and a timestamp.
- Inline data masking: hoop.dev applies policy rules that redact PHI fields such as patient names, SSNs, or medical record numbers before the data reaches the developer’s console.
- Just‑in‑time approval: hoop.dev triggers a workflow that requires a designated compliance officer to approve high‑risk queries before execution.
- Audit‑ready logs: hoop.dev emits structured logs that you can forward to a SIEM or retain in a write‑once store, satisfying integrity and retention requirements.
Because hoop.dev sits outside the target system, hoop.dev produces evidence that remains independent of any changes made inside the database or API. This separation satisfies HIPAA’s requirement that audit logs be protected from tampering.
Mapping hoop.dev capabilities to hipaa safeguards
| HIPAA safeguard | hoop.dev control |
| Audit controls (164.312(b)) | Session‑wide logs with user identity, timestamps, and command details. |
| Integrity controls (164.312(c)) | Logs are recorded with integrity checks that make unauthorized changes detectable. |
| Transmission security (164.312(e)) | All traffic passes through the gateway, where TLS termination and re‑encryption are enforced. |
| Minimum necessary (164.502) | Real‑time masking of PHI fields and approval workflows for bulk data pulls. |
By deploying hoop.dev in front of the services that Cursor accesses, you can generate the audit evidence required for HIPAA compliance without having to modify each backend system.
Getting started with hoop.dev and Cursor
Deploy the gateway using the official getting‑started guide. The quick‑start runs a Docker Compose stack that includes the gateway and a network‑resident agent. Register the target API or database as a connection, configure OIDC authentication, and enable the masking and approval policies that match your PHI protection rules. Once the gateway runs, point Cursor’s endpoint configuration to the hoop.dev address. The AI assistant continues to function as before, but every request now passes through the compliance‑enforcing data path.
For deeper details on policy definition, session replay, and log export, explore the learn section of the documentation.
FAQ
- Does hoop.dev replace my existing IAM system? No. hoop.dev relies on your OIDC provider to authenticate users. It adds a layer of enforcement on the traffic after authentication.
- How does hoop.dev mask PHI without breaking application logic? hoop.dev applies masking rules to response fields identified as containing PHI. The original data remains unchanged in the backend; only the view presented to the developer is redacted.
- Can I retain logs for the HIPAA‑required six‑year period? Yes. You configure hoop.dev’s logging to forward logs to a long‑term storage solution you choose, supporting the required retention.
Implementing these controls lets you demonstrate to auditors that every access to electronic PHI is tracked, reviewed, and limited to the minimum necessary. For the full source code and contribution guidelines, visit the GitHub repository.