Package managers have an integrity problem

Executive Summary

Trail of Bits tested 25 popular package managers for integrity checks against malicious repositories. Fewer than half use lockfiles that automatically verify tampering, and only two verify every downloaded package. Most rely on cryptographic hashes or signatures, but many implementations require extra configuration, use insecure hashes, or lack signatures entirely. The study highlights a wide variance in supply‑chain security across ecosystems.

Original Description

I tested 25 of the most popular package managers to check whether they detect a compromised package repository injecting malicious code into legitimate packages. This code integrity problem could be solved using cryptographic hashes or signatures, but many package managers are still vulnerable to this threat. Of the 25 package managers reviewed1, fewer than half used lockfiles that checked for tampering by default, and only two verified the integrity of every package they downloaded. Supply-c...