Skip to content

[Snyk] Security upgrade fastify from 4.9.2 to 5.12.2 - #29

Open
malhanpraveen wants to merge 1 commit into
masterfrom
snyk-fix-ab648cf6234ea0a9aa20559374c7ea47
Open

malhanpraveen wants to merge 1 commit into
masterfrom
snyk-fix-ab648cf6234ea0a9aa20559374c7ea47

Conversation

@malhanpraveen

Copy link
Copy Markdown

snyk-top-banner

Snyk has created this PR to fix 4 vulnerabilities in the npm dependencies of this project.

Snyk changed the following file(s):

  • package.json
  • package-lock.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
high severity Improper Validation of Specified Type of Input
SNYK-JS-FASTIFY-19639041
  721  
high severity Improper Validation of Unsafe Equivalence in Input
SNYK-JS-FASTIFY-19639042
  721  
high severity Authentication Bypass Using an Alternate Path or Channel
SNYK-JS-FASTIFY-19639043
  721  
high severity Incorrect Behavior Order: Early Validation
SNYK-JS-FASTIFY-19639040
  716  

Breaking Change Risk

Merge Risk: High

Notice: This assessment is enhanced by AI.


Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.
  • This PR was automatically created by Snyk using the credentials of a real user.

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

For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

@malhanpraveen

Copy link
Copy Markdown
Author

Merge Risk: High

This major version upgrade from Fastify v4 to v5 introduces significant breaking changes that require code modifications and an environment update.

Key Breaking Changes:

  • Node.js Requirement: Fastify v5 drops support for all Node.js versions below v20. An upgrade to Node.js v20 or newer is mandatory. [2, 6]
  • Mandatory Full JSON Schema: The shorthand for defining schemas has been removed. You must now provide a full JSON Schema for querystring, params, body, and response, including the type property. The jsonShortHand option has also been removed. [2, 3, 8]
  • Removal of Deprecated APIs: All APIs deprecated in v4 are now removed. For example, request.connection must be replaced with request.socket. [2]
  • Behavioral Changes: The behavior of some methods has changed. For instance, fastify.hasRoute() now matches the exact route string instead of evaluating a request path. [1] Additionally, the req.params object no longer has a prototype, which may affect how you check for properties (e.g., use Object.hasOwn(req.params, 'name') instead of req.params.hasOwnProperty('name')). [3]

Source: V5 Migration Guide

Recommendation: Before upgrading, ensure your environment is running Node.js v20+. Carefully review the migration guide and update all schema definitions and calls to removed APIs. It is critical to address all deprecation warnings from v4 before attempting this upgrade. [2]

Notice 🤖: This content was augmented using artificial intelligence. AI-generated content may contain errors and should be reviewed for accuracy before use.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants