Skip to content
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

fix: Security upgrade jsonwebtoken from 8.5.1 to 9.0.0 #128

Merged
merged 2 commits into from
Jul 16, 2023

Conversation

parseplatformorg
Copy link

This PR was automatically created by Snyk using the credentials of a real user.


Snyk has created this PR to upgrade jsonwebtoken from 8.5.1 to 9.0.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


Warning: This is a major version upgrade, and may be a breaking change.

  • The recommended version is 1 version ahead of your current version.
  • The recommended version was released 5 months ago, on 2022-12-21.

The recommended version fixes:

Severity Issue PriorityScore (*) Exploit Maturity
Improper Authentication
SNYK-JS-JSONWEBTOKEN-3180022
534/1000
Why? Has a fix available, CVSS 6.4
No Known Exploit
Improper Restriction of Security Token Assignment
SNYK-JS-JSONWEBTOKEN-3180024
534/1000
Why? Has a fix available, CVSS 6.4
No Known Exploit
Use of a Broken or Risky Cryptographic Algorithm
SNYK-JS-JSONWEBTOKEN-3180026
534/1000
Why? Has a fix available, CVSS 6.4
No Known Exploit

(*) Note that the real score may have changed since the PR was raised.

Release notes
Package name: jsonwebtoken
  • 9.0.0 - 2022-12-21
    • Check if node version supports asymmetricKeyDetails

    • Validate algorithms for ec key type

    • Rename variable

    • Rename function

    • Add early return for symmetric keys

    • Validate algorithm for RSA key type

    • Validate algorithm for RSA-PSS key type

    • Check key types for EdDSA algorithm

    • Rename function

    • Move validateKey function to module

    • Convert arrow to function notation

    • Validate key in verify function

    • Simplify if

    • Convert if to switch..case

    • Guard against empty key in validation

    • Remove empty line

    • Add lib to check modulus length

    • Add modulus length checks

    • Validate mgf1HashAlgorithm and saltLength

    • Check node version before using key details API

    • Use built-in modulus length getter

    • Fix Node version validations

    • Remove duplicate validateKey

    • Add periods to error messages

    • Fix validation in verify function

    • Make asymmetric key validation the latest validation step

    • Change key curve validation

    • Remove support for ES256K

    • Fix old test that was using wrong key types to sign tokens

    • Enable RSA-PSS for old Node versions

    • Add specific RSA-PSS validations on Node 16 LTS+

    • Improve error message

    • Simplify key validation code

    • Fix typo

    • Improve error message

    • Change var to const in test

    • Change const to let to avoid reassigning problem

    • Improve error message

    • Test incorrect private key type

    • Rename invalid to unsupported

    • Test verifying of jwt token with unsupported key

    • Test invalid private key type

    • Change order of object parameters

    • Move validation test to separate file

    • Move all validation tests to separate file

    • Add prime256v1 ec key

    • Remove modulus length check

    • WIP: Add EC key validation tests

    • Fix node version checks

    • Fix error message check on test

    • Add successful tests for EC curve check

    • Remove only from describe

    • Remove only

    • Remove duplicate block of code

    • Move variable to a different scope and make it const

    • Convert allowed curves to object for faster lookup

    • Rename variable

    • Change variable assignment order

    • Remove unused object properties

    • Test RSA-PSS happy path and wrong length

    • Add missing tests

    • Pass validation if no algorithm has been provided

    • Test validation of invalid salt length

    • Test error when signing token with invalid key

    • Change var to const/let in verify tests

    • Test verifying token with invalid key

    • Improve test error messages

    • Add parameter to skip private key validation

    • Replace DSA key with a 4096 bit long key

    • Test allowInvalidPrivateKeys in key signing

    • Improve test message

    • Rename variable

    • Add key validation flag tests

    • Fix variable name in Readme

    • Change private to public dsa key in verify

    • Rename flag

    • Run EC validation tests conditionally

    • Fix tests in old node versions

    • Ignore block of code from test coverage

    • Separate EC validations tests into two different ones

    • Add comment

    • Wrap switch in if instead of having an early return

    • Remove unsupported algorithms from asymmetric key validation

    • Rename option to allowInvalidAsymmetricKeyTypes and improve Readme

    • 9.0.0

    • adding migration notes to readme

    • adding changelog for version 9.0.0

    Co-authored-by: julienwoll julien.wollscheid@auth0.com

  • 8.5.1 - 2019-03-18

    8.5.1

from jsonwebtoken GitHub release notes
Commit messages
Package name: jsonwebtoken

Compare


Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

@parse-github-assistant
Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title [Snyk] Upgrade jsonwebtoken from 8.5.1 to 9.0.0 refactor: Upgrade jsonwebtoken from 8.5.1 to 9.0.0 Jun 5, 2023
@parse-github-assistant
Copy link

parse-github-assistant bot commented Jun 5, 2023

Thanks for opening this pull request!

  • ❌ Please link an issue that describes the reason for this pull request, otherwise your pull request will be closed. Make sure to write it as Closes: #123 in the PR description, so I can recognize it.

@codecov
Copy link

codecov bot commented Jul 16, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.11 🎉

Comparison is base (650993d) 93.42% compared to head (32d6f1c) 93.53%.

❗ Current head 32d6f1c differs from pull request most recent head f56f106. Consider uploading reports for the commit f56f106 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #128      +/-   ##
==========================================
+ Coverage   93.42%   93.53%   +0.11%     
==========================================
  Files          23       23              
  Lines         578      588      +10     
==========================================
+ Hits          540      550      +10     
  Misses         38       38              
Impacted Files Coverage Δ
lib/notification/index.js 100.00% <ø> (ø)
lib/notification/apsProperties.js 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mtrezza mtrezza changed the title refactor: Upgrade jsonwebtoken from 8.5.1 to 9.0.0 fix: Upgrade jsonwebtoken from 8.5.1 to 9.0.0 Jul 16, 2023
@mtrezza mtrezza changed the title fix: Upgrade jsonwebtoken from 8.5.1 to 9.0.0 fix: Security upgrade jsonwebtoken from 8.5.1 to 9.0.0 Jul 16, 2023
@mtrezza mtrezza linked an issue Jul 16, 2023 that may be closed by this pull request
@mtrezza mtrezza merged commit 5bc179d into master Jul 16, 2023
5 checks passed
@mtrezza mtrezza deleted the snyk-upgrade-8514c8221c712cfb1766b9641d8a79e1 branch July 16, 2023 12:23
parseplatformorg pushed a commit that referenced this pull request Jul 16, 2023
## [5.2.1](5.2.0...5.2.1) (2023-07-16)

### Bug Fixes

* Security upgrade jsonwebtoken from 8.5.1 to 9.0.0 ([#128](#128)) ([5bc179d](5bc179d))
@parseplatformorg
Copy link
Author

🎉 This change has been released in version 5.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade jsonwebtoken library
3 participants