News for hackers. Stuff that matters.
Re:Bundling binary tools in Python wheels by westurner on Friday June 17, 2022 @09:24AM (#31777787)
FWICS, wheel has no cryptographic signatures at present:

The minimal cryptographic signature support in the `wheel` reference implementation was removed by dholth;

The GPG ASC signature upload support present in legacy PyPI and then the warehouse was removed by dstufft;

"e2e" TUF is not yet implemented for PyPI, which signs everything uploaded with a key necessarily held in RAM; but there's no "e2e" because packages aren't signed before being uploaded to PyPI. Does twine download and check PyPI's TUF signature for whatever was uploaded?

I honestly haven't looked at conda's fairly new package signing support yet.

FWIR, in comparison to legacy python eggs with setup.py files, wheels aren't supposed to execute code as the user installing the package.

From https://news.ycombinator.com/item?id=30549331 :

https://github.com/pypa/cibuildwheel :

>>> Build Python wheels for all the platforms on CI with minimal configuration.

>>> Python wheels are great. Building them across Mac, Linux, Windows, on multiple versions of Python, is not.

>>> cibuildwheel is here to help. cibuildwheel runs on your CI server - currently it supports GitHub Actions, Azure Pipelines, Travis CI, AppVeyor, CircleCI, and GitLab CI - and it builds and tests your wheels across all of your platforms

Re:Bundling binary tools in Python wheels by woodruffw on Friday June 17, 2022 @10:41AM (#31778910)
You're right, both the infrastructure and metadata for cryptographic signatures on Python packages (both wheels and sdists) isn't quite there yet.

At the moment, we're working towards the "e2e" scheme you've described by adding support for Sigstore[1] certificates and signatures, which will allow any number of identities (including email addresses and individual GitHub release workflows) to sign for packages. The integrity/availability of those signing artifacts will in turn be enforced through TUF, like you mentioned.

You can follow some of the related Sigstore-in-Python work here[2], and the ongoing Warehouse (PyPI) TUF work here[3]. We're also working on adding OpenID Connect token consumption[4] to Warehouse itself, meaning that you'll be able to bootstrap from a trusted GitHub workflow to a PyPI release token without needing to share any secrets.

[1]: https://www.sigstore.dev/

[2]: https://github.com/sigstore/sigstore-python

[3]: https://github.com/pypa/warehouse/pull/10870

[4]: https://github.com/pypa/warehouse/pull/11272