Audit applications and infrastructure handling Protected Health Information against HIPAA — Security Rule (administrative, physical, technical safeguards), Privacy Rule, Breach Notification Rule, plus HITECH. Covers ePHI scoping, the 18 HIPAA identifiers, Business Associate Agreement (BAA) chain-of-liability, minimum-necessary standard, and breach notification timing. Use when the user mentions 'HIPAA,' 'HIPAA Security Rule,' 'HIPAA Privacy Rule,' 'PHI,' 'ePHI,' 'protected health information,' 'BAA,' 'business associate agreement,' 'covered entity,' 'business associate,' 'minimum necessary,' 'HIPAA breach,' 'HITECH,' 'healthcare compliance,' 'medical data,' 'patient data,' or audits any system that creates, receives, maintains, or transmits PHI.
94%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
HIPAA governs how Protected Health Information (PHI) is handled in the United States healthcare ecosystem. The engineering surface area is large because PHI is broader than people often realize: a calendar entry naming a patient's appointment is PHI; an IP address logged on a portal accessed by a patient may be PHI in combination with a health condition.
The skill is structured around the four HIPAA rules with emphasis on the Security Rule's three safeguard categories (Administrative / Physical / Technical) — that's where engineering work happens. Privacy Rule, Breach Notification Rule, and HITECH layer on top.
Final compliance determinations stay with counsel and your privacy officer; this skill is the technical engineering layer.
Cross-references: privacy-engineering for the GDPR / CCPA-shaped privacy work that often overlaps; iam-audit for access control and authentication; crypto-audit for encryption-at-rest and in-transit detail; secrets-audit for key management; siem-detection for audit-log engineering; incident-triage and security-comms for breach response; control-audit for program-level control readiness (SOC 2 / ISO 27001) over the same systems.
Audit only systems and code that the user's organization (a covered entity or business associate) owns, or that it has engaged the user to review. Never read, export or paste real PHI into the transcript: trace where it flows and how it's protected from schemas, configs and synthetic records. If you come across real PHI, record the location without copying it. Compliance and breach-notification conclusions go to the privacy officer and counsel.
If a system handles PHI for a CE without a BAA, that's a violation regardless of how secure the handling is.
PHI = individually identifiable health information held or transmitted by a CE or BA. ePHI = the electronic form.
The 18 HIPAA identifiers (Safe Harbor de-identification list — if all are stripped, data is no longer PHI):
Important: removing the 18 identifiers via Safe Harbor is one of two de-identification methods. The other is Expert Determination (statistical analysis confirming low re-identification risk). De-identified data is not PHI; pseudonymized data is still PHI (because the key linking the surrogate back to the individual is still held somewhere).
The most common scope reductions:
These are policy and program controls. Engineering teams contribute artifacts; the privacy officer owns the program.
incident-triageEngineering audit input: evidence packages for risk analysis (asset inventory, threat model, controls list), workforce-security records (access reviews, joiner/mover/leaver evidence), training completion records.
For modern SaaS, most physical safeguards are inherited from the cloud provider's compliance posture (covered by the cloud's BAA). Verify:
Engineering audit input: confirm cloud provider's BAA covers the relevant physical-safeguard obligations; confirm workstation disk encryption and remote-wipe for any employee laptop touching ePHI.
This is where this skill spends its time.
Audit grep patterns:
SELECT.*patient, SELECT.*encounter from non-individual accountsIn practice: every read, every write, every access decision involving ePHI logged. Logs preserved for at least 6 years (HIPAA's general document-retention period). See siem-detection for the engineering implementation.
See iam-audit for implementation.
See crypto-audit.
The Privacy Rule sets the rules for how PHI is used and disclosed. The Security Rule says "protect it"; the Privacy Rule says "you can only use it for these specific purposes."
Engineering-relevant slices:
SELECT * from patient tables), API contracts that return only the fields the caller needsAudit grep patterns:
SELECT \*.*patient, SELECT \*.*encounter, SELECT \*.*observation — almost always a minimum-necessary violationA breach is the unauthorized acquisition, access, use, or disclosure of unsecured PHI that compromises the security or privacy of the PHI. "Unsecured" = not encrypted per HHS guidance (encryption is the safe harbor).
Notification timing:
| Recipient | Timing |
|---|---|
| Affected individuals | Without unreasonable delay, no later than 60 calendar days after discovery |
| Department of Health and Human Services (HHS / OCR) | Within 60 days of discovery for breaches affecting ≥ 500 individuals; annually for breaches < 500 |
| Media | Same 60-day window for breaches affecting > 500 in a state or jurisdiction |
| Business associate to covered entity | Without unreasonable delay, no later than 60 days |
A "breach" includes the unauthorized access — not just exfiltration. If a workforce member views a record they had no need to view, that is a breach (unless one of the limited exceptions applies).
Engineering hook: ability to scope a breach quickly. Audit logs (Security Rule §164.312(b)) are the source of truth. Time-to-scope directly impacts the 60-day clock.
Safe harbor: if the PHI was encrypted per HHS-recognized standards (and the key wasn't also compromised), the unauthorized acquisition may not be a breach. This is the strongest reason to encrypt ePHI at rest comprehensively.
See incident-triage (response), security-comms (notification draft — legal review required), breach-patterns (post-incident pattern extraction).
HITECH (2009) strengthened HIPAA in several ways relevant here:
For modern engineering work, HITECH means: a BA that handles ePHI is subject to most of the Security Rule directly. Vendors cannot hide behind the CE.
SELECT * on PHI tables — minimum-necessary violation; API serializers returning all fields when callers need fewClose every candidate with one verdict, as defined in references/findings-format.md, and run the refutation pass in references/verification.md before anything is confirmed.
A gap against a required implementation specification is a finding. The spec is the intended control. Rate severity by the exposure it creates for ePHI, using references/severity-calibration.md, not by the audit or penalty consequence: PHI sent to a vendor with no BAA is a real disclosure; a missing sanction policy is not, by itself, an exposure. A gap with no exposure (no named Security Official, no documented risk analysis, overdue training records) is a documentation gap: list it in the report's own section, with no severity and no findings.json record. A missing risk analysis is the gap OCR cites most often, so list it first. Defense-in-depth gaps where another layer already stops the exposure are hardening notes.
Addressable specifications. An addressable spec (automatic logoff, encryption at rest, transmission encryption, integrity controls, ...) must be implemented, or the entity documents why it isn't reasonable and appropriate and what it does instead (§164.306(d)(3)). If it isn't implemented but that documented equivalent or risk-based rationale exists, the candidate is rejected, with ruled_out_by.location pointing at that document. If neither the control nor the document exists, treat it like a required spec: a finding when there's exposure, a documentation gap when there isn't. Record the spec's status with ext.addressable.
What each verdict looks like here:
confirmed: the code or the exported config shows ePHI reaching someone or somewhere the rule doesn't allow, or a required control missing on a path to ePHI.
patients ad hoc through one shared phi_admin database role (unique user identification, §164.312(a)(2)(i), required). Evidence: the role export and the runbook that hands out the password.analytics.track("appointment_booked", { email, diagnosis }) sends PHI to Mixpanel, and the BAA register in the evidence folder has no Mixpanel entry (§164.502(e), §164.308(b)(1)).GET /api/patients/:id returns the full record, SSN and diagnoses included, to a scheduling view that renders name and time (minimum necessary, §164.502(b)).PHI_AUDIT_LOG=false unless overridden, is confirmed with a system_configuration condition ("deployments that don't set PHI_AUDIT_LOG=true") and confidence medium. A deployment fact you can't see lowers confidence, not the verdict or severity.needs_validation: the code supports the claim and one fact lives outside it. Name it and give the owner the check.
/api/patients, and nobody has provided the BAA register. Blocker: whether a signed BAA with Sentry covers this project. Check: the privacy officer confirms the BAA and its effective date; save a redacted register entry to the evidence folder.aws rds describe-db-instances --query 'DBInstances[].[DBInstanceIdentifier,StorageEncrypted,KmsKeyId]' --output text, saved to the evidence folder.rejected: a named control or document at a named location rules it out.
ruled_out_by.location points at that section of the risk analysis.beforeSend in src/lib/sentry.ts deletes event.request.data and event.user on every event before it leaves the process. ruled_out_by.location points at that line.ruled_out_by.location points at the lockfile or manifest line that pins the version, and control names the library function and version.ruled_out_by.location at the evidence: the only import or call site, or the dependency declaration if nothing uses it.Pseudonymized data is still PHI, so a pseudonym never rejects a candidate on its own. A rejected addressable-spec record doesn't change the breach consequence: unencrypted ePHI is still "unsecured" for the Breach Notification Rule. Say so under Breach response readiness.
Evidence for deployed resources and documents. Many HIPAA findings are about things that aren't source files: database and bucket encryption settings, IdP and MFA policies, log retention, the BAA register, the risk analysis, policies and procedures. Save the read-only command output or the export, redacted, to <audit dir>/evidence/<name>.json or .txt (for example audit/hipaa/evidence/rds-encryption.txt, audit/hipaa/evidence/baa-register.json) and point location and evidence[] at that file and the relevant line. A risk analysis or policy that already lives in the repo can be cited where it is. Never save PHI or a credential value in evidence, findings.json or the report; record where it lives and which identifier classes it contains. Live checks only when authorized and read-only; a check described but not run is needs_validation.
Fingerprints are hipaa-audit/<class>/<file or resource>/<symbol or name>, slash-separated, with no line numbers. The validator rejects :<digits> segments, so write ARNs and host:port with slashes. Use a short class such as phi-to-non-baa-vendor, shared-account, min-necessary, encryption-at-rest, transmission-security, audit-log-gap, no-auto-logoff, mfa-gap, phi-in-logs, phi-in-lower-env, baa-chain-break:
hipaa-audit/phi-to-non-baa-vendor/src/lib/analytics.ts/mixpanel
hipaa-audit/min-necessary/src/serializers/patient.ts/PatientSerializer
hipaa-audit/shared-account/postgres/patients-prod/phi_admin
hipaa-audit/encryption-at-rest/aws/123456789012/us-east-1/rds/patients-prodFor a deployed resource, build the fingerprint from the resource (provider, account or database, name), not from the evidence file name, so it stays the same when the evidence is re-captured.
ext fields (optional object on any record; don't repeat anything that already has a field, such as cwe or location):
| Key | Value | Example |
|---|---|---|
standard | The 45 CFR section or implementation specification | "164.312(b)", "164.312(a)(2)(iv)", "164.502(b)" |
addressable | true for an addressable spec, false for a required one; omit for Privacy and Breach Notification Rule records | true |
rule | Which HIPAA rule the record falls under | "security", "privacy", "breach-notification" |
Then:
findings.json sorted by fingerprint, with skill: "hipaa-audit". Validate it and fix every error: node references/validate-findings.mjs findings.json (references/validate-findings.mjs).node references/to-sarif.mjs findings.json -o findings.sarif (references/to-sarif.mjs).notes.md). They are not records.Dispositions (set later, usually by finding-triage): Fixed / Deferred / Accepted Risk / Mitigated (platform/config) / Requires major migration. HIPAA accepted risk is highly disfavored: most "accepted risks" should be documented as residual risk in the risk analysis, with compensating controls and re-evaluation triggers. A false positive is a rejected record, not a disposition.
Write findings.json first. Render the report from it; the prose never changes a verdict, severity or blocker the JSON doesn't already say.
# HIPAA Technical Readiness Review
## Entity: [name] ## Entity type: Covered Entity / Business Associate / Subcontractor
## Date: [date] ## Reviewer: [name] ## Scope: [full | partial, what was left out]
## findings.json: [path], validated: [yes] ## Evidence folder: [path]
### Summary
- Confirmed: [N] (Critical [n] | High [n] | Medium [n] | Low [n]) Needs validation: [N] Rejected: [N]
- Documentation gaps: [N] Hardening notes: [N]
### Confirmed findings
#### [SEVERITY] [Title] `fingerprint`
**Standard:** [ext.standard] ([required | addressable]) **Rule:** [ext.rule]
**Location:** `path:line` (source or evidence file) **Confidence:** [medium | high (reproduced)]
**What and why it matters:** [the trace or the config evidence, in a few lines; the ePHI exposed and to whom]
**Fix:** [concrete change]
**Verify the fix:** [the check that proves it]
### Needs validation
| Finding | Standard | Blocker | Check for the owner to run |
|---|---|---|---|
### Hardening notes (not findings)
- [gap] — [why it isn't a finding] — [effort]
### Documentation gaps (not findings)
| Standard | What's missing | Owner | Evidence expected |
|---|---|---|---|
### Rejected (do not re-raise)
| Fingerprint | Ruled out by | Location |
|---|---|---|
### Scope
- [ ] ePHI inventory complete (every data store containing PHI)
- [ ] Data flow diagrams for PHI transmission paths
- [ ] BAA in place with every BA (and BA's subcontractors where required)
- [ ] Cloud provider BAA on file (AWS / GCP / Azure / etc.)
- [ ] Risk analysis (§164.308(a)(1)(ii)(A)) current
### PHI flow map
| Store or flow | Identifier classes | Vendor / BAA | Encrypted at rest | Encrypted in transit | Records |
|---|---|---|---|---|---|
### Administrative safeguards
| Subsection | Confirmed | Needs validation | Documentation gaps |
|------------|-----------|------------------|--------------------|
| Security Management Process | | | |
| Assigned Security Responsibility | | | |
| Workforce Security | | | |
| Information Access Management | | | |
| Security Awareness and Training | | | |
| Security Incident Procedures | | | |
| Contingency Plan | | | |
| Evaluation | | | |
| BA Contracts | | | |
### Technical safeguards
| Subsection | Confirmed | Needs validation | Documentation gaps |
|------------|-----------|------------------|--------------------|
| Access Control — unique IDs | | | |
| Access Control — emergency access | | | |
| Access Control — automatic logoff | | | |
| Access Control — encryption at rest | | | |
| Audit Controls | | | |
| Integrity | | | |
| Person / Entity Authentication (MFA) | | | |
| Transmission Security (encryption in transit) | | | |
### Addressable specifications
| Spec | Implemented? | Equivalent or rationale (document, location) | Record |
|---|---|---|---|
### Privacy Rule
- [ ] Minimum necessary applied in code (no SELECT * on PHI tables)
- [ ] Notice of Privacy Practices published and presented
- [ ] Individual access path implemented (30-day delivery)
- [ ] Amendment / accounting of disclosures process exists
### Breach response readiness
- [ ] Audit logs sufficient to scope a breach within the 60-day clock
- [ ] Incident-response procedures tested
- [ ] Notification templates drafted (see security-comms)
- [ ] Encryption-as-safe-harbor verified across ePHI stores (list stores that are unsecured, including any covered by a rejected addressable-spec record)
### Prioritized remediation plan
1. [highest first: PHI to non-BAA vendors, unencrypted ePHI reachable from outside, shared accounts]The safeguard tables count records from findings.json (by ext.standard) and entries from the documentation-gap list. They are not a separate judgement.
security-comms and counselhhs.gov/hipaa (regulatory text, FAQs, OCR resolution agreements)references/ at build time): references/findings-format.md, references/verification.md, references/severity-calibration.md, references/findings.schema.jsonbriiirussell/cybersecurity-skills
c79bb8b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.