Compliance Documents

FedRAMP SSP/POA&M/SAR Generation, SOC 2 Evidence Export, CMMC Assessment, and Cloud Evidence Collection

Complete

FedRAMP SSP/POA&M/SAR

Auto-generated FedRAMP authorization documents in JSON and HTML

Complete

SOC 2 Evidence Export

Audit evidence package in JSON and CSV for auditors

Complete

CMMC Assessment

Level 2 self-assessment with domain readiness scores

Complete

Cloud Evidence

Real-time Azure/AWS evidence collection via cloud APIs

Overview

The Compliance Documents module generates audit-ready compliance documents from the Compliance Engine's live state. It bridges the gap between automated compliance monitoring and the formal documents required for government authorization (FedRAMP ATO), SOC 2 audits, and CMMC certification.

Compliance officers need to produce SSPs, POA&Ms, SARs, audit evidence packages, and self-assessment questionnaires. Producing these manually from compliance dashboards is time-consuming and error-prone. This module automates the entire document generation pipeline, pulling live data from the compliance engine and formatting it into framework-specific documents.

What Was Proposed

What's Built Complete

Document Generators

File: platform/api/app/services/compliance/document_generator.py (~1200 lines)

Cloud Evidence Collectors

File: platform/api/app/services/compliance/cloud_evidence.py (~800 lines)

Compliance Officer Dashboard

The /officer/dashboard endpoint aggregates:

Frontend UI

File: platform/frontend/src/app/compliance-docs/page.tsx (~530 lines)

Architecture

Frontend (Next.js)                     API (FastAPI)
+----------------------------+   +--------------------------------------+
| /compliance-docs           |   | /api/v1/compliance/*                 |
| - Framework Score Cards    |-->|                                      |
| - Control Heatmap          |   | FedRAMPDocumentGenerator             |
| - Evidence Collection UI   |   |   generate_ssp() / generate_poam()   |
| - Document Gen Cards       |   |   generate_sar()                     |
| - CMMC Domain Bars         |   | SOC2AuditExporter                    |
+----------------------------+   |   export_evidence_package() / csv()  |
                                 | CMMCAssessmentGenerator              |
                                 |   generate_assessment()              |
                                 | AzureEvidenceCollector               |
                                 |   Resource Graph, Graph API, ARM     |
                                 | AWSEvidenceCollector (stub)          |
                                 +--------------------------------------+
                                         |
                                 ComplianceAutomationEngine (shared state)
    

Routing

TypePathDescription
Frontend/compliance-docsDocument generation and evidence collection UI
API Prefix/api/v1/complianceAll compliance document endpoints

API Endpoints

MethodEndpointDescription
POST/generate/sspGenerate FedRAMP SSP (format=json|html)
POST/generate/poamGenerate FedRAMP POA&M
POST/generate/sarGenerate FedRAMP SAR summary
GET/export/soc2Export SOC 2 evidence (format=json|csv)
GET/export/cmmcExport CMMC Level 2 self-assessment
GET/evidence/collectTrigger real-time cloud evidence collection
GET/officer/dashboardCompliance officer dashboard data

Prerequisites

Data Model

Document Output Structures

DocumentKey Fields
FedRAMP SSPdocument_id, system_info, security_controls (per family), authorization_boundary, data_flow, SHA-256 hash
FedRAMP POA&Mdocument_id, poam_items[] (control_id, weakness, remediation_plan, milestones, scheduled_completion), summary
FedRAMP SARdocument_id, executive_summary (overall_risk_rating), findings_by_family[], assessment_methodology
SOC 2 Evidencedocument_id, trust_service_criteria[], evidence_records[], control_mapping, CSV export with tabular rows
CMMC Assessmentdocument_id, executive_summary (overall_readiness_score), domain_scores[], questionnaire[], practice_mapping[]

Evidence Record

FieldTypeDescription
control_idstringMapped control family (AC, SC, etc.)
evidence_typeEvidenceTypeCategory of evidence collected
datadictSource-specific evidence data (policy counts, MFA status, etc.)
collector_namestringName of the collector that gathered this evidence
confidence_scorefloat0.0-1.0 confidence (0.98 for real API, 0.70 for simulated)

UI Description

The Compliance Documents page uses the ThreatOps white-and-orange design system and is organized into five sections:

  1. Framework Compliance Scores: Four cards (FedRAMP, SOC 2, NIST 800-53, CMMC L2) showing percentage scores with colored progress bars and trend arrows
  2. Control Status Heatmap: Table with categories (Access Control, Audit, Security Assessment, etc.) showing implemented/partial/not-implemented counts and coverage percentage bars
  3. Evidence Collection: Panel with "Collect Evidence" button that triggers cloud API calls and shows progressive results with pass/fail/collecting status icons, source labels, and timestamps
  4. Document Generation: Three cards (SSP, POA&M, SOC 2) each with idle/generating/complete/error states and generate/download buttons
  5. CMMC Assessment: Domain-level horizontal bar chart showing 10 CMMC domains with readiness percentage bars (green ≥ 85, orange ≥ 70, red below) and an overall readiness score