npm / npm/cli

[BUG] NPM Audit has reduced the issues count over time on unchanged source code

Open
#8,543 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Needs Triage
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 audit on 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:

  1. Can advisories for specific dependencies/versions be removed or deprecated from the database at a later time?
  2. Do advisories get merged/reclassified (e.g., multiple CVEs into one, or marked as "resolved")?
  3. Is it expected for audit results to drop so drastically without any dependency changes done in source code?
  4. 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):

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
  1. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.