SkillSpector icon indicating copy to clipboard operation
SkillSpector copied to clipboard

Sibling npm lockfiles supply versions to unrelated project manifests

Open chrisknvidia opened this issue 1 month ago • 0 comments

An unrelated sibling package-lock.json can supply the resolved version for another project's manifest and produce an incorrectly attributed SC4 finding.

On main d501c0d5035c2ed6385740a384d942bb05651fda:

  1. b/package.json declares node-forge:^1.4.2; its own npm-generated lock pins 1.4.2. Scanning this project reports no SC4 for the manifest.
  2. Add an unrelated a/package-lock.json pinning node-forge:1.2.1.
  3. Scan both projects together. The report now attributes HIGH SC4 for 1.2.1 to b/package.json, despite b's own lock pinning 1.4.2.

The finding for a's vulnerable lock is legitimate and must remain. The problem is the additional false attribution to b.

Expected: manifest resolution uses its owning project or explicit workspace installation context. Unrelated sibling locks must not supply its version. Preserve workspace hoisting, nested versions, exact pins, source locations and independent lockfile analysis.

chrisknvidia avatar Oct 28 '26 20:10 chrisknvidia