npm / npm/cli

[BUG](arborist) `audit` does not always include all known vulnerabilities

Open
#4,266 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs Triage ws:arborist
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
Current Behavior

When a package has multiple known vulnerabilities that match the version of the package installed, npm audit does not always show them (I currently suspect it's if those vulnerabilities have the same vulnerable_versions range).

Expected Behavior

All known & relevant vulnerabilities are shown/included in output.

Steps To Reproduce
  1. npm init -y
  2. npm install jquery-ui@1.12.0
  3. npm audit
  4. See that there is only one vulnerability shown, but there are three in the audit report that have the same vulnerable_versions range.
Environment
  • npm: 7.24.2 & 8.3.0
  • Node: 16.0.0
  • OS: Ubuntu 18.04
  • platform: Windows (WSL)

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

Reproduce the issue with npm init -y, npm install jquery-ui@1.12.0, and npm audit, comparing the output with the three vulnerabilities reported for the same vulnerable_versions range. Trace the npm audit entry point and its arborist audit processing, then verify that all relevant vulnerabilities appear in the audit output.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.