Repository navigation
Resolve Dependabot alerts: dev server, scoped updates, noble signing - #81
Merged
Merged
Conversation
All 20 alerts appeared when package-lock.json was first committed. - Replace the fastify 3 + fastify-static + ws + nodemon dev server with src/server.js: standard library only, Server-Sent Events reload, bound to 127.0.0.1, PORT configurable, and `npm run dev` runs `node --watch`. Removes 99 packages, including fastify, find-my-way, send, cookie, fast-uri and ws. - Update only the alerted packages: shell-quote 1.10.0, qs 6.16.0, brace-expansion 1.1.18, esbuild 0.28.2, and valibot 1.5.0 under bitcoinjs-lib, bip32 and @bitcoinerlab/descriptors. - Rebuild miniscript.js, psbt.js and sp.js on valibot 1.5.0. Their outputs match the previous bundles on 1,053 comparisons. - Build message.js with esbuild (new build_message.js) and route the secp256k1 and elliptic packages to shims over @noble/secp256k1, so BIP-137 and BIP-322 signing no longer use elliptic (GHSA-848j-6mx2-7j84, no fixed release). The build fails if either package is bundled. Signatures are byte-identical to the previous bundle in every deterministic case tested. - Rebuild dist/index.html. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
All 20 open Dependabot alerts appeared on 2026-09-10, when #80 committed
package-lock.jsonand Dependabot could see the whole dependency tree for the first time. This PR clears the 18 development alerts in code. It also removes the reason for the two alerts that affect shipped code, so they can be dismissed once this is merged.Development tooling (18 alerts, never in the downloaded file)
src/server.js, which uses only Node's standard library:src/wwwand reloads open pages over Server-Sent EventsPORTfrom the environment, andnpm run devis nownode --watchnpm updateof only the alerted packages: shell-quote 1.10.0 (2 alerts), qs 6.16.0, brace-expansion 1.1.18 and esbuild 0.28.2. No bundled crypto library changed. A plainnpm updatewould have moved@noble/curvesto 2.x and the@bctsShamir betas, which would stop the lockfile matching the committed bundles.build.jsstrips the new reload script and fails the build if it's still there. The README drops the port 8080 workaround.valibot (#22, runtime)
ecpair. That code only calls validators likev.parseandv.object, never the vulnerableflatten(). It can be dismissed as "vulnerable code not used".elliptic (#9, no fixed release)
secp256k1package, which falls back to elliptic in a browser build.message.jsis now built by a newbuild_message.js(esbuild) from the existing_message_entry.js. Thesecp256k1andellipticpackages are replaced by small shims over@noble/secp256k1. The build fails if either package ends up in the bundle anyway.message.jsgoes from 592 KB to 528 KB and can now be rebuilt from the repo.bitcoin.js,bip32.js,bip47.js,bip85.js,bip86.js). Those use it only for key derivation, and nothing on the page signs with them. Once this is merged, the alert can be dismissed as "vulnerable code not used".Test plan
npm test: all 3 suites pass.message.js, old against new:miniscript.jsandpsbt.js, old against new: 203 comparisons with 0 mismatches. They cover sample descriptors, address derivation, policy compilation, analysis, spend paths and 62 PSBTs.sp.js, old against new: 850 comparisons, 0 mismatches.dist/index.htmlrebuilt: 10.74 MB, down from 10.78 MB.After merging
🤖 Generated with Claude Code