Architecture Note · Security & Compliance
Deterministic Vendor Risk & DDQ Automation: Evidence-Cited Matching, Risk Scoring, and Mandatory Sign-Off Gates
Why unguarded LLM questionnaire tools fail third-party risk teams—and the deterministic FastAPI and SQLite architecture that keeps buyer DDQs, SOC 2 gap triage, and Critical-tier approvals auditable.
The Operational Problem: Manual DDQs and Unchecked Third-Party Exposure
Enterprise security teams and Third-Party Risk Managers (TPRMs) fight a two-front bottleneck. Inbound, enterprise buyers send sprawling SIG, CSA CAIQ v4, and VSA spreadsheets demanding attested answers on FIDO2 MFA, KMS encryption, CVE remediation SLAs, and EU DORA Art. 28 subcontractors. Outbound, procurement teams onboard SaaS tools faster than analysts can inspect SOC 2 Type II opinions, expired bridge letters, subservice carve-outs, and unresolved penetration-test findings across global hubs.
Why Naive AI Wrappers Fail in Third-Party Risk
Drop-in AI questionnaire wrappers fail CISOs and enterprise security leads along four predictable lines:
- Fabricated attestations and unanchored answers: Generic LLMs routinely overstate compliance posture—claiming zero-retention AI policies, SCIM deprovisioning, or clean pen-tests without binding each claim to a verified Trust Center control badge.
- Nondeterministic risk scoring: Letting a prompt estimate vendor tiering produces inconsistent scores across identical intakes, breaking repeatable governance for high-PII, HIPAA, GDPR, and DORA ICT third-party reviews.
- Silent egress and lingering uploads: Shipping raw buyer spreadsheets or vendor SOC 2 artifacts to external endpoints creates fourth-party data leakage and leaves sensitive uploads sitting indefinitely on disk.
- Missing release and onboarding gates: Auto-sending drafted questionnaires or clearing Critical-tier vendors without named analyst review turns automation into an unverified liability.
The Deterministic Architecture That Fixes It
A production TPRM and DDQ workbench separates deterministic policy enforcement from optional language synthesis behind explicit SQLite state machines and human sign-off gates.
- Evidence-cited KB matching with offline-first fallback:
POST /api/ddq/autofillparses CSV and XLSX questionnaires (viaopenpyxl) or JSON payloads and routes items toOfflineKBAdapter(deterministic-offline-kb-v1) by default. Each match pairs buyer questions against verified Trust Center entries carrying explicit control citations (such asSOC2-CC6.1,ISO27001-A.8.24,DORA-Art.28, andGDPR-Art.32) and flags low-confidence rows withneeds_review. An optionalOpenAICompatibleAdapterrefines phrasing at low temperature while preserving citations and falling back cleanly to the offline KB on error. - 1-hour ephemeral upload auto-wipe and scoped auth: Raw questionnaire files are stored with
0600permissions under a 3,600-second TTL. A backgroundcleanup_loopandPOST /api/wipeunlink expired files and null outraw_contentintemp_uploadswhile retaining SHA-256 digests. API access uses SHA-256-hashed invite tokens with per-token sliding-window rate limits (429) and scope checks. - Deterministic inherent and residual risk scoring:
POST /api/vendors/assesscomputes0–100inherent and residual scores and tiers (Critical,High,Medium,Low) using fixed weights for data classification, PII volume, SSO/SCIM support, subprocessor regions outside standard adequacy jurisdictions, DORA/GDPR scope, SOC 2 opinion (including+24residual penalties for qualified or adverse opinions), bridge-letter expiry, unresolved critical CVEs, MFA enforcement, and compensating controls. - Assurance expiry tracking and immutable sign-off gates:
GET /api/vendors/expiringranks upcoming and expired reassessments, SOC 2 bridge letters, and certification renewals by urgency (expired,critical_windowwithin 30 days,upcoming). Drafted DDQ packages andCritical-tier vendors start inpending_signoff:GET /api/ddq/{id}/exportreturns403/409until an analyst signs off viaPOST /api/ddq/{id}/signofforPOST /api/vendors/{id}/signoff. Every decision writes an immutable record withrecord_sha256intosignoff_audit_log, guarded by SQLiteBEFORE UPDATEandBEFORE DELETEabort triggers.
Operational Takeaway
Automating security questionnaires and vendor intake does not mean surrendering judgment to a probabilistic prompt. When Trust Center answers stay bound to control citations, scoring follows transparent deterministic weights, raw uploads auto-wipe after one hour, and DDQ exports plus Critical-tier approvals block until a named analyst signs an immutable audit log, security teams cut triage turnaround while preserving full auditability.