Skip to content

feat: add findings summary command (per-resource rollup) - #27

Merged
raphgm merged 1 commit into
raphgm:mainfrom
forsythfamous:feat/findings-summary
Sep 27, 2026
Merged

raphgm merged 1 commit into
raphgm:mainfrom
forsythfamous:feat/findings-summary

Conversation

@forsythfamous

Copy link
Copy Markdown
Contributor

Closes #16

Adds cloudcost findings summary, a rolled-up view of findings.json grouped by resource_id, for deciding which resource to fix first when one resource trips several checks (e.g. stopped-not-deallocated and untagged).

For each resource it shows the number of findings, the policies that fired, and the combined estimated impact, sorted by impact (highest first), followed by a total.

┃ Resource    ┃ Findings ┃ Policies                          ┃ Combined impact ┃
│ /sub/disk-b │        1 │ unattached_disks                  │         $250.50 │
│ /sub/vm-a   │        2 │ stopped_not_deallocated_vms,      │         $100.00 │
│             │          │ untagged_resources                │                 │
Total combined impact: $350.50
  • --min-findings N shows only resources with at least N findings (--min-findings 2 = resources hit by multiple checks)
  • --input accepts a findings file path, matching findings notify
  • Findings without a resource_id (e.g. the GitHub Actions check) are skipped, since there is nothing to group them on
  • findings.json itself is unchanged; each finding stays independent

Testing

  • New tests/test_findings_summary.py: grouping and sort order, the --min-findings filter, and a missing input file
  • Full suite: 73 passed
  • README usage section updated

Groups findings.json by resource_id and shows finding count, triggering
policies and combined estimated impact per resource, sorted by impact.
--min-findings filters to resources hit by multiple checks.

Closes raphgm#16
@raphgm
raphgm merged commit 9ddec9f into raphgm:main Sep 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cross-check finding deduplication when one resource triggers multiple policies

2 participants