5 ms·
Pinning doesn’t help you. They can replace the package and you’ll get the new one. You have to vendor the dependencies.
by what 7mo ago
Pinning doesn’t help you. They can replace the package and you’ll get the new one. You have to vendor the dependencies.
- davidatbu 7mo agoI don't think pypi or npm allow replacing existing packages?
- ctmnt 7mo agoThey absolutely do. In this case litellm 1.82.8 had been out for at least a week (can’t recall the exact date offhand). The compromised version was a replacement.
- dot_treo 7mo agoIt actually wasn't. That was one of the reasons why I looked into what was changed. Even 1.82.6 is only at an RC release on github since just before the incident. So the fact that 1.82.7 and then 1.82.8 were released within an hour of each other was highly suspicious.
- cpburns2009 7mo ago1.82.7 and 1.82.8 were only up for about 3 hours before they were quarantined on PyPI.
- ctmnt 7mo agoAh, my mistake! Thanks for the correction. But I believe you can replace versions on both, nonetheless. It’s a multi step process, unpublish then publish again. But the net effect is the same.
- xenophonf 7mo agoPyPI enforces immutable releases. https://pypi.org/help/#file-name-reuse https://pypi.org/help/#file-name-reuse > PyPI does not allow for a filename to be reused, even once a project has been deleted and recreated... > This ensures that a given distribution for a given release for a given project will always resolve to the same file, and cannot be surreptitiously changed one day by the projects maintainer or a malicious party (it can only be removed).
- collinmanderson 7mo agoIf you lock your dependencies, it should fail if the hash doesn't match.
- botch_san 7mo agoPinning the SHA package hash would help? I am not too familiar with Python dependency management, so not sure if this is supported.