Repository navigation
fix(deps): bump dependencies to clear npm audit - #221
Conversation
Co-authored-by: Toshi <toshi-noreply@coinbase.com> J-Engine-Session: toshi:f7a0ee58-eaed-44af-9e8e-250bed664323
✅ Heimdall Review Status
|
… history Co-authored-by: Toshi <toshi-noreply@coinbase.com> J-Engine-Session: toshi:f7a0ee58-eaed-44af-9e8e-250bed664323
Review round 1Reviewers: cbhq-openai/gpt-6.1-sol, anthropic/claude-opus-5-5
🤖 Reply generated with Toshi |
Co-authored-by: Toshi <toshi-noreply@coinbase.com> J-Engine-Session: toshi:f7a0ee58-eaed-44af-9e8e-250bed664323
Review round 2Reviewers: cbhq-openai/gpt-6.1-sol, anthropic/claude-opus-5-5
🤖 Reply generated with Toshi |
Co-authored-by: Toshi <toshi-noreply@coinbase.com> J-Engine-Session: toshi:f7a0ee58-eaed-44af-9e8e-250bed664323
Co-authored-by: Toshi <toshi-noreply@coinbase.com> J-Engine-Session: toshi:f7a0ee58-eaed-44af-9e8e-250bed664323
Review round 3Reviewers: cbhq-openai/gpt-6.1-sol, anthropic/claude-opus-5-5
🤖 Reply generated with Toshi |
… jest Co-authored-by: Toshi <toshi-noreply@coinbase.com> J-Engine-Session: toshi:f7a0ee58-eaed-44af-9e8e-250bed664323
Review round 4Reviewers: cbhq-openai/gpt-6.1-sol, anthropic/claude-opus-5-5
🤖 Reply generated with Toshi |
Co-authored-by: Toshi <toshi-noreply@coinbase.com> J-Engine-Session: toshi:f7a0ee58-eaed-44af-9e8e-250bed664323
Review round 5Reviewers: cbhq-openai/gpt-6.1-sol, anthropic/claude-opus-5-5
🤖 Reply generated with Toshi |
| const NonnegativeIntegerSchema = z | ||
| .number() | ||
| .nonnegative() | ||
| .refine(Number.isInteger, { error: 'Expected integer, received float' }); |
There was a problem hiding this comment.
This keeps accepting integers above Number.MAX_SAFE_INTEGER, which JSON.parse has already rounded (9007199254740993 parses as 9007199254740992). No valid config needs them: ledgerId is the hardened account index in m/44'/60'/${ledgerAccount}'/0/0 (at most 2^31 - 1) and buffer is a percentage (0 to 100 in genValidationFile.ts). Keep z.number().int().nonnegative(): zod 4's safe-integer bound is the stricter correct check, and NonnegativeIntegerSchema, its comment and the 2^53 test can go.
There was a problem hiding this comment.
Fixed in 7867b57. ledgerId and buffer are back to z.number().int().nonnegative(), so config-schemas.ts matches main. Zod 4's safe-integer bound now rejects 2^53, and the parser test pins that. NonnegativeIntegerSchema, its comment, and the 2^53 acceptance test are gone. Checked: ledgerId only feeds the Ledger accountIndex (src/app/api/sign/route.ts:86), and --l2-gas-buffer is capped at 0–100 (scripts/genValidationFile.ts:137).
🤖 Reply generated with Toshi
Co-authored-by: Toshi <toshi-noreply@coinbase.com> J-Engine-Session: toshi:f7a0ee58-eaed-44af-9e8e-250bed664323
|
Review Error for xenoliss @ 2026-10-31 08:29:12 UTC |
What changed? Why?
npm auditreported 25 vulnerabilities (3 critical, 12 high, 4 moderate, 6 low). This bumps dependencies so it reportsfound 0 vulnerabilities.Direct dependencies (all still exact-pinned):
test-exclude@7, so glob 7 / inflight are gone without an override)The rest (sharp, handlebars, js-yaml, browserslist, source-map-js, ip-address, brace-expansion, …) clear through the regenerated lockfile. ESLint stays on 9.
Overrides:
brace-expansion, bothjs-yamlpins andip-addresspinned vulnerable versions;babel-plugin-istanbul/test-exclude/globare no longer needed with Jest 30.5;postcssandnanoidresolve the same versions without them.jest-config > deepmerge: 4.1.1. GHSA-gcqx-w48m-w2h4 affects deepmerge>=4.2.0 <=4.3.1, and 4.3.1 is the latest release, so the override selects 4.1.1, the newest release outside the reported range.DEPENDENCY-OVERRIDES.mddocuments it, andnpm run check-overrides(now unit-tested) reports when it can be removed.node-releases,electron-to-chromium,caniuse-lite) are pinned in the lockfile to the releases just before the StepSecurity 2-day cooldown window.zod 4 migration: no schema code changes. zod 4's
.int()also rejects integers aboveNumber.MAX_SAFE_INTEGER, which zod 3 accepted;ledgerId(Ledger account index) and the gasbuffer(0–100 percent) never need such values, andJSON.parsealready rounds them. A parser test pins that2^53is rejected.Notes to reviewers
npm auditbut is not safer: 4.1.1 predates the prototype-pollution guard that 4.2.0 added. It is accepted because jest-config's only call merges trusted repo config (preset.globalswithoptions.globals). The alternative is keeping 4.3.1 and accepting one dev-only audit finding./api/sign's 400 error text, and nothing matches on it. zod 4 also trims whitespace aroundrpcUrlin the parsed value; which inputs pass is unchanged.with { type: 'json' }is deprecated (trusted-root.json,contracts.json); it becomes an error only in the next Jest major.@parcel/watcher(has an install script; prebuilt binaries are optional deps).How has it been tested?
On the committed HEAD after
rm -rf node_modules && npm ci(no deprecation warnings):npm audit: found 0 vulnerabilitiesnpm run build,npm run lint,npm run format:check,npx tsc --noEmit: passnpm testandnpm run test:coverage: 16 suites, 171 tests passnpm run check-overrides: exits 1 (deepmerge override still needed)