Adam BlansettSenior Full-Stack & AI Engineer
Autonomous AI WorkforcePhase 2 Complete (MIT)

AI Compliance & Regulatory Auditor Platform

Self-hosted SOC 2, HIPAA & GDPR compliance platform with an 18-control registry, deterministic policy scanners, signed evidence ZIP/PDF bundles, Policy RAG, and 409 legal-hold DSARs.

Engineering RoleLead Systems & AI Architect

01. Problem & Context

Preparing for SOC 2, HIPAA, or GDPR audits typically traps engineering teams in manual screenshot gathering, stale policy binders, untracked DSAR deletion deadlines, and accidental erasure of records subject to active litigation holds.

02. Engineering Solution

Architected and completed a Phase 2 self-hosted compliance platform pairing a FastAPI + async SQLAlchemy 2.0 backend (17 tables across `0001_initial_schema` → `0002_phase2_features`) with an 8-tab React 18 TypeScript console. Evaluates an 18-control baseline registry using deterministic scanners across text, files, repos, and live HTTP/TLS probes; compiles HMAC-SHA256 signed ZIP and multi-page PDF evidence bundles verifiable offline (`verify_bundle.py`); runs PII-scrubbed Policy RAG; and enforces 30-day DSAR workflows with `409 Conflict` legal-hold blocks.

03. System Architecture

Six domain modules (`controls/`, `scanners/`, `evidence/`, `rag/`, `privacy/`, `alerts/`) and `core/` run on async SQLAlchemy 2.0 (`pgvector` + SQLite dev fallback), PBKDF2 + HMAC-SHA256 JWT RBAC (`viewer`, `auditor`, `compliance_officer`, `admin`) with optional Separation of Duties, sliding-window rate limiting, OpenTelemetry instrumentation, and pure ASGI security headers.

Core Architectural Components

18-Control SOC 2 / HIPAA / GDPR Registry (`controls/`)

Maps an 18-control baseline across SOC 2 TSC, HIPAA Safeguards, and GDPR Articles plus custom controls, automated scan/privacy posture evaluation, and HITL risk waiver workflows.

Deterministic Artifact, Repo & Live URL Scanners (`scanners/`)

Executes deterministic collectors (`CFG-001..004`, `ENC-001..004`, `LOG-001..004`, `RBAC-001..004`, `SOP-001..004`) via inline text, uploads, full repository scans, SSRF-guarded HTTP/TLS probes, and scheduled drift scans.

Signed Audit Ledger, PDF Attestation & Offline ZIP Verifier (`evidence/`)

Appends mutations to a SHA-256 hash-chained `audit_events` log, compiles HMAC-SHA256 evidence bundles, renders multi-page executive PDFs (`/report.pdf`), and exports signed ZIPs (`/export-zip`) with zero-dependency `verify_bundle.py`.

Policy RAG, 30-Day DSAR Legal Holds & Drift Alerts (`rag/`, `privacy/`, `alerts/`)

Indexes heading-aware policies with pre-persistence PII/PHI scrubbing (`384`-dim or Ollama embeddings), tracks 30-day DSAR SLAs with `409 Conflict` legal-hold locks and unblock transitions, and dispatches drift alerts to HMAC webhooks.

04. Notable Engineering Decisions

Zero-Dependency Offline Evidence Bundle Verification (`verify_bundle.py`)

External auditors must verify evidence integrity without trusting the live server. Bundling `verify_bundle.py` inside signed ZIP exports lets assessors check SHA-256 chains and HMAC signatures offline.

HTTP 409 Legal-Hold Erasure Blocks & Dynamic Unblock

Fulfilling a GDPR deletion request on records under active litigation hold creates spoliation liability. Enforcing a `409 Conflict` lock until explicit hold release protects legal compliance.

Pre-Persistence PII/PHI Scrubbing & Optional Separation of Duties

Scrubbing PII/PHI before storing Policy RAG chunks and outbound cloud inference (`LLM_REDACT_PII_FOR_CLOUD=true`) alongside Separation of Duties prevents self-approved risk waivers.

05. Engineering Challenges & Solutions

Challenge: Giving auditors verifiable proof of configuration posture across both static repositories and live TLS endpoints.

Engineering Solution: Combined 20 deterministic `CFG`/`ENC`/`LOG`/`RBAC`/`SOP` collectors for repo/file scans with SSRF-guarded live HTTP/TLS probes and scheduled drift checks.

Challenge: Preventing evidence tampering or unattributed compliance waivers across multi-actor teams.

Engineering Solution: Paired append-only SHA-256 hash-chained `audit_events`, HMAC-SHA256 signed bundles, and optional Separation of Duties enforcement across RBAC roles.

06. Implementation Highlights

  • 18-control SOC 2 TSC, HIPAA Safeguards, and GDPR Articles registry with custom controls and HITL risk waivers
  • 20 deterministic collectors (`CFG`, `ENC`, `LOG`, `RBAC`, `SOP`) across inline text, uploads, full repos, SSRF-guarded URLs, and schedules
  • SHA-256 hash-chained `audit_events`, HMAC-SHA256 signed ZIP exports, PDF attestations (`/report.pdf`), and offline `verify_bundle.py`
  • Heading-aware Policy RAG with pre-persistence PII/PHI scrubbing and automatic control citation mapping
  • 30-day DSAR SLA tracking with `409 Conflict` legal-hold erasure locks, retention checks, and HMAC drift alert webhooks
  • 8-tab React 18 TypeScript console (Overview, Controls, Scanners, Evidence, Policy RAG, DSARs, Drift Alerts, HITL Approvals) with CI & Trivy