feat: adds buildkite to trust command - #9888
Open
sj26 wants to merge 2 commits into
Open
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-01a012fc-30d4-70ed-9e1e-ce5a74dc5e1c Co-authored-by: Samuel Cochran <sj26@sj26.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a012fc-30d4-70ed-9e1e-ce5a74dc5e1c Co-authored-by: Samuel Cochran <sj26@sj26.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follows the pattern established in #8909 to add Buildkite to npm's trusted publishing support on the CLI side. This would allow publishing npm packages from Buildkite pipelines with OIDC credentials, with appropriate npm registry support.
Buildkite supports generating OIDC tokens with several claims:
https://buildkite.com/docs/agent/cli/reference/oidc
The equivalent to GitHub owner, repository and workflow file is a Buildkite organization and pipeline. One repository can have many pipelines, and each pipeline can have unique steps, so sensitive actions like deploys or releases can be locked down into particular pipelines with strong access controls. Additional claims can be requested and authorized against for more complex workflows, or to use unique IDs to prevent things like name takeovers, but given the level of claim support and interrogation for other provides this seems like a reasonable starting point.
Here's an example of a similar setup for publishing Rubygems using OIDC credentials:
https://github.com/buildkite-plugins/rubygems-oidc-buildkite-plugin
I will prepare an equivalent Buildkite plugin that could be used with this proposed support.
We would also be quite interested in supporting npm attestations. Buildkite is already supported by sigstore and fulcio, it just needs plumbing.
This code was prepared with @ampcode.
Amp-Thread-ID: https://ampcode.com/threads/T-01a012fc-30d4-70ed-9e1e-ce5a74dc5e1c
References