-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Support for signatures via sigstore stack #745
Comments
Thanks for this proposal. I'll list several thoughts:
As we get through this, we can talk more about how the signatures would be stored in the releases and checked by krew. But for now, it's better if we work on answers to these first. I truly appreciate the effort here. /cc @chriskim06 |
Hi Ahmet! Let me go through each of your points one by one:
I don't think this is so different to what Linux distributions do. Linux distributions are packaging foreign software and I honestly doubt that maintainers look into each commit of the packaged software. I am an Arch Linux maintainer myself, thus relying on the same trust you have to the plugin developers. The only difference between Linux distributions and krew might be, that Linux distributions tend to build the software on their own, while krew downloads pre-build binaries. How is brew doing this?
Sigstore is not only about signing artifacts. I think the most interesting part about it is the transparency log. Yes, you have checksums and you download the binaries via HTTPS. This alone is already a good protection, especially in addition to HSTS, DNSSEC or other features the people might use anyway, but still I think it is not that different to Linux distributions. As you know, supply chain security is much more than just signing releases. It is also about creating a software bill of materials and making each step in the chain verifiable and transparent. However, while writing this I am missing a good answer to your question, too. To be honest, I have to admit that I have to back-off a little bit and "Proposal" might be the wrong wording for this issue. We might should see this as an open discussion and potential mind map for having a deeper look into the krew supply chain system (I might be a little bit rushy sometimes regarding new ideas :D ).
Making it mandatory would only work over a very long grace period, I completely agree here with you.
IMO, this might be even faster than just 5-10min. The sigstore stack makes signing very easy, especially with Goreleaser. I see that there are a few python or bash plugins as well.. signing those shouldn't be that complicated, too. Some random thoughtsI spend some time on sketching the usual plugin release process: This supply chain may be different depending on the maintainer, but it should match most plugins (I guess?!).
As you wrote earlier verifying if the release really comes from the Github Account is quite pointless, because the new release will only land in the index, if a PR for the plugin has been opened. Hence, if an attacker has access to the Github account he is able to create a malicious commit and release a new build. The only benefit I see at the moment is the transparency log. With the transparency log it is possible to pin a tag to a specific Github action pipeline workflow and to a fixed datetime. I think what we are actually looking for is end-to-end security in terms of: The maintainer signs a tag, the krew plugin sees the signed tag verifies it, adds it to the SBOM and starts the build.. pipeline then creates a PR and the krew index would auto-approve the new release if successfully verified. @dlorenc do you see a benefit that I might not see? Every layer security makes it more difficult to tamper with the supply chain. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
Summary
As of today (2021-11-29), krew does not support signature validation for itself nor for its plugins. Supporting signed release is non-trivial and GPG/OpenPGP is known to be difficult and error-prone. Although, downloads of krew and its plugins are secured by HTTPS on the transport way, this is not enough.
This proposal intends to provide signatures and signature validation via the sigstore stack. The following sigstore components are relevant for this issue:
Advantages of the Sigstore stack:
Architecture
The architecture is rather simple. In Krew we would use the cosign library to validate signed plugin releases via the rekor transparency log. Generating keyless signatures works as follows:
Examples
Milestones
Long Term Goals
I am willing to contribute PRs, if I get the proper guidance and mentoring :)
The text was updated successfully, but these errors were encountered: