Skip to content

tools: add standalone CVE source distribution/complementarity plots - #101

Merged
danielturull merged 1 commit into
mainfrom
feature-plot
Aug 28, 2026
Merged

danielturull merged 1 commit into
mainfrom
feature-plot

Conversation

@danielturull

Copy link
Copy Markdown
Contributor

Add tools/plot_source_distribution.py, a standalone dev-only script (matplotlib, not a runtime dependency) that reads a cve-metadata.json file and generates 7 PNG charts:

  • coverage_by_source.png / coverage_by_source_upstream_only.png
  • upstream_vs_combined_gain.png (how much closed enrichment sources add on top of public upstream sources alone, set-unioned so overlapping contributions aren't double-counted)
  • volume_by_source.png
  • overlap_cve_level.png / overlap_hash_level.png (pairwise Jaccard similarity heatmaps)
  • unique_contribution.png (hashes found by only one source, exactly one other source, or 3+ sources, with the dominant pairing partner named)

UPSTREAM_SOURCES is derived from cve_metadata_extractor's own SOURCE_REGISTRY, so any source name not registered there is treated as closed/external enrichment data and never hardcoded by name. nvd is merged into cvelistv5 (same underlying data reported under two labels).

Add tools/README.md documenting usage, and gitignore *.png output.

Assisted-by: kiro:claude-sonnet-5

Add tools/plot_source_distribution.py, a standalone dev-only script
(matplotlib, not a runtime dependency) that reads a cve-metadata.json
file and generates 7 PNG charts:

  - coverage_by_source.png / coverage_by_source_upstream_only.png
  - upstream_vs_combined_gain.png (how much closed enrichment sources
    add on top of public upstream sources alone, set-unioned so
    overlapping contributions aren't double-counted)
  - volume_by_source.png
  - overlap_cve_level.png / overlap_hash_level.png (pairwise Jaccard
    similarity heatmaps)
  - unique_contribution.png (hashes found by only one source, exactly
    one other source, or 3+ sources, with the dominant pairing partner
    named)

UPSTREAM_SOURCES is derived from cve_metadata_extractor's own
SOURCE_REGISTRY, so any source name not registered there is treated as
closed/external enrichment data and never hardcoded by name. nvd is
merged into cvelistv5 (same underlying data reported under two labels).

Add tools/README.md documenting usage, and gitignore *.png output.

Assisted-by: kiro:claude-sonnet-5
Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
@danielturull
danielturull merged commit 4f2da1c into main Aug 28, 2026
6 checks passed
@danielturull
danielturull deleted the feature-plot branch August 28, 2026 12:11
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.

1 participant