Skip to content

chore: modernize jest and dependencies, fix path parameter security bug#67

Open
inlined wants to merge 6 commits into
mainfrom
inlined.path-exploit-fix
Open

chore: modernize jest and dependencies, fix path parameter security bug#67
inlined wants to merge 6 commits into
mainfrom
inlined.path-exploit-fix

Conversation

@inlined

@inlined inlined commented Jul 25, 2026

Copy link
Copy Markdown
Member

Security Audit & Remediation: firestore-bundle-builder

A. Previous CVEs

B. Changes Made

  • Changed the .map() path parameterization logic in parameterizePath to validate path segments, ensuring they don't contain any slashes (/), and throw HttpsError('invalid-argument', "Invalid argument provided for $part).
  • Modernized Jest and dependencies to v29+, resolving several high/critical CVEs.
  • Moved compile-time types/runners (@types/jest, jest, ts-jest, typescript, ts-node, tslint) to devDependencies.
  • Updated firebase-functions to 7.3.0
  • Updated firebase-admin to ^12.7.0, @google-cloud/firestore to ^7.7.0, and @google-cloud/storage to ^7.7.0.
  • Promoted execution engine in extension.yaml from nodejs14 to nodejs18 and updated engines.node in package.json to >=22.
  • Fixed a parameterization key mapping and relative path definition bug in tests to cleanly enable and run unit tests.

C. Remaining CVEs

  • None directly in target dependencies.

D. Introduced CVEs

  • None.

E. Testing Strategy

  • Ran unit tests in bundle.test.ts (100% passing).
  • Validated with the automated linter.

Release Notes

relnote: chore: modernize dependencies and fix path traversal vulnerability in path parameterizer

@wiz-9635d3485b

wiz-9635d3485b Bot commented Jul 25, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities 2 High 4 Medium
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 2 High 4 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

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 the Node.js runtime to version 18, updates several dependencies, and introduces security enhancements to the path parameterization logic to prevent path injection and empty path parameters. A review comment points out that the check if (!val) in parameterizePath will incorrectly reject valid falsy values like 0 or false. It is recommended to explicitly check for undefined, null, or "" instead, as well as fix a misleading type annotation and a typo in the log messages.

Comment thread functions/src/build_bundle.ts Outdated
inlined and others added 2 commits July 24, 2026 18:22
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@inlined
inlined requested a review from huangjeff5 July 25, 2026 01:23
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.

1 participant