refactor(functions-backend): modernize functions emulator and remove dead functions-emulator dependency#16385
refactor(functions-backend): modernize functions emulator and remove dead functions-emulator dependency#16385inlined wants to merge 4 commits into
Conversation
…dead functions-emulator dependency
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
…rm Node.js script
…lows and README, add license header
Generated by 🚫 Danger |
|
@inlined The CI issues should be resolved before review. Would you like assistance? |
|
Sorry, I got pulled into Extensions/Functions stuff and have had trouble getting XCode tools all ready. I'll get to this today |
Security Audit & Remediation: firebase-functions-backend
A. Previous CVEs
Resolved 30 vulnerabilities (20 High, 1 Critical) by purging the deprecated
@google-cloud/functions-emulator:lodash(GHSA-fvqr-27wr-82fm, GHSA-35jh-r3h4-6jhm, GHSA-4xc9-xhrj-v574, GHSA-jf85-cpcp-j695, GHSA-p6mc-m468-83gw)semver(GHSA-c2qf-rxjj-qqgw)tmp(GHSA-52f5-9888-hmc6, GHSA-ph9p-34f9-6g65)http-proxy(GHSA-6x33-pw7p-hmpq)http-cache-semantics(GHSA-rc47-6667-2j5j)node-forge(GHSA-5rrq-pxf6-6jx5, GHSA-wxgw-qj99-44c2, GHSA-gf8q-jrpm-jvxq, GHSA-2r2c-g63r-vccr, GHSA-8fr3-hfg3-gpgp, GHSA-92xj-mqp7-vmcj, GHSA-x4jg-mjrx-434g, GHSA-cfm4-qjh2-4765, GHSA-554w-wpv2-vw27, GHSA-5gfm-wpxj-wjgq, GHSA-65ch-62r8-g69g, GHSA-2328-f5f3-gj25, GHSA-q67f-28xg-22rw, GHSA-5m6q-g25r-mvwx, GHSA-ppp5-5v6c-4jwp)qs(GHSA-6rw7-vpxm-498p)mem(GHSA-4xcv-9jjx-gfj3)yargs-parser(GHSA-p9pc-299p-vxgp)B. Changes Made
@google-cloud/functions-emulator("dead cloud emulator") devDependency frompackage.json.firebase.jsonconfiguration file to run the Functions Emulator on port 5005.start.sh) into a robust cross-platform Node.js script (start.js) and updated CI workflow references and README instructions to invoke it directly.C. Benefits of the Node.js Script over Bash
curlpolling which can yield false positives or fail due to network redirect/error states,start.jsperforms raw TCP dials using standardnet.Socketto verify the emulator is listening on port5005.synchronousmode is handled cleanly using Node's native process spawning APIs (detached: trueandchild.unref()), preventing the background process from being killed by shell-hangup signals (SIGHUP) during runner step transitions.index.js) is written in JavaScript, managing the emulator using Node.js keeps the stack consistent for SDK maintainers.D. Remaining CVEs
uuid< 11.1.1 (required byfirebase-admin).E. Introduced CVEs
F. Testing Strategy
node --check- 100% passing.npm installand verified all packages resolved cleanly.