Hacker News new | ask | show | jobs
by pdonis 21 days ago
That's easy to handle: if the signature isn't secure, it doesn't count as an attestation. I have no problem with putting the onus on the person doing the signing to do it right. But at present doing it right on your own is not even an option. Only going through one of the tech giants is.
1 comments

How is PyPI supposed to tell if the person signing the artifacts is handling their key securely?
They can't. But they can't tell for sure if large tech corporations are doing that either. Data breaches are a thing. Auditing Github workflows doesn't prevent them.
These aren't really comparable things.

The fact that a large company can mess things up doesn't change the fact that it's way more viable to review how Github or Gitlab or Codeberg handles key material and security than it is to make a comparable local developer flow that avoids common mistakes like just dropping the signing key on disk on whatever servers you want to run your builds from.

> it's way more viable to review how Github or Gitlab or Codeberg handles key material and security

Only if you already trust them.

> dropping the signing key on disk on whatever servers you want to run your builds from

I run my builds on my local machine. The private key I would use to sign them if PyPI supported that is not anywhere in the repo I'm using.

Of course you would have to trust that I'm telling the truth in what I just said. But, as above, you also need to trust what the large tech forges are telling you in order to review how they handle their keys.

Microsoft can't even figure out how to send email reliably. But sure everyone should trust them with signing packages.
If the PGP key was generated on a yubikey, then the owner of the key can generate and publish an attestation certificate[0][1], and then anybody (including PyPI, I assume) can verify and "gold star" artifacts signed by gpg keys with verified attestations. Pulling a private key off a yubikey isn't super easy, at least not that I know of. Maybe other hardware keys can do similar things?

Seems more straightforward than custom stuff built on OIDC, but I'm not a security guy, so maybe I'm missing something?

[0] - https://developers.yubico.com/PGP/Attestation.html [1] - https://docs.yubico.com/software/yubikey/tools/ykman/OpenPGP...

One missing bit of context here might be that PyPI used to support GPG signing your packages and barely anybody did it. And that’s not even with trying to push for hardware keys to limit user ability to make a mistake.

You can also look to FIDO2 / passkeys to see that a lot of the folks who have concerns about PyPI trusted publishing also view device attestation as a scourge.