1. HIPAA Compliance Checklist
VitalNexa handles Protected Health Information (PHI) and is designed to comply with the HIPAA Privacy Rule and Security Rule. The following checklist tracks implementation status of required safeguards.
1.1 Administrative Safeguards
| Requirement |
Implementation |
Status |
| Security Management Process |
Risk analysis conducted; security policies documented; this security plan maintained |
Complete |
| Assigned Security Responsibility |
Security lead designated; responsibilities documented in team charter |
Complete |
| Workforce Security |
Role-based access; principle of least privilege; background checks for team members with PHI access |
Complete |
| Security Awareness Training |
Annual HIPAA training for all team members; phishing simulation exercises |
Complete |
| Contingency Plan |
Data backup procedures, disaster recovery plan, emergency mode operation plan |
In Progress |
1.2 Technical Safeguards
| Requirement |
Implementation |
Status |
| Access Controls |
JWT authentication with bcrypt password hashing; RBAC for user vs admin roles; session timeout after inactivity |
Complete |
| Audit Controls |
HIPAA middleware logs every API request with user_id, action, timestamp, IP, status code, response time |
Complete |
| Integrity Controls |
AES-256-GCM authenticated encryption prevents tampering; database constraints enforce data validity |
Complete |
| Transmission Security |
TLS 1.3 enforced for all connections; HSTS header with 1-year max-age; certificate pinning in mobile |
Complete |
| Encryption at Rest |
AES-256-GCM field-level encryption for all PII; database volume encryption; encrypted backups |
Complete |
1.3 Physical Safeguards
| Requirement |
Implementation |
Status |
| Facility Access Controls |
Cloud-hosted infrastructure (no physical servers); cloud provider SOC 2 Type II certified |
Complete |
| Workstation Security |
Full-disk encryption required; screen lock after 5 minutes; VPN for database access |
Complete |
| Device and Media Controls |
No PHI on portable devices; encrypted backups only; secure disposal procedures |
Complete |
2. Encryption Architecture
2.1 Field-Level Encryption (AES-256-GCM)
All PII fields are encrypted at the application layer before being written to PostgreSQL. This provides defense-in-depth beyond database-level encryption, ensuring that a database compromise alone does not expose sensitive data.
- Algorithm: AES-256-GCM (Galois/Counter Mode) providing both confidentiality and authenticity
- Key Length: 256-bit encryption keys derived from a master key using HKDF
- IV/Nonce: 96-bit random nonce generated per encryption operation (never reused)
- Authentication Tag: 128-bit GCM tag appended to ciphertext to detect tampering
- Encrypted Fields: Full name, date of birth, email address, health record content, uploaded file content
2.2 Key Management
| Aspect |
Implementation |
| Key Storage |
Master key stored in environment variable, never committed to source control. Production uses cloud KMS. |
| Key Versioning |
Each encryption stores the key version alongside ciphertext. Format: v{version}:{iv}:{ciphertext}:{tag} |
| Key Rotation |
New key version generated quarterly. Old keys retained for decryption. Background job re-encrypts records to latest version. |
| Key Derivation |
Per-field keys derived from master key using HKDF-SHA256 with field-specific context strings. |
| Emergency Revocation |
Procedure to revoke a compromised key version and trigger immediate re-encryption of all affected records. |
2.3 Encryption in Transit
- TLS 1.3 required for all client-server communication
- TLS 1.2 with strong cipher suites accepted as fallback
- HSTS header enforced with
max-age=31536000; includeSubDomains
- Database connections use SSL with certificate verification
- Internal service-to-service calls use mTLS where applicable
3. Threat Model (OWASP Top 10)
| OWASP Category |
Risk Level |
Mitigation |
Status |
| A01: Broken Access Control |
Critical |
PostgreSQL RLS enforces tenant isolation at the database level. JWT claims validated on every request. API returns 404 (not 403) for cross-tenant resource access to prevent enumeration. |
Mitigated |
| A02: Cryptographic Failures |
Critical |
AES-256-GCM for PII encryption. bcrypt with cost factor 12 for passwords. TLS 1.3 in transit. No sensitive data in logs or error messages. |
Mitigated |
| A03: Injection |
High |
Parameterized queries via SQLAlchemy ORM. Pydantic input validation on all endpoints. No raw SQL construction from user input. |
Mitigated |
| A04: Insecure Design |
Medium |
Threat modeling during design phase. Security requirements in PRD. Defense-in-depth architecture. AI guardrails prevent clinical diagnosis. |
Mitigated |
| A05: Security Misconfiguration |
Medium |
Hardened default configurations. Security headers enforced. Debug mode disabled in production. Dependency scanning via Dependabot. |
Mitigated |
| A06: Vulnerable Components |
Medium |
Automated dependency scanning. Weekly vulnerability report review. Pinned dependency versions with automated update PRs. |
Mitigated |
| A07: Auth Failures |
High |
Account lockout after 5 failed attempts. JWT with short expiry. Refresh token rotation. Email verification required. Rate limiting on auth endpoints. |
Mitigated |
| A08: Software/Data Integrity |
Medium |
CI/CD pipeline with signed commits. Dependency integrity verification. GCM authentication tags prevent data tampering. |
Mitigated |
| A09: Logging Failures |
Medium |
HIPAA audit middleware logs all requests. Logs shipped to append-only storage. Alerting on anomalous patterns. |
Mitigated |
| A10: SSRF |
Low |
No user-supplied URLs fetched by the server. File upload validates content type and restricts to .txt/.pdf. No external URL resolution. |
Mitigated |
4. Authentication Security
4.1 Password Policy
- Minimum 8 characters with uppercase, lowercase, digit, and special character
- Passwords hashed with bcrypt (cost factor 12, ~250ms per hash)
- Passwords checked against the Have I Been Pwned breach database
- No password hints or security questions
4.2 Account Lockout
- 5 consecutive failed login attempts trigger a 30-minute lockout
- Lockout counter tracked per account, not per IP (prevents IP rotation bypass)
- Counter resets on successful login
- Lockout events logged for security monitoring
4.3 Token Security
- Access tokens: 15-minute expiry, signed with HS256 using a 256-bit secret
- Refresh tokens: 7-day expiry, single-use (rotated on each refresh)
- Tokens stored in httpOnly, Secure, SameSite=Strict cookies (not localStorage)
- Token revocation list checked on every authenticated request
5. Data Isolation and Multi-Tenancy
VitalNexa uses PostgreSQL Row-Level Security (RLS) to enforce strict data isolation between users. Every table containing user data has RLS policies that filter rows based on the authenticated user's ID, set at the database session level.
- RLS policies are
FORCE enabled, meaning they apply even to table owners
- The application sets
app.current_user_id on each database session before executing queries
- All SELECT, INSERT, UPDATE, and DELETE operations are filtered by the RLS policy
- Integration tests verify isolation by attempting cross-tenant queries and asserting zero results
- Database migrations include RLS policy creation as part of table creation
6. Audit Logging
HIPAA requires comprehensive audit trails for all access to PHI. VitalNexa implements this through FastAPI middleware that logs every request.
6.1 Audit Log Fields
| Field |
Description |
Example |
| timestamp |
ISO 8601 timestamp of the request |
2026-04-05T14:32:01.445Z |
| user_id |
Authenticated user's UUID (null for unauthenticated requests) |
a1b2c3d4-e5f6-7890-abcd-ef1234567890 |
| action |
HTTP method and path |
GET /api/test-results |
| ip_address |
Client IP (respects X-Forwarded-For behind load balancer) |
203.0.113.42 |
| status_code |
HTTP response status code |
200 |
| response_time_ms |
Request processing time in milliseconds |
45 |
| resource_id |
ID of the accessed resource (if applicable) |
record-uuid-here |
| user_agent |
Client user-agent string |
Mozilla/5.0... |
6.2 Log Integrity
- Audit logs are written to an append-only table with no UPDATE or DELETE permissions
- Logs are replicated to a separate, read-only storage location daily
- Retention policy: minimum 6 years per HIPAA requirements
- Anomaly detection alerts on unusual access patterns (e.g., bulk data access, off-hours activity)
7. Incident Response Plan
7.1 Severity Levels
| Severity |
Definition |
Response Time |
Examples |
| P1 - Critical |
Active data breach or PHI exposure |
Immediate (within 15 minutes) |
Unauthorized PHI access, encryption key compromise, active exploitation |
| P2 - High |
Vulnerability with high exploitation potential |
Within 4 hours |
Auth bypass discovered, RLS policy gap, unpatched critical CVE |
| P3 - Medium |
Security issue with limited exposure |
Within 24 hours |
Missing security header, minor information disclosure, failed pen test finding |
| P4 - Low |
Hardening opportunity, no active risk |
Within 1 week |
Dependency update available, log verbosity reduction, documentation gap |
7.2 Response Procedure
- Detection: Automated monitoring, audit log alerts, user reports, or security scans identify the incident
- Containment: Immediately isolate affected systems; revoke compromised credentials; block attacker IPs
- Assessment: Determine scope of data exposure; identify affected users; preserve forensic evidence
- Notification: If PHI is breached, notify affected individuals within 60 days per HIPAA Breach Notification Rule; notify HHS if 500+ individuals affected
- Remediation: Patch the vulnerability; rotate affected keys/credentials; deploy fixes
- Post-Mortem: Conduct blameless post-mortem within 5 business days; document root cause, timeline, and preventive measures
8. Regulatory Alignment
VitalNexa's security architecture is designed to meet or exceed the requirements of major health data and privacy regulations:
| Regulation |
Scope |
Our Alignment |
| HIPAA / HITECH |
US health data protection |
HIPAA-grade safeguards including AES-256-GCM encryption at rest, TLS 1.3 in transit, comprehensive audit logging, breach notification procedures, and Business Associate Agreements with all third-party processors |
| GDPR |
EU/EEA data subject rights |
Full data subject rights support: access, rectification, erasure, portability (JSON export), restriction of processing, right to object, and withdrawal of consent. Data processing based on explicit consent, legitimate interest, and contractual necessity. 72-hour breach notification to supervisory authorities. |
| CCPA / CPRA |
California consumer rights |
Right to know, right to delete, right to opt-out of sale (we never sell data), right to non-discrimination, and right to correct. See our Do Not Sell page. |
For complete details on data handling practices and user rights, see our Privacy Policy. For breach notification procedures including GDPR 72-hour requirements, see our Incident Response Policy.
9. OWASP Top 10 Audit
Audit Completed: April 2026 — A comprehensive OWASP Top 10 audit was performed against the VitalNexa platform. All Critical, High, and Medium severity findings have been remediated. The audit covered all 10 OWASP categories as detailed in the Threat Model (Section 3 above). Key outcomes:
- Critical findings (2): Broken Access Control hardening and Cryptographic Failures review — both fully resolved
- High findings (2): SQL Injection prevention validation and Authentication Failures hardening — both fully resolved
- Medium findings (4): Insecure Design patterns, Security Misconfiguration, Vulnerable Components, and Software/Data Integrity — all fully resolved
- Low findings (2): Logging enhancement and SSRF edge cases — accepted with compensating controls
- Test coverage: 325+ automated tests across 26 test files (~4,700 lines of test code) validate security controls
10. Security Assessment Status
| Assessment Area |
Last Assessed |
Findings |
Status |
| OWASP ZAP Baseline Scan |
March 28, 2026 |
0 high, 2 medium (resolved), 4 low (accepted) |
Pass |
| Dependency Vulnerability Scan |
April 3, 2026 |
0 critical, 0 high, 1 medium (upgrade scheduled) |
Pass |
| RLS Isolation Audit |
April 1, 2026 |
All tables verified; no cross-tenant data access possible |
Pass |
| Encryption Implementation Review |
March 25, 2026 |
AES-256-GCM correctly implemented; key rotation tested; no issues found |
Pass |
| OWASP Top 10 Audit |
April 2026 |
All 10 categories assessed; all Critical/High/Medium findings remediated |
Pass |
| Penetration Test (External) |
Scheduled |
Planned for Q2 2026 prior to public launch |
Pending |
| SOC 2 Type II Audit |
Scheduled |
Planned for Q4 2026 |
Pending |
| HIPAA Risk Assessment |
March 15, 2026 |
Initial assessment complete; 3 remediation items addressed |
Pass |
| Data Backup and Recovery Test |
March 20, 2026 |
Full restore completed in 47 minutes; RPO and RTO targets met |
Pass |