Allow jwt 3.x (>= 2.2, < 4)#45
Merged
Merged
Conversation
This matches the same change made in Shopify/minerva-gem v0.12.3 (#260). The only JWT API this gem uses is JWT.encode(payload, key, "RS256") in lib/github_authentication/generator/app.rb, which is unchanged between jwt 2.x and 3.x. All jwt 3.0 breaking changes are on the decode/verify side (mandatory signature verification before payload access, removed deprecated claim methods, stricter base64 decoding, RSA-2048 minimum, removed HS512256/rbnacl algorithms). The current ~> 2.2 pin is blocking downstream consumers from picking up jwt 3.2.0, which resolves a HIGH severity vulnerability (GHSA-c32j-vqhx-rx3x / CVE-2026-45363). Requested by Colin Strong <colin.strong@shopify.com> Co-authored-by: Colin Strong <colin.strong@shopify.com>
3ddf018 to
4db5b8e
Compare
Merged
nightsurgex2
approved these changes
May 21, 2026
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.
Part of https://github.com/shop/issues/issues/46298
Loosens the
jwtdependency from~> 2.2to>= 2.2, < 4so downstream consumers can pick upjwt3.2.0 (which resolves HIGH-sev GHSA-c32j-vqhx-rx3x / CVE-2026-45363).Why this is safe
The only
JWTAPI this gem uses isJWT.encode(payload, key, "RS256")inlib/github_authentication/generator/app.rb. That signature is unchanged betweenjwt2.x and 3.x.All
jwt3.0 breaking changes are on the decode/verify side:None of these affect this gem.
Context
Blocking https://github.com/shop/world/pull/732803 (jwt CVE bump in
areas/platforms/trust-battery).Requested by @colin-strong
Slack thread: https://shopify.enterprise.slack.com/archives/C09FSEMDKL0/p1779375258350209