Picking Lockfiles: Attacking & Defending Your Supply Chain
summary
Lockfiles can be tampered to redirect a resolved URL, drop integrity hashes, or add extra packages so installers fetch attacker-controlled code; demos change domPurify to donPurify, remove integrity checks, and write /tmp/lol to prove arbitrary code execution. Examples cover Yarn v1/v2, npm v7 and Bundler, and a real repo lockfile of ~16,000 lines. Offensive tooling automates reconnaissance and edits (bumpkey); defensive tooling verifies registry metadata and CI gates changes (untampering my lock file).
AI-written summary · about
