Skip to content

Commit 01128d0

Browse files
fix: bump uuid to ^11, sinon back to ^17, pin TypeScript to 5.5.4
Three coupled changes to clear the remaining OSV finding cleanly: 1. uuid: ^9.0.0 -> ^11.1.1 (both top-level dep and the override that constrains thrift's transitive uuid). Clears GHSA-w5hq-g745-h8pq (CVSS 7.5, buffer-bounds bug in v3/v5/v6). Driver uses only v4, stringify, NIL — not the vulnerable functions — but the CVE surfaces in consumers' own OSV/Snyk scans against our lockfile, so we need it actually patched, not just suppressed. 2. typescript: ^4.9.3 -> 5.5.4 (exact pin). uuid@11's d.ts uses `export type *` (TS 5.0+). TypeScript is pinned to <5.6 because TS 5.6+ tells @types/node to use its newer generic Buffer declaration (Buffer<TArrayBuffer extends ArrayBufferLike>), which would leak into our published d.ts as `Buffer<ArrayBufferLike>[]` and break consumers on stale @types/node. TS 5.5 uses the ts5.6/ fallback shim that keeps the emit as plain `Buffer[]` — byte-equivalent to today's d.ts. 3. sinon: ^19.0.5 -> ^17.0.2. The sinon@19 bump in this PR was redundant for security (all CVEs in sinon's transitive tree are covered by our existing overrides on flatted, serialize-javascript, etc.) and broke the FeatureFlagCache.test.ts upstream test on Node 16 due to sinon 19's broader fake-timer faking (@sinonjs/fake-timers 13 vs 11). Reverting to ^17.0.2 restores the test pass with no CVE re-introduction. Source change in FederationProvider.ts: TS 5 caught a real but benign type incompatibility between node-fetch's AbortSignal shim and the native AbortSignal that TS 4 missed. Cast the controller signal through `any` — the two are runtime-compatible; this is a typings-only mismatch. Verified locally: - npm ci + npm test pass on Node 16.20.2 and 18.20.8 (904 passing) - OSV-Scanner reports zero findings against the regenerated lockfile - Emitted dist/*.d.ts and dist/*.js diff against current main only in cosmetic ways (removed obsolete /// <reference> directives, preserved source comments, TS 5's improved enum/export emit) — no behavior changes for consumers Co-authored-by: Isaac Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
1 parent 1c00362 commit 01128d0

3 files changed

Lines changed: 86 additions & 108 deletions

File tree

lib/connection/auth/tokenProvider/FederationProvider.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,11 @@ export default class FederationProvider implements ITokenProvider {
163163
'Content-Type': 'application/x-www-form-urlencoded',
164164
},
165165
body,
166-
signal: controller.signal,
166+
// node-fetch ships its own AbortSignal shim that differs slightly
167+
// from the native AbortSignal (subtle `this`-typing mismatch on
168+
// onabort handler). TS 4 didn't catch this; TS 5+ does. The two
169+
// are runtime-compatible, so cast through any.
170+
signal: controller.signal as any,
167171
});
168172

169173
if (!response.ok) {

package-lock.json

Lines changed: 77 additions & 103 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@
7272
"mocha": "^10.8.2",
7373
"nyc": "^15.1.0",
7474
"prettier": "^2.8.4",
75-
"sinon": "^19.0.5",
75+
"sinon": "^17.0.2",
7676
"ts-node": "^10.9.2",
77-
"typescript": "^4.9.3"
77+
"typescript": "5.5.4"
7878
},
7979
"dependencies": {
8080
"apache-arrow": "^13.0.0",
@@ -85,7 +85,7 @@
8585
"openid-client": "^5.4.2",
8686
"proxy-agent": "^6.3.1",
8787
"thrift": "^0.23.0",
88-
"uuid": "^9.0.0",
88+
"uuid": "^11.1.1",
8989
"winston": "^3.8.2"
9090
},
9191
"optionalDependencies": {
@@ -109,6 +109,6 @@
109109
"ip-address": "^10.1.1",
110110
"js-yaml": "^4.1.1",
111111
"micromatch": "^4.0.8",
112-
"uuid": "^9.0.0"
112+
"uuid": "^11.1.1"
113113
}
114114
}

0 commit comments

Comments
 (0)