Skip to content

Copy only the assessed provider's PNG icons into reports - #64

Merged
bencehezso merged 3 commits into
mainfrom
task/slim_report_assets
Aug 4, 2026
Merged

Copy only the assessed provider's PNG icons into reports#64
bencehezso merged 3 commits into
mainfrom
task/slim_report_assets

Conversation

@bencehezso

Copy link
Copy Markdown
Contributor

Summary

Every report bundled the full icon tree — 2,204 files, 5.5 MB — to display a handful of icons. copy_assets() now copies only the assessed provider's icon folder, and only PNGs.

Report Before After
AWS 6.58 MB 1.89 MB −71%
Azure 6.50 MB 2.88 MB −56%

What changes

  • copy_assets() takes cloud_service_provider and copies icons/<provider>/ plus icons/severity/ and icons/misc/. The severity icons are used by the PDF renderer and no_image.png is the fallback, so both travel with every report. cloud_service_provider was already a parameter at the call site — nothing new to plumb through.

  • PNG only. No renderer loads an icon SVG; they were dead weight. The ignore callable is an allowlist (keep directories, keep .png, drop the rest) rather than ignore_patterns("*.svg"), so a future stray file type can't ride along. Category subfolders are preserved.

@bencehezso bencehezso self-assigned this Aug 4, 2026
@bencehezso bencehezso added the enhancement New feature or request label Aug 4, 2026
@bencehezso
bencehezso merged commit c05a70f into main Aug 4, 2026
3 checks passed
@bencehezso
bencehezso deleted the task/slim_report_assets branch August 4, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant