Reporting Internals

Report schema, savings math, and redaction implementation.

Reports are versioned documents (schema_version: 1.1.0), separate from SQLite rows and rule-engine structs.

Sections

Section Content
Executive summary Finding counts by severity and category
Scope Providers, accounts, regions, windows
Cost breakdown Spend by service, region, owner (minor units), grouped by currency
Findings Evidence, remediation, confidence
Potential savings Low/high ranges after overlap dedup
Portfolio Spend and resources by provider, category, owner, project tag
Capabilities Cross-provider matrix for report scope
Coverage Inventory, cost, metrics, pricing, and evaluable-spend scores
Appendix Suppressed rules, skipped rules, utilization detail

Formats

cloudopt report --format html
cloudopt report --format json --output report.json
cloudopt capabilities matrix --providers aws,gcp

HTML is self-contained (inline CSS). User-supplied strings are escaped.

Savings math

  • Low/high bands; ±5% on rightsizing paths
  • Investigation-only findings omitted from totals
  • Commitment-based savings listed separately from on-demand totals
  • Overlap dedup before aggregation
  • Tags: one-time, monthly recurring, commitment-based
  • Incompatible cost bases excluded from cross-provider totals

Reports label savings as estimates. Remediation text is guidance, not automation.

Redaction

cloudopt report --redact

Maps account and resource IDs to stable aliases (Account-1, Resource-NNN).

Header metadata

config/report.yaml (customer name, project name) renders in the header. Rule evaluation ignores it.

Fixed footer fields: analyzer version, snapshot ID, analysis run ID, ruleset version, generation time.

Multi-cloud engagement

Format v2 engagement fixtures merge member snapshots from multiple providers. Currencies, billing periods, and coverage stay independent per provider. Portfolio aggregation normalizes service categories; evidence keeps native product names.

Utilization appendix

When metrics exist, the appendix lists observation window, sample coverage, p95/idle/trend signals, and notes when memory metrics were unavailable.