Align release signing with the ruby/actions SignPath pipeline - #10
Open
hsbt wants to merge 3 commits into
Open
Conversation
Git refnames may contain quotes, so an unvalidated tag name could break out of a quoted pwsh string in the release workflow. The same review of the ruby/actions signing pipeline found an equivalent injection through an unanchored version check. ruby/actions#137 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Verification moves into the sign action and uses signtool verify /pa /tw, with optional pinning to the certificate thumbprint. SignPath test certificates are deliberately untrusted, so SIGNPATH_TEST_CERTIFICATE=true switches to a rehearsal check that only asserts a signature from the expected certificate is present. ruby/actions#137 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A manual run builds, signs and verifies exactly like a release, then uploads the signed binaries as a workflow artifact instead of creating a GitHub release. This lets the SignPath pipeline be exercised end to end, including its onboarding review, without cutting a release. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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.
This ports the signing hardening established in ruby/actions#137 to the
rb.exerelease pipeline, ahead of SignPath adding rbmanager as the second project of the ruby organization. Signature verification moves into.github/actions/signand usessigntool verify /pa /tw, with optional pinning viaSIGNPATH_CERTIFICATE_THUMBPRINT. Because SignPath test certificates chain to no trusted root,SIGNPATH_TEST_CERTIFICATE=trueswitches verification to only assert that a signature from the expected certificate is present. Aworkflow_dispatchrun now rehearses the whole pipeline and uploads the signed binaries as a workflow artifact instead of creating a release. The tag name is validated against an anchored pattern before it is interpolated into pwsh. Until the SignPath project variables are filled in, tag pushes keep producing unsigned draft releases as before.ruby/actions#137