18.2. Data Flow#
18.2.1. Assessment Flow#
CLI parses command flags and config file
CloudflareClient authenticates with the provided token
AssessmentService enumerates accounts and zones
For each zone, SecurityBaseline checks are evaluated against live API data
Results are collected into a report object by ReportService
ComplianceEngine maps findings to framework controls
ContextualScoring adjusts severity based on zone metadata
Exporters transform the report object into the requested format
Results are written to disk and/or stdout
18.2.2. Drift Flow#
DiffService loads baseline and current assessment JSON files
Findings are matched by check ID and zone
Each matched pair is classified as REGRESSION, IMPROVEMENT, NEW, RESOLVED, or UNCHANGED
Drift score is calculated from severity-weighted improvement and regression totals
Results are formatted and returned with an appropriate exit code
18.2.3. Web Dashboard Flow#
Express server receives HTTP request
Authentication middleware checks X-API-Key (if configured)
Route handler validates input parameters
AssessmentService or DiffService is invoked with the validated parameters
Response is serialized as JSON or the requested export format
Static files are served from
web/public/