Repository navigation
fix: CVE data accuracy — no double counting, installed versions, NVD aliases - #10
Open
AjayBThorat-20 wants to merge 1 commit into
Open
AjayBThorat-20 wants to merge 1 commit into
AjayBThorat-20 wants to merge 1 commit into
Conversation
…aliases - An ecosystem alert of type "vulnerability" was filed as a quality finding, so it never merged with the CVE finding for the same package: the same vulnerability appeared twice and lowered the score twice. It is now a security finding and merges. - Never use an advisory's vulnerable range as a finding's version; findings without a version get the installed one from node_modules. - Query NVD with the CVE id from the OSV record's aliases (NVD doesn't know GHSA ids, so enrichment practically never matched); skip it when there is no CVE alias. - Describe npm audit findings with the advisory title instead of the dependency-chain package names. - Keep every advisory id from cve.collector's per-package merge. - Don't prefix a free-text ecosystem fix with "Update to". On a project with minimist@1.2.5 and qs@6.7.0, duplicate findings drop from 7 to 6, qs keeps all 4 advisories, and no version is a range or "unknown".
3 of 4 tasks
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.
What and why
The vulnerability data was double-counting and mislabeling findings:
vulnerabilitywas filed as a quality finding, so it never merged with the CVE finding for that package and lowered the score twice. It's a security finding now, and merges.qs@<=6.15.3) orunknown.aliases.On a project with
minimist@1.2.5andqs@6.7.0: duplicate findings drop from 7 to 6,qskeeps all 4 advisories, and no version is a range orunknown.Stacked on #9.
Merging the stack: use Create a merge commit, not squash (squashing makes every later PR show these commits again). After merging the PR below this one, click Delete branch on it; GitHub then retargets this PR to
mainand CI runs.How I tested it
npm run test:coverageon Node 24.21.0, cleannpm ci, network disabled: 109/109 pass, 29.48% linesnpm audit --audit-level=highcurrently fails on GHSA-mrwp-f3q8-3g9p (follow-redirects, published after this branch was made); the lockfile fix is in feat: rank vulnerabilities by exploit risk (CISA KEV + FIRST EPSS) #14analyze --jsonon the fixture above🤖 Generated with Claude Code