Skip to content

[Snyk] Security upgrade @google-cloud/functions-framework from 1.3.2 to 5.0.0 - #434

Open
benjaminhuo wants to merge 1 commit into
mainfrom
snyk-fix-e34b3ab126ce226f9d2aa6e3cf2346d6
Open

[Snyk] Security upgrade @google-cloud/functions-framework from 1.3.2 to 5.0.0#434
benjaminhuo wants to merge 1 commit into
mainfrom
snyk-fix-e34b3ab126ce226f9d2aa6e3cf2346d6

Conversation

@benjaminhuo

Copy link
Copy Markdown
Member

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/with_framework/package.json
  • builders/testdata/nodejs/functions/with_framework/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

… builders/testdata/nodejs/functions/with_framework/package-lock.json to reduce vulnerabilities

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

Copy link
Copy Markdown
Member Author

Merge Risk: High

This is a major version upgrade from v1.3.2 to v5.0.0, which spans multiple significant breaking changes tied to the evolution of Google Cloud Functions from 1st Generation to 2nd Generation. This upgrade requires mandatory code refactoring and a significant runtime environment update.

Key Breaking Changes:

  • Mandatory API & Signature Changes: The method for defining functions has changed. 1st Gen functions were directly exported. 2nd Gen functions (used by v2.0.0 and later) must be explicitly registered using methods like functions.http() for HTTP triggers and functions.cloudEvent() for event-driven triggers. Your existing function definitions will need to be refactored to use this new registration model.

  • Node.js Runtime Requirement: Version 5.0.0 requires a minimum Node.js version of 22. Support for older, end-of-life Node.js versions has been dropped across the major version releases. You must ensure your deployment environment meets this new requirement.

  • Event Handling with CloudEvents: The structure of event payloads has changed. 2nd Gen functions use the CloudEvents standard, meaning event data is wrapped in a CloudEvent envelope. Logic that directly accesses properties from 1st Gen data and context objects will need to be updated to parse the new CloudEvent structure.

  • Underlying Infrastructure Changes: Since 2nd Gen functions run on Cloud Run, there are new constraints, such as stricter function naming conventions (must comply with RFC 1123, e.g., no uppercase letters or underscores).

Recommendation: This upgrade cannot be performed without significant code changes. It is highly recommended to follow an official migration guide for moving from 1st Gen to 2nd Gen Cloud Functions. You should plan to refactor your function signatures, update your event-handling logic, and ensure your environment uses a supported Node.js version (v22+ for framework v5.0.0).

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