Skip to content

fix: audit dependencies and replace deprecated url.parse usage - #10923

Open
inlined wants to merge 1 commit into
mainfrom
inlined/url-fix-security-audit
Open

fix: audit dependencies and replace deprecated url.parse usage#10923
inlined wants to merge 1 commit into
mainfrom
inlined/url-fix-security-audit

Conversation

@inlined

@inlined inlined commented Aug 12, 2026

Copy link
Copy Markdown
Member

Security Audit & Remediation: firebase-tools

A. Previous CVEs

  • GHSA-3h5v-q93c-6h6q - ws (Severity: High)
  • GHSA-mp7j-qc5w-4988 - websocket-driver (Severity: Critical)
  • GHSA-xv26-6w52-cph6 - websocket-driver (Severity: Critical)
  • DEP0169 - Legacy url.parse() deprecation in authentication flow
  • 79 total vulnerabilities identified during baseline scan (4 critical, 39 high, 29 moderate, 7 low)

B. Changes Made

  • Updated direct and transitive dependencies via npm update.
  • Added overrides in package.json for ws, uuid, postcss, tar-fs, undici, re2, gaxios, and google-auth-library.
  • Replaced deprecated url.parse() usage with modern new URL() API in src/auth.ts to resolve Node.js DEP0169 deprecation warnings.
  • Refactored winston log formatter in src/logger.ts for compatibility with upgraded winston/triple-beam types.

C. Remaining CVEs

  • protobufjs-cli via firebase-admin@11 -> google-gax: Transitive dependency; no non-breaking fix available upstream (requires major upgrade to firebase-admin@14).
  • vite / esbuild: DevDependency; requires major version upgrade to vite@8.
  • next: DevDependency; requires major version upgrade to next@16.

D. Introduced CVEs

  • None.

E. Testing Strategy

  • Executed unit test suite (npm test, npm run mocha:fast, npx mocha src/utils.spec.ts) - passing.
  • Verified TypeScript compilation (npm run test:compile) - 0 errors.
  • Executed linter and code formatter (npm run lint:changed-files, npm run format).
  • Ran firebase login to test new "new URL" logic

Release Notes

relnote: Audit dependencies, remediate CVEs, and replace deprecated url.parse usage with standard URL API.

@wiz-9635d3485b

wiz-9635d3485b Bot commented Aug 12, 2026

Copy link
Copy Markdown

Wiz Scan Summary

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

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

@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 replaces the deprecated url.parse() with the URL API, refactors the deployment executor to use retry predicates instead of numeric codes, and implements automatic cleanup of newly created service accounts on 100% deployment failure. Feedback on the changes highlights a potential secondary crash in the isServiceAccount404 error handler, multiple violations of the repository style guide regarding the use of any as an escape hatch in Cloud SQL connector files, and an incomplete synchronous implementation of addUserProjectAndAuthHeaders in FBToolsAuthClient.

Comment thread src/deploy/functions/release/executor.ts
Comment thread src/gcp/cloudsql/connect.ts Outdated
Comment thread src/gcp/cloudsql/connect.ts Outdated
Comment thread src/gcp/cloudsql/fbToolsAuthClient.ts Outdated
Comment thread src/gcp/cloudsql/fbToolsAuthClient.ts Outdated
@inlined
inlined force-pushed the inlined/url-fix-security-audit branch from 18df973 to 830b074 Compare August 12, 2026 01:22
@inlined inlined changed the title inlined/url fix security audit fix: audit dependencies and replace deprecated url.parse usage Aug 12, 2026
@inlined
inlined force-pushed the inlined/url-fix-security-audit branch 3 times, most recently from 6fbc53d to 181a442 Compare August 12, 2026 01:57
@inlined
inlined requested a review from joehan August 12, 2026 01:59
@inlined
inlined force-pushed the inlined/url-fix-security-audit branch 2 times, most recently from f8252ce to 499887c Compare August 12, 2026 17:31

@joehan joehan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like you need to lint + fix some shrinkwrap issues, but if we get the tests passing I think this is a good change

@inlined
inlined force-pushed the inlined/url-fix-security-audit branch from 499887c to f78ec23 Compare August 13, 2026 01:04
@inlined
inlined requested a review from joehan August 13, 2026 16:15
@inlined
inlined force-pushed the inlined/url-fix-security-audit branch from 5801c47 to 1988f44 Compare August 14, 2026 01:33
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