SkillSpector
SkillSpector copied to clipboard
Sibling npm lockfiles supply versions to unrelated project manifests
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:
b/package.jsondeclaresnode-forge:^1.4.2; its own npm-generated lock pins1.4.2. Scanning this project reports no SC4 for the manifest.- Add an unrelated
a/package-lock.jsonpinningnode-forge:1.2.1. - Scan both projects together. The report now attributes HIGH SC4 for
1.2.1tob/package.json, despite b's own lock pinning1.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.