tools: add standalone CVE source distribution/complementarity plots - #101
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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