fix(deps): resolve npm audit advisories in root and functions lockfiles - #112
fix(deps): resolve npm audit advisories in root and functions lockfiles#112YasunoriMATSUOKA wants to merge 1 commit into
Conversation
Apply `npm audit fix` to both packages. Only the lockfiles change: every update stays inside the semver range already declared in package.json, so no dependency contract is loosened and no override is added. Root: 19 advisories (1 critical, 10 high, 7 moderate, 1 low) -> 3 moderate. Notable bumps: tar 7.5.16 -> 7.5.22 (critical), react-router(-dom) 7.17.0 -> 7.18.2, postcss 8.5.15 -> 8.5.26, undici 6.26.0 -> 6.28.0, js-yaml 4.2.0 -> 4.3.1, hono 4.12.24 -> 4.13.2, ip-address 10.2.0 -> 10.5.0, fast-uri 3.1.2 -> 3.1.5, form-data 4.0.5 -> 4.0.6, re2 1.24.1 -> 1.26.1, protobufjs 7.6.2 -> 7.6.5, nanoid 3.3.12 -> 3.3.18, brace-expansion across all trees, and firebase-tools 15.19.1 -> 15.27.0 (dev-only, carries the ws 8.21.3 and zod 4.4.3 bumps as its own transitive deps). functions: 8 advisories (4 high, 3 moderate, 1 low) -> 2 moderate. axios 1.17.0 -> 1.19.0, js-yaml 4.2.0 -> 4.3.1 (and 3.14.2 -> 3.15.1), form-data 4.0.5 -> 4.0.6 (and 2.5.5 -> 2.5.6), body-parser 1.20.5 -> 1.20.6, protobufjs 7.6.2 -> 7.6.5, brace-expansion across the tree. The existing `gaxios -> uuid: 11.1.1` override in the root package.json is still required and still resolves cleanly (`npm ls uuid` exit 0) after the firebase-tools bump. Left unfixed on purpose - both are moderate, dev-only, and reachable only through a breaking change that npm would apply as a downgrade: - @opentelemetry/core <2.8.0 (GHSA-8988-4f7v-96qf) via firebase-tools -> @google-cloud/pubsub. The latest firebase-tools (15.27.0) still depends on @google-cloud/pubsub ^5.2.0, whose declared range is @opentelemetry/core ^1.30.1; the patched line is 2.8.0, so any fix means forcing a major across a declared range. - ts-deepmerge <8.0.0 (GHSA-87mf-gv2c-c62c) via firebase-functions-test. The latest firebase-functions-test (3.5.0) declares ts-deepmerge ^2.0.1 and the patched line is 8.0.0, again a major beyond the declared range. Verified: `npm ci` exit 0 in both packages under npm 11 (the version CI's Node 24.x ships), `npm audit --audit-level=high` exit 0 in both, root lint + typecheck + build pass, functions build (tsc) passes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Runs
npm audit fixagainst both packages in this repo (root React/Vite app andfunctions/) and commits the resulting lockfiles.Only
package-lock.jsonandfunctions/package-lock.jsonchange. Nopackage.jsonedits, no newoverrides: every update landed inside a semver range that was already declared, so no dependency contract is loosened and nothing is forced across a declared major.functions/GitHub currently reports 69 open Dependabot alerts on
main(26 high, 39 moderate, 4 low); this closes all of them except the two residual advisories described below.What moved
Root —
tar7.5.16 → 7.5.22 (the only critical: GHSA-w8wr-v893-vjvp and 4 more),react-router/react-router-dom7.17.0 → 7.18.2,postcss8.5.15 → 8.5.26,undici6.26.0 → 6.28.0,js-yaml4.2.0 → 4.3.1,hono4.12.24 → 4.13.2,@hono/node-server1.19.14 → 1.19.17,ip-address10.2.0 → 10.5.0,fast-uri3.1.2 → 3.1.5,form-data4.0.5 → 4.0.6,re21.24.1 → 1.26.1,protobufjs7.6.2 → 7.6.5,nanoid3.3.12 → 3.3.18,body-parser1.20.5 → 1.20.6, andbrace-expansionacross every nested tree.firebase-toolsalso moves 15.19.1 → 15.27.0 (devDependency, within^15.19.1). Thews7.5.11 → 8.21.3 andzod3.25.76 → 4.4.3 entries in the lockfile are firebase-tools' own transitive dependencies, not the app's — the app does not depend on either.The existing
gaxios -> uuid: 11.1.1override in the rootpackage.jsonis still needed and still resolves cleanly after the firebase-tools bump (npm ls uuidexits 0, noELSPROBLEMS).functions/ —
axios1.17.0 → 1.19.0 (10 advisories),js-yaml4.2.0 → 4.3.1 and 3.14.2 → 3.15.1,form-data4.0.5 → 4.0.6 and 2.5.5 → 2.5.6,body-parser1.20.5 → 1.20.6,protobufjs7.6.2 → 7.6.5,brace-expansionacross the tree.Residual advisories (deliberately not fixed)
Both are moderate, both are dev-only (never bundled into the deployed app or into Cloud Functions), and for both the patched line sits beyond the range the parent package declares — so
npm audit fix --force"fixes" them by downgrading the parent, which would be a larger regression than the advisory.@opentelemetry/core <2.8.0, unbounded memory allocation in W3C Baggage propagationfirebase-tools→@google-cloud/pubsub@5.3.1→@opentelemetry/core@1.30.1firebase-tools(15.27.0) still declares@google-cloud/pubsub ^5.2.0, and pubsub 5.x declares@opentelemetry/core ^1.30.1. The patched line is 2.8.0 — reachable only by overriding a transitive dependency past the major its parent declares.npm audit fix --forceinstead downgradesfirebase-toolsto 14.23.0. Risk: the advisory needs attacker-controlled W3C Baggage headers to be parsed; the Firebase CLI is a local/CI developer tool that does not process untrusted baggage headers.ts-deepmerge <8.0.0, prototype method override leads to DoSfirebase-functions-test@3.5.0→ts-deepmerge@2.0.7firebase-functions-test(3.5.0) declarests-deepmerge ^2.0.1; the patched line is 8.0.0 — six majors beyond the declared range, andts-deepmerge8 changed its API.npm audit fix --forcedowngradesfirebase-functions-testto 0.3.3. Risk:firebase-functions-testis a test-only helper and is not currently exercised by any test in this repo.Both should clear on their own once
@google-cloud/pubsub6.x reachesfirebase-toolsandfirebase-functions-testpicks upts-deepmerge8. Neither trips CI, which gates onnpm audit --audit-level=high.Verification
All run locally on Node 24.19.0, matching the
node: ['24.x']matrix in CI:npm ci(root) under npm 11.17.0npm ci(functions/) under npm 11.17.0npm audit --audit-level=high(root)npm audit --audit-level=high(functions/)npm run lint(root)npm run typecheck(root)npm run build(root)npm run build(functions/, tsc)npm ls uuid(root, override integrity)ELSPROBLEMSnpm ciwas deliberately re-run under npm 11.17.0 rather than the locally installed npm 12, because that is the npm that ships with the Node 24.x CI runners — a lockfile regenerated by a newer npm major can otherwise failnpm cion the older one. Both lockfile versions are unchanged by this PR (root stayslockfileVersion: 3,functions/stays2).Not covered: no browser runtime smoke test of the
react-router7.17 → 7.18 bump. It is a minor version within the declared^7.17.0, and the type check and production build both pass, but a runtime check would need real Firebase credentials that are not available locally.Out of scope (noted, not addressed here)
cd functions && npm run lintreports 12 pre-existing@typescript-eslint/no-explicit-anyerrors insrc/utils/symbol/**. They are untouched by this PR — no ESLint or TypeScript version changed infunctions/— and functions lint is not part of CI today. Worth a separate cleanup.