PyTorch and the PyPI supply chain
PyTorch and the PyPI supply chain
Posted Jan 26, 2023 17:27 UTC (Thu) by irvingleonard (guest, #156786)Parent article: PyTorch and the PyPI supply chain
1. You could use your private index by disabling PYPI altogether and provide every possible dependency. It would work for your package but break every other one out there.
2. You could embrace PYPI and don't use a private index. This might be not feasible for political (or technical?) reasons.
3. You could use them both at the same time, which is what they ended up doing.
Now, the problem is that if you use PYPI you have to play by its rules. Package names are an asset on PYPI: the first one that claims it will own it. They obviously didn't read that memo and got bitten by it. The "solution" was as simple as publishing a dummy package in PYPI with a very low version number for every "private" package that only lived in their private index. That dummy package could be a simple readme with the instructions on how to reach the private index and with that they would have prevent the hijacking.
Am I wrong in this analysis?
