Skip to content

[Snyk] Security upgrade firebase-functions from 3.3.0 to 7.3.2 - #424

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

[Snyk] Security upgrade firebase-functions from 3.3.0 to 7.3.2#424
caniszczyk wants to merge 1 commit into
mainfrom
snyk-fix-2ce721e248252126cff756e81a21e37d

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_pre_3.4.0/package.json
  • builders/testdata/nodejs/functions/firebase_pre_3.4.0/package-lock.json

Vulnerabilities that will be fixed with an upgrade:

Issue Score
medium severity Uncaught Exception
SNYK-JS-QS-19432019
  738  

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:

🦉 Uncaught Exception

…on & builders/testdata/nodejs/functions/firebase_pre_3.4.0/package-lock.json to reduce vulnerabilities

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

Copy link
Copy Markdown
Author

Merge Risk: High

This is a multi-major version upgrade from v3 to v7, introducing significant and mandatory breaking changes. Developer action is required to address changes in runtime, function definitions, and configuration management.

Key Breaking Changes:

  • Default to 2nd Gen Functions (v6+): The SDK defaults to deploying 2nd generation functions. To keep existing 1st gen functions, you must update all imports from require('firebase-functions') to require('firebase-functions/v1'). Failure to do so will cause deployment errors or unexpected behavior. [1, 3]

  • Removal of functions.config() (v7): The functions.config() API for environment variables has been completely removed. All environment configuration must be migrated to parameterized configuration (e.g., defineString()) or Cloud Secret Manager. Deployments using functions.config() will fail. [1, 8]

  • Node.js Runtime Drops: Support for older Node.js versions has been progressively dropped. v4 dropped support for Node.js 8, 10, and 12, and v7 dropped support for Node.js 16. You must ensure your environment is using a compatible Node.js version (Node.js 18+ is recommended). [1]

  • API and Dependency Changes (v4+):

    • The functions.handler namespace and __trigger object have been removed. [1]
    • Requires updates to peer dependencies like firebase-admin and firebase-functions-test. [1, 6]
    • For App Check users, the allowInvalidAppCheckToken option was replaced by enforceAppCheck. [1]

Recommendation:
This upgrade requires significant code and configuration changes. It is highly recommended to:

  1. Update all 1st gen function imports to use firebase-functions/v1 to maintain existing behavior. [3]
  2. Migrate all environment variables from functions.config() to the new parameterized configuration system or Secret Manager before upgrading. [8, 15]
  3. Thoroughly test the application after updating Node.js versions and all dependencies.

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