-
Notifications
You must be signed in to change notification settings - Fork 4
Update all project dependencies #258
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
Open
justin808
wants to merge
1
commit into
main
Choose a base branch
from
jg-/update-deps
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| require: | ||
| plugins: | ||
| - rubocop-rake | ||
| - rubocop-rspec | ||
|
|
||
|
|
||
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify JWT and dotenv 3.x API compatibility with application code.
Both
jwtanddotenvhave major version bumps (2→3) with breaking changes:JWT 3.0 requires token signatures to be verified before accessing payload, dropped the HS512256 algorithm, and removed deprecated claim verification methods. Dotenv 3.0 introduced several updates and changed how
Dotenv::Railtieis handled.While the PR summary confirms tests pass, ensure the application code:
JWT.decodewith explicit algorithm verification (as per best practices)Dotenv::Railtiestill works asDotenv::Rails)Run the following to verify JWT and dotenv usage patterns:
🏁 Script executed:
Length of output: 218
🏁 Script executed:
Length of output: 931
🌐 Web query:
💡 Result:
Short answer: In ruby-jwt 3.0 the public decode signature is still
JWT.decode(jwt, key = nil, verify = true, options = {}, &keyfinder)
but behavior around the options and algorithm handling changed — decoding now uses the new JWT::Decode class and expects algorithm/algorithm objects via the options (see ALGORITHM_KEYS), and the gem restructured algorithms (custom algorithms must follow the JWT::JWA::SigningAlgorithm interface). See the 3.x docs/changelog for details. [1][2][3]
Sources
🌐 Web query:
💡 Result:
Short answer: ruby-jwt 3.0 removed the old “skip verification by reading payload” behavior — the gem now requires the token signature to be verified before you can access the payload, and several deprecated claim/verify APIs were removed. That’s the breaking change behind “verify=false” style usage. [1][2]
What changed (essentials)
What to do when upgrading
References
If you want, tell me one example of how you currently call JWT.decode or read payload and I’ll show the exact replacement for v3.0.
🏁 Script executed:
Length of output: 1014
Fix JWT.decode call to use JWT 3.x compatible API at lib/core/controlplane_api_direct.rb:92.
The current code uses the deprecated JWT 2.x API which is no longer supported in JWT 3.x. The line
payload, = JWT.decode(api_token[:token], nil, false)will fail at runtime because JWT 3.0 removed the ability to decode/access payloads without signature verification and no longer accepts theverify=falseparameter for skipping verification.This method will throw a JWT::DecodeError when called with JWT 3.x (or later versions). Update this line to pass algorithms via options or use the new JWT::EncodedToken API to maintain compatibility.
🤖 Prompt for AI Agents