
Demonstration von CVE-2021-43616: npm `ci`-Befehl ignoriert package-lock.json, was unbeabsichtigte Installation von Abhängigkeitsversionen und Lieferkettenrisiko verursacht.
Repo zur Demonstration von CVE-2021-43616 / https://github.com/npm/cli/issues/2701
Entferne den Ordner node_modules und führe npx npm@8 ci aus. Du kannst sehen, wie
npm Version 2.2.x (2.2.16 zum Zeitpunkt dieses Commits) installiert, obwohl
package-lock.json 2.0.0 verlangt.
cat node_modules/shortid/package.json
Ich habe die node_modules aus der ursprünglichen Installation committet, damit das Problem
nach der Ausführung von npm ci offensichtlich ist.