[BUG] NPM Audit has reduced the issues count over time on unchanged source code
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
Title:
Drastic Drop in npm audit Issues for Same Repository -- Clarification on Advisory Database
Hello community,
I've been investigating npm audit behavior and noticed a significant drop in reported vulnerabilities for the same source code over time.
Environment:
- Node version:
v18.16.0 - npm version:
9.5.1
Observation:
-
Around 4 months ago, running
npm auditon some repositories showed 100+ issues. -
Running the same command today on the same source code (same lockfile) now shows only 2--3 issues.
This raises some questions on how the advisory database works internally:
- Can advisories for specific dependencies/versions be removed or deprecated from the database at a later time?
- Do advisories get merged/reclassified (e.g., multiple CVEs into one, or marked as "resolved")?
- Is it expected for audit results to drop so drastically without any dependency changes done in source code?
- Is there a public changelog or transparency report when advisories are removed/modified?
Repository Examples (Issue count differences b/w 4 month old scan and in today's reported issues):
-
Web3Bugs-122 →
-85issues -
Web3Bugs-192 →
-239issues -
Web3Bugs-104 →
-89issues -
Web3Bugs-110 →
-240issues -
Web3Bugs-13 →
-109issues -
Sherlock Flatmoney Audit →
-24issues -
Sherlock Zap Protocol Audit →
-210issues
Request:
Can someone from the community (or npm/GitHub Security team) clarify how advisory lifecycle works and whether it's normal for audit results to shrink so drastically over a short period?
Thanks in advance 🙏
Expected Behavior
Expectation:
For the same package-lock.json, I would expect npm audit to show consistent results, unless advisories were intentionally deprecated or removed.
Steps To Reproduce
- Run npm audit tool on above given repositories
Environment
- npm:
9.5.1 - Node.js:
v18.16.0 - OS Name:
Ubuntu 22.04.3 LTS - System Model Name: -
- npm config: -
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Run npm audit with npm 9.5.1 and Node.js v18.16.0 against the listed repositories and their existing package-lock.json files, then compare the reported counts with the earlier results. Review the audit behavior and advisory lifecycle questions; done means explaining whether unchanged lockfiles can produce different results and why.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, security, tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100