Migrate from go-jose/v3 to go-jose/v4#881
Conversation
Replace all go-jose/v3 imports with v4 across the codebase. This migration includes handling two breaking changes in v4: 1. ParseSigned now requires explicit algorithm specification to prevent algorithm confusion attacks. All parse calls now accept common algorithms: RS256/384/512, ES256/384/512, PS256/384/512, HS256/384/512, EdDSA, and none (for unsigned tokens). 2. CompactSerialize method renamed to Serialize. The algorithm list currently includes all common algorithms for backward compatibility and may be restricted in future updates for enhanced security. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (24)
📝 WalkthroughWalkthroughUpgrades the Changesgo-jose v3 → v4 Upgrade
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Tools execution failed with the following error: Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error) Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Migrate all go-jose dependencies from v3 to v4 for better security and to keep dependencies up to date.
Changes
github.com/go-jose/go-jose/v3imports with v4 across 25 filesjwt.ParseSigned()calls to explicitly specify allowed algorithms:CompactSerialize()toSerialize()per v4 API changesBreaking Changes Handled
ParseSignedAPI: v4 requires explicit algorithm specification to prevent algorithm confusion attacksCompactSerialize()→Serialize()Testing
Notes
The algorithm list currently includes all common algorithms for backward compatibility. This may be restricted in future updates for enhanced security based on specific use case requirements.
Summary by CodeRabbit
Release Notes
Chores
Tests