r/programming • • Oct 17 '26

Python's binary wheels and supply chain attacks

https://rushter.com/blog/python-binary-wheels/
89 Upvotes

36 comments sorted by

View all comments

2

u/bzbub2 Oct 18 '26

attested provenance via trusted publishing in ci/cd. npm has this I imagine pypi does too https://docs.pypi.org/trusted-publishers/

9

u/PaintItPurple Oct 18 '26

That proves what system published the artifact to PyPI, but doesn't prove that the artifact is benign or that it matches, say, the code in a Git tag named after the version. It moves the attack from "compromise a PyPI token" to "compromise a GitHub Actions (or some other service) token." It's not nothing, but I wonder what percentage of real attacks this prevents.

2

u/bzbub2 Oct 19 '26

trusted publishing can literally say it was generated by git sha, if tag was renamed that is a red flag. compromise of github actions is very real issue too (highly recommend using zizmor to audit your github actions, things like the tanstack hack where hackers poisoned github actions cache would have been trivially flagged by this) but trusted publishing isnt as weak as you make it out to be