fix(deps): bump uuid from 8.3.2 to 11.1.1 across the packages that declare it - #11534
fix(deps): bump uuid from 8.3.2 to 11.1.1 across the packages that declare it#11534bsod90 wants to merge 2 commits into
Conversation
…clare it `uuid@^8.3.2` is affected by GHSA-w5hq-g745-h8pq (moderate) — "Missing buffer bounds check in v3/v5/v6 when buf is provided" — first patched in 11.1.1. Nine packages declared it: api-gateway, backend-native, backend-shared, clickhouse-driver, cubestore-driver, databricks-jdbc-driver, playground, schema-compiler and server-core. Chose `^11.1.1` rather than the newest 14.x deliberately: it is the lowest version that clears the advisory, and it dedupes with `cubejs-client-core`, which already declares `^11.1.0` — so the tree ends up with a single 11.1.1 rather than gaining a second modern major. The jump is 8 -> 11 but the API surface used here is unchanged. Every call site uses named imports, all of which v11 still exports: - `v4` (server-core, api-gateway x3, schema-compiler, cubestore-driver, clickhouse-driver, playground, backend-native test) - `v1` + `v5` (backend-shared `process.ts`) - `parse` (server-core `CompilerApi.ts`) Nothing imports the default export, which is what v7 removed. v11 ships dual CJS/ESM with a `require` condition, so the CommonJS consumers here resolve `dist/cjs/index.js` — no ESM interop change. Verified each shape against 11.1.1 rather than assuming: `v5(v1(), v1())` returns a well-formed v5 UUID, `parse(v4())` returns 16 bytes, and `v4()` is distinct across calls. `cubejs-backend-shared` typechecks clean and its 392 tests pass; `processUid` — the one non-v4 consumer — generates correctly from the built output. Note this does not remove uuid 8/9/10 from the lockfile: aws-sdk, sockjs, snowflake-sdk, @google-cloud/storage, @azure/msal-node, @cypress/request, dockerode and gaxios all pull their own copies transitively. Those are outside what this repo declares, and the advisory alert is raised against the declared dependency. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Claude finished @bsod90's task in 2m 53s —— View job Review: mostly sound, but the dedupe claim doesn't hold — 1 medium, 2 lowThe 8 → 11 upgrade is API-safe for every call site in this repo. But the lockfile still resolves Full review — findings, verification, and todo listTodo
Findings1. Medium — the lockfile didn't dedupe; The description states the tree "ends up with a single Yarn v1 left the existing 2. Low — stale
3. Low —
It is safe: v11 still accepts 4. Nit — unrelated lockfile churn The diff also merges What checked out
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #11534 +/- ##
==========================================
- Coverage 84.03% 79.59% -4.45%
==========================================
Files 257 480 +223
Lines 81220 99544 +18324
Branches 0 3636 +3636
==========================================
+ Hits 68253 79229 +10976
- Misses 12967 19796 +6829
- Partials 0 519 +519
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…tubs Two review follow-ups, the first of which is a correction to this PR's own claim. **The lockfile did not dedupe.** The description asserted that `^11.1.1` collapses with `cubejs-client-core`'s `^11.1.0` into a single 11.1.1. It did not: yarn v1 kept the pre-existing `uuid@^11.1.0 -> 11.1.0` resolution rather than re-resolving it upward, so client-core and the transitive `@cubejs-backend/jdbc` still shipped **11.1.0** — which is before the GHSA-w5hq-g745-h8pq fix, i.e. exactly the version this PR exists to remove. The alert would have kept firing on that copy. Bumped `cubejs-client-core` to `^11.1.1` and dropped the stale lock entry so both ranges re-resolve together. Verified from the lockfile rather than asserted this time: `uuid@^11.1.0, uuid@^11.1.1` now share one entry at 11.1.1, and the only 11.x version present is 11.1.1. **Removed six now-obsolete `@types/uuid` declarations** (api-gateway, schema-compiler, server-core, playground, databricks-jdbc-driver, and query-orchestrator, which does not even declare `uuid`). uuid v11 bundles its own types and the DefinitelyTyped stub is deprecated for v7+. TS resolves the bundled `dist/cjs/index.d.ts` first, so this was not breaking a build today — but it left a v8-shaped stub in the tree that could take over under a `typeRoots`/`paths` setup or outlive the runtime dependency. Checked the types actually resolve without the stub: `v4()`, `v5(v1(), v1())` and `parse()` all typecheck under `strict` with `types: []`, against uuid's own declarations, and `@types/uuid` is now absent from both the lockfile and `node_modules`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Claude finished @bsod90's task in 1m 16s —— View job Re-review of
|
| Check | Result |
|---|---|
Declared uuid ranges |
10 packages, all ^11.1.1 |
| Lockfile 11.x entries | one — 11.1.1 |
@types/uuid |
absent from all package.json files and from the lockfile |
| Call sites | 13 imports, all named (v4, v1+v5, parse) — none touch the default export v7 removed |
| Residual old uuid | 8.0.0 / ^8.x / ^9.x / ^10.x remain via third parties only (aws-sdk, sockjs, snowflake-sdk, @cypress/request, dockerode, …) — as the description says, a separate decision |
uuid@^8.3.2is affected byGHSA-w5hq-g745-h8pq(moderate) — "Missing buffer bounds check in v3/v5/v6 when buf is provided" — first patched in 11.1.1.Ten packages now land on
^11.1.1: the nine that declared^8.3.2(api-gateway,backend-native,backend-shared,clickhouse-driver,cubestore-driver,databricks-jdbc-driver,playground,schema-compiler,server-core) plusclient-core, which was on^11.1.0.Why
^11.1.1and not the newest 14.xIt is the lowest version that clears the advisory, and it lets every declared range collapse onto one resolution instead of introducing a second modern major.
Bumping
client-corefrom^11.1.0turned out to be required, not cosmetic: yarn v1 keeps a pre-existing resolution rather than re-resolving it upward, so leaving it alone leftclient-coreand the transitive@cubejs-backend/jdbcon 11.1.0 — before the fix, and exactly the version this PR exists to remove. Verified from the lockfile:The 8 → 11 jump is API-neutral here
Every call site uses named imports, all still exported by v11:
v4v1+v5process.tsparseCompilerApi.tsNothing imports the default export, which is what v7 removed — the usual breakage on this upgrade. v11 ships dual CJS/ESM with a
requirecondition, so the CommonJS consumers resolvedist/cjs/index.js; no interop change.@types/uuidremovedSix packages declared
@types/uuid@^8.3.x(api-gateway,schema-compiler,server-core,playground,databricks-jdbc-driver, andquery-orchestrator— which doesn't even declareuuid). uuid v11 bundles its own types and the DefinitelyTyped stub is deprecated for v7+.This wasn't breaking a build, since TS resolves the bundled
dist/cjs/index.d.tsahead of@types/. But it left a v8-shaped stub that could take over under atypeRoots/pathssetup, or outlive the runtime dependency. It is now absent from both the lockfile andnode_modules.Verification
Runtime shapes checked against 11.1.1 directly:
Types check without the stub —
v4(),v5(v1(), v1())andparse()all compile understrictwithtypes: []against uuid's own declarations.cubejs-backend-sharedtypechecks clean and its 392 tests pass;processUid(the one non-v4consumer) generates correctly from built output.api-gatewayshows no uuid-related type errors.What this does not do
uuid 8/9/10 remain in the lockfile via third parties —
aws-sdk(8.0.0),sockjs,snowflake-sdk,@google-cloud/storage,@azure/msal-node,@cypress/request(^8.x),@google-cloud/bigquery,gaxios(^9.x),dockerode(^10.x). Those are outside what this repo declares and would need upstream bumps or aresolutionsentry — a separate decision. The alert is raised against the declared dependency, which this clears.🤖 Generated with Claude Code