Skip to content

[Snyk] Security upgrade firebase-admin from 8.13.0 to 13.10.0 - #350

Open
caniszczyk wants to merge 1 commit into
mainfrom
snyk-fix-ac2386d9df584e05992d000f90f68180
Open

[Snyk] Security upgrade firebase-admin from 8.13.0 to 13.10.0#350
caniszczyk wants to merge 1 commit into
mainfrom
snyk-fix-ac2386d9df584e05992d000f90f68180

Conversation

@caniszczyk

Copy link
Copy Markdown

snyk-top-banner

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

Snyk changed the following file(s):

  • builders/testdata/nodejs/functions/firebase_post_3.4.0/package.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
high severity Improper Verification of Cryptographic Signature
SNYK-JS-NODEFORGE-19635204
  721  

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.

…son to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-NODEFORGE-19635204
@caniszczyk

Copy link
Copy Markdown
Author

Merge Risk: High

This is a major upgrade across five major versions (v8 to v13) of the firebase-admin SDK. It includes significant and mandatory breaking changes, primarily related to Node.js runtime support and a fundamental shift in how the API is used.

Key Breaking Changes:

  • Node.js Version Requirements: The minimum required Node.js version has been increased multiple times. Upgrading to 13.10.0 will require a Node.js runtime of v18 or higher.

    • v10.0.0 dropped support for Node.js 10.
    • v11.0.0 dropped support for Node.js 12.
    • v12.0.0 dropped support for Node.js 14.
    • v13.0.0 dropped support for Node.js 16.
  • Modular API (Introduced in v10.0.0): This is the most significant code-level breaking change. The SDK moved from a namespaced, chained API to a modular, function-based one. This requires substantial code refactoring.

    • Before (v8):

      const admin = require('firebase-admin');  
      admin.initializeApp();  
      const auth = admin.auth();  
    • After (v10+):

      const { initializeApp } = require('firebase-admin/app');  
      const { getAuth } = require('firebase-admin/auth');  
      initializeApp();  
      const auth = getAuth();  
  • Deprecated Methods: Methods on the App object (e.g., app.auth()) were deprecated in v10 in favor of the modular getService(app) pattern.

Recommendation:

This upgrade cannot be performed without significant developer intervention.

  1. Environment Upgrade: Ensure your production and development environments are running Node.js 18 or a higher supported version.
  2. Code Refactoring: Allocate time to refactor your entire codebase to adopt the new modular import style introduced in v10. Follow the official migration guide for detailed instructions.
  3. Staged Upgrade: Consider upgrading major versions incrementally (8 -> 10, 10 -> 11, etc.) in a separate branch to isolate and address breaking changes at each step.

Source: Firebase Admin SDK Release Notes, v10 Migration Guide

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

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants