Skip to content

chore: upgrade firebase-admin and firebase-functions in E2E tests#10793

Merged
joehan merged 6 commits into
mainfrom
fix-e2e-vulns-upgrades
Jul 15, 2026
Merged

chore: upgrade firebase-admin and firebase-functions in E2E tests#10793
joehan merged 6 commits into
mainfrom
fix-e2e-vulns-upgrades

Conversation

@joehan

@joehan joehan commented Jul 13, 2026

Copy link
Copy Markdown
Member

This PR addresses vulnerabilities in E2E tests by upgrading dependencies and fixing compatibility issues:

Updates:

  1. Upgraded firebase-admin to ^13.10.0 and @google-cloud/pubsub to ^5.3.1 in E2E tests to fix nested vulnerabilities (specifically protobufjs and uuid) without using forced overrides.
  2. Upgraded firebase-functions to ^7.2.5 (latest) across most E2E test directories:
    • scripts/triggers-end-to-end-tests/triggers/
    • scripts/triggers-end-to-end-tests/v1/
    • scripts/triggers-end-to-end-tests/v2/
    • scripts/webframeworks-deploy-tests/functions/
    • scripts/extensions-emulator-tests/functions/
    • scripts/test-project/functions/
    • scripts/functions-discover-tests/fixtures/yarn-workspaces/packages/functions/
    • scripts/functions-deploy-tests/functions/
  3. Removed --legacy-peer-deps from E2E runner scripts (triggers-end-to-end-tests, webframeworks-deploy-tests, extensions-emulator-tests, functions-deploy-tests) since upgrading both firebase-functions and firebase-admin resolved the peer dependency conflicts at the package level.
  4. Fixed v1 trigger compatibility with v7: Imported from "firebase-functions/v1" in triggers-end-to-end-tests/v1/index.js and functions-deploy-tests/functions/fns.js because firebase-functions v7 root namespaces default to v2, causing v1 extraction to fail.
  5. Resolved duplicate @firebase/app runtime error: Removed the outdated @firebase/database-compat@0.1.2 dependency from triggers and v1 packages to ensure only a single version of @firebase/app is resolved in the tree.

Emulator Tests Exception:

  • We kept scripts/emulator-tests/functions/package.json at firebase-functions: ^5.1.0 (and retained --legacy-peer-deps in scripts/emulator-tests/run.sh).
  • Reason: Upgrading it to v6 or v7 breaks 50+ emulator tests (like functionsEmulatorRuntime.spec.ts) that dynamically generate function definitions using require("firebase-functions") and expect v1 APIs at the root. Rewriting all these tests to load /v1 is out of scope for this PR. Testing the emulators with v5 functions remains valid.

@wiz-9635d3485b

wiz-9635d3485b Bot commented Jul 13, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities 2 Medium
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 2 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request upgrades firebase-admin to ^13.10.0 across multiple test suites and adds --legacy-peer-deps to several installation scripts to prevent peer dependency conflicts. The review feedback highlights that several test suites (such as extensions-emulator-tests, functions-deploy-tests, and test-project) upgraded firebase-admin but did not update their installation scripts to use --legacy-peer-deps, which will cause peer dependency conflicts. Additionally, it is recommended to use npm ci --legacy-peer-deps instead of npm install --legacy-peer-deps in scripts/triggers-end-to-end-tests/run.sh for consistency and faster, more reliable builds.

Comment thread scripts/extensions-emulator-tests/functions/package.json
Comment thread scripts/functions-deploy-tests/functions/package.json
Comment thread scripts/test-project/functions/package.json
Comment thread scripts/triggers-end-to-end-tests/run.sh Outdated
@joehan joehan changed the title chore: upgrade firebase-admin and pubsub in E2E tests chore: upgrade firebase-admin and firebase-functions in E2E tests Jul 15, 2026
@joehan
joehan enabled auto-merge (squash) July 15, 2026 16:43
@joehan
joehan merged commit c925ef7 into main Jul 15, 2026
52 of 53 checks passed
@joehan
joehan deleted the fix-e2e-vulns-upgrades branch July 15, 2026 16:53
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