Prototype: Plugin keyless verification #1902
Draft
+726
−59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See #1351
Recently, the new sigstore-go was released by the Sigstore community. This is a long-awaited library that provides a Go API for keyless verification, which is what was ultimately needed for TFLint's plugin mechanism.
This PR is a prototype that uses sigstore-go for plugin verification. A stable version of sigstore-go has not yet been released, so this implementation is subject to change in the future. The goal here is a proof of concept.
Once this feature is merged, we will be freed from managing GPG keys embedded in TFLint, and third-party developers can safely provide plugin installations without declaring a
signing_key
.To understand this change, you need to understand Sigstore's underlying technology. The following documentation may be helpful.
Please note that sigstore-go primarily support Sigstore bundles. On the other hand, the TFLint plugin is signed with Cosign, so the common example of sigstore-go is not available out of the box. This may be improved in a future sigstore-go version. This prototype solves this problem by implementing its own entity to satisfy the
SignedEntity
interface.Specifically, what keyless verification does is as follows:
Please read the comments for details.