Re-assessment after remediation (8 November 2026)
The code now closes 10 of the 17 gaps in full and 4 in part; the one remaining High gap, G6 (TLS and encryption at rest), can only be closed by the operator. With real data the suite is usable once G6 is done and the operator checklist in section 9 is complete, but optional MFA, missing rectification and the items below keep it short of "low risk".
This section re-checks every gap in the baseline register (sections 2-9, kept unchanged below as the baseline) against the delivered code. Evidence: source review of the new modules and server wiring, API test scripts (MFA 27 of 27 checks; masking, restriction, break-glass, export and erasure all passing on a clean run, with one re-run check failing only because its test patient had already been erased; idle timeout and retention 8 of 8), and a browser pass over every page with no console or Content-Security-Policy errors.
Status of the 17 gaps
| ID | Gap | Was | Now | What the code does now, and what remains |
|---|---|---|---|---|
| G1 | Audit trail | High | Closed | Every Viewer, Profiler, MDM and admin call, sign-in, failure, export and erasure is logged to auth.audit_event (user, address, time, type, id, outcome; parameter names only, never values). SHA-256 hash chain, update and delete refused by a database trigger, verify and CSV export in Administration. Remains: the log lives in the same database (a database superuser can bypass the trigger, which the chain check then reveals), repeated reads within 30 seconds count once, and shipping off the host (AUDIT_LOG_FILE, AUDIT_STDOUT) is the operator's job |
| G2 | Sign-in assurance | High | Partly closed | 12-character minimum with common-password and user-name checks; no fixed default admin password (set or random one-time); forced change at first sign-in and after an admin reset; optional TOTP per user with hashed recovery codes and replay protection. Remains: MFA is optional by design, so an administrator without it is still single-factor; there is no organisation-wide or administrator-only enforcement |
| G3 | Data subject rights | High | Mostly closed | Find a person, NDJSON export with history, restrict processing, legal hold, hard erase from raw, golden and MDM data (typed confirmation, blocked by a hold, transaction), request log with 30-day due date. Remains: no rectification workflow (the source system owns corrections), Profiler snapshots, the documents folder and backups are not covered by erase, and the audit trail keeps only a hash of the erased id |
| G5 | Plain-text connection strings | High | Closed | AES-256-GCM with a key from SECRETS_KEY or a 0600 key file; old values sealed at start; MFA secrets sealed too. Remains: the key must be stored and backed up away from the database |
| G6 | TLS and encryption at rest | High | Operator | Unchanged: the app still speaks HTTP. HSTS and the Secure cookie flag switch on behind HTTPS, and docs/DEPLOYMENT-SECURITY.md gives the proxy, disk-encryption and key rules |
| G4 | Retention | Medium | Closed | Per-source days for superseded versions and soft-deleted resources, audit trail retention (default 2,190 days), six-hourly job with preview and run now. Current data is never aged out by it; periods are the operator's decision. Run only against data with nothing old to remove in testing |
| G7 | Idle timeout | Medium | Closed | Server-side idle limit (default 30 minutes, setting or IDLE_MINUTES), absolute 12-hour cap, warning one minute before sign-out; tested against an aged session |
| G8 | Granularity | Medium | Mostly closed | Masking of identifying elements unless viewer:unmasked, restricted-record flag enforced on detail and lists (also for administrators), audited break-glass with a reason (10+ characters, 5-60 minutes) that raises an alert. Remains: masking is enforced in the API, and the Profiler's value and record screens are blocked rather than masked for identifying types |
| G9 | Throttle | Medium | Closed | Client address via TRUST_PROXY_HOPS, per-address cap, per user-and-address pause with growing delay, account-wide pause, pruned maps. Remains: state is in memory, so it is per server process |
| G12 | Genome lookups | Medium | Closed | Off by default; per-service allow-list enforced before any call |
| G13 | Breach detection | Medium | Partly closed | Alerts for repeated failures, break-glass, privilege grants, MFA resets, erasures and chain failures, shown in Administration and logged. Remains: nothing is pushed to a person (no email or webhook), and notification procedures are in the deployment guide only |
| G14 | Consent, notice, ROPA, DPIA | Medium | Operator | Unchanged by design; the deployment guide lists the documents and what each must contain |
| G16 | Backups and hosting | Medium | Operator | Unchanged by design; the guide covers encrypted backups, restore tests, erasure versus backups and hosting region |
| G17 | User deletion and access review | Medium | Closed | Deletion is audited at alert level with a snapshot; the Access review tab lists role, MFA state, last sign-in and flags. Deleting remains possible rather than deactivate-only |
| G10 | scrypt cost | Low | Closed | N=65536, r=8, p=2 with automatic rehash at the next sign-in. The OWASP equivalence is quoted from memory; confirm against the current cheat sheet |
| G11 | CSP and HSTS | Low | Closed | Strict CSP on HTML (script-src 'self', no inline scripts), frame-ancestors none, HSTS over HTTPS, nosniff, Permissions-Policy. Remains: style-src still allows inline styles |
| G15 | Log redaction | Low | Closed | Database errors are logged as a code only, in all five modules that logged them |
What changed in each law
| Framework | Before | Now | Still open |
|---|---|---|---|
| HIPAA Security Rule | 1 met, 5 partial, audit controls and automatic logoff open | Met: unique user ID, automatic logoff, audit controls, workforce access review. Partial: person authentication (optional MFA), access control and minimum necessary (masking, restriction, break-glass), integrity (hash-chained log, no backup tooling), incident procedures (alerts without notification) | Encryption at rest and transmission security (operator, G6), contingency plan (G16), risk analysis and business associate agreements (operator). Rule update proposing mandatory MFA is still not final |
| GDPR | Rights, retention and accountability open (Articles 5(2), 15-18, 20) | Met: 5(2) accountability, 15 and 20 access and portability, 17 erasure of live data, 18 restriction, 25 by default (genome off, no default password). Partial: 5(1)(c) minimisation, 5(1)(e) storage limitation, 32 security | 16 rectification, erasure in backups and Profiler snapshots, 30 record, 35 impact assessment, 33-34 notification, 44-49 transfers (G14, G16) |
| Saudi PDPL | Rights handling, destruction and security evidence open | Access, copy, destruction and restriction handled within the 30-day log; security evidence from the audit trail; sensitive data masked by default | Correction workflow, legal basis, records, impact assessment, localisation and transfer basis (operator); article numbers still unverified against the Arabic text |
Findings from this review
The re-check found no new High gap. These residual points are new or sharper than in the baseline:
MFA is optional (the requested design). Treat it as a policy duty: require every administrator to switch it on, and check the Access review tab. Organisation-wide enforcement is the obvious next change if the proposed HIPAA rule is adopted.
Erasure is not complete across the estate. It covers raw, golden and MDM data. Profiler snapshots and results, the documents folder, backups and the audit trail's hashed id are outside it; state this in the retention policy.
The audit log shares a database with the data. The trigger and chain make tampering visible, not impossible. Ship events to a write-once store and alert on a failed chain check.
Alerts reach no one by themselves. Someone must read the Alerts tab or the log feed daily.
Reads are coalesced. Repeated reads of the same object within 30 seconds are one event, which is fine for review but should be agreed with the privacy officer for "accounting of disclosures".
Restrictions and masking are API-level. They protect the application, not someone with direct database access. The
viewer:*permission does not includeviewer:unmaskedorviewer:breakglass; grant them explicitly.Single-process state. The sign-in throttle and the audit batching assume one server process.
Secrets key on the same host. It protects a copy of the database alone, not a compromise of the server.
style-src 'unsafe-inline'remains in the Content-Security-Policy; scripts are strict.
Limits of this re-assessment
Source review plus the test runs above; no penetration test, no dependency audit (the package has no lockfile, so
npm auditcould not run) and no load test.Tested against PostgreSQL® through a test stand-in for the
pgdriver; the single-transaction erase path and retention on genuinely old data were not exercised.The legal status paragraphs in sections 4-6 are as of 8 November 2026 and were not re-researched in this pass; this is a technical assessment, not legal advice or certification.