Compromised PyTorch-nightly dependency chain between December 25th – December 30
The only thing that surprises me about such attacks is that they don't happen more often. With Python and Node.js it's now the norm that large packages have hundreds of transitive dependencies. In this case, what happened was dependency confusion because of PyPI taking precedence, but even with such holes plugged the problem remains that by installing a single package, you're potentially trusting hundreds of authors. And yet we <i>do</i> want all these packages, because they solve specific problems in an optimized manner, and we <i>do</i> want anyone to be able to publish packages. I doubt there is a good solution here, ultimately.