npm erroneously reports no longer vulnerable with multiple versions of dependency. #5741
Labels
F: security-updates 🔐
Issues specific to security updates
L: javascript:npm
npm packages via npm
T: tech-debt ⚙️
An
npm
project is allowed to have multiple versions of the same dependency in the tree. When parsing the dependency we consolidate the different versions using the DependencySet. This retains the lowest version of the dependency seen with the expectation that the lowest version is the oldest and most likely to be vulnerable (or at least most noteworthy to call out in the update PR).However, we've seen this can lead to confusing states when there is a vulnerability that affects some versions of the dependency but not the lowest version. In this case Dependabot incorrectly reports that no security update is needed.
Fixing this will be a bit of a lift because
dependabot-core
code has a number of places that assumes there will only be one version of a dependency in the tree.Related:
npm
dependency in a repo #4701 👈 Primary root causeThe text was updated successfully, but these errors were encountered: