Skip to content

[Snyk] Security upgrade firebase-functions from 3.4.0 to 7.3.2 - #421

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

[Snyk] Security upgrade firebase-functions from 3.4.0 to 7.3.2#421
caniszczyk wants to merge 1 commit into
mainfrom
snyk-fix-928b6f1ed3352fe6f7b955b801cc52a4

Conversation

@caniszczyk

Copy link
Copy Markdown

snyk-top-banner

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

Snyk changed the following file(s):

  • builders/testdata/nodejs/functions/firebase_multiple_functions_yarn/package.json
  • builders/testdata/nodejs/functions/firebase_multiple_functions_yarn/yarn.lock

Note for zero-installs users

If you are using the Yarn feature zero-installs that was introduced in Yarn V2, note that this PR does not update the .yarn/cache/ directory meaning this code cannot be pulled and immediately developed on as one would expect for a zero-install project - you will need to run yarn to update the contents of the ./yarn/cache directory.
If you are not using zero-install you can ignore this as your flow should likely be unchanged.

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

…arn/package.json & builders/testdata/nodejs/functions/firebase_multiple_functions_yarn/yarn.lock 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 major version upgrade from v3 to v7, introducing significant breaking changes that require code and environment modifications. The risk is high due to mandatory API changes and the shift to 2nd generation functions.

Key Breaking Changes:

  • Default to 2nd Gen Functions (from v6.0.0): Functions now default to the 2nd generation. To continue using 1st generation functions, you must update your import statements from require("firebase-functions") to require("firebase-functions/v1"). Migrating to 2nd gen requires changing imports to be modular, like require("firebase-functions/v2/https"). [1, 4]

  • functions.config() Removal (in v7.0.0): The functions.config() API for environment variables, deprecated in v6, is now removed. You must migrate to the params module or use .env files with Secret Manager for handling configuration and secrets. [1, 9]

  • Node.js Version Drops: Support for Node.js versions 8, 10, 12, and 16 has been dropped across these major versions. Your runtime environment must be updated to a supported version. [1]

  • API and Dependency Changes (in v4.0.0):

    • The functions.handler namespace has been removed. [1]
    • Requires updated versions of firebase-admin (v10+) and firebase-functions-test (v3+). [1]
    • For App Check users, the allowInvalidAppCheckToken option is replaced by enforceAppCheck. [1, 7]

Recommendation:
This upgrade requires careful planning. Before merging, you must:

  1. Decide whether to migrate to 2nd gen functions or stay on 1st gen and update all your import paths accordingly.
  2. Migrate all environment configuration from functions.config() to the new params system.
  3. Ensure your Node.js runtime is updated to a version supported by firebase-functions v7.x.
  4. Update associated dependencies like firebase-admin and firebase-functions-test.

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