Repository navigation
chore(deps): fix critical and high npm audit advisories - #5500
Conversation
The nightly "Security: JS NPM" audit listed 116 advisories (2 critical,
53 high). Most came from root resolutions whose floors had gone stale,
so raising those floors and refreshing the lockfile clears them.
- protobufjs: the root resolution pinned every copy to 6.11.4, including
the ones dockerode and @grpc/grpc-js ask for at ^7. The 6.x line has no
fix for the 2026 advisories, so the resolution now floors at ^7.6.5 and
js-grpc-common moves from @grpc/proto-loader 0.5 (protobufjs 6) to 0.8,
the same loader @grpc/grpc-js 1.14 already uses.
- tar 7.5.22, node-forge 1.4.0, js-yaml 4.3.2, systeminformation 5.33,
qs 6.16 in dashmate; @grpc/grpc-js 1.14.6 and ws 8.22 in dapi; undici
6.29 in js-dapi-client; pbkdf2 3.1.7 in wallet-lib.
- engine.io 6.6.11, socket.io-parser 4.2.7 and socket.io 4.8.4 (karma).
- uuid 11.1.1 for jayson and dockerode via scoped resolutions; both only
call require('uuid').v4(), which uuid 11 still ships as CommonJS.
- The global brace-expansion resolution is removed: every line now has a
patched release, and forcing v2 onto minimatch 10 (which needs v5)
would break it.
- Lockfile refreshes within existing ranges for fast-uri, picomatch,
flatted, browserslist, babel, http-cache-semantics, ip-address, minimatch,
glob and others.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
After the dependency fixes the nightly audit reports only: - node-forge GHSA-86w9-cpqp-85rv (RSA PKCS#1 v1.5 verification): no patched release exists. Dashmate uses node-forge only to generate keys and sign CSRs and certificates; it verifies signatures with node:crypto. - crypto-js and tsconfck deprecation notices (unmaintained packages, no advisory). Replacing them needs a wallet-lib code change and an @oclif/core v4 upgrade in dashmate. Ignore these by advisory ID rather than excluding the packages, so any new advisory against them still fails the nightly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 58 minutes. View limit details
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 |
|
Waiting for bot review — coderabbitai not yet · thepastaclaw ✓. Wait for the missing reviews, or a writer can post |
|
✅ Final review complete — no blockers (commit 36e9704) · triage: normal |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
Static verification at head 36e9704 confirms that the reviewed commit adds narrowly scoped advisory exceptions, and the node-forge verification vulnerability is not reached by the inspected production callers. No blockers were found; one maintainability suggestion remains about documenting when to remove that exception. Current code checks have passed where completed, two test-suite jobs remain pending, and the PR-title failure rejects the unsupported scope "deps" rather than the configuration change.
🟡 1 suggestion(s)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a cross-cutting dependency and resolution update requiring compatibility checks across multiple JavaScript packages, but dependency bumps do not meet the critical-tier bar. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(lane failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— security-auditor (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `.yarnrc.yml`:
- [SUGGESTION] .yarnrc.yml:26: Document when to remove the node-forge advisory exception
The exception is appropriately narrow and justified for the current call sites, but it remains active even if this advisory later gains a patched release. Yarn filters this advisory ID without checking whether a fix has become available, and the lockfile retains node-forge 1.4.0 across ordinary installs. Unlike the adjacent exceptions, this comment does not state a remediation or removal condition. Add a TODO to upgrade node-forge and remove the exception when a patched release becomes available, so the temporary no-fix rationale does not become a permanent suppression.
| - minimatch # TODO: Update @oclif/core, karma-webpack, mocha https://github.com/advisories/GHSA-3ppc-4f35-3m26 | ||
|
|
||
| npmAuditIgnoreAdvisories: | ||
| - "1240912" # node-forge https://github.com/advisories/GHSA-86w9-cpqp-85rv has no patched release. Dashmate only generates keys and signs CSRs and certificates with node-forge; it verifies signatures with node:crypto X509Certificate |
There was a problem hiding this comment.
🟡 Suggestion: Document when to remove the node-forge advisory exception
The exception is appropriately narrow and justified for the current call sites, but it remains active even if this advisory later gains a patched release. Yarn filters this advisory ID without checking whether a fix has become available, and the lockfile retains node-forge 1.4.0 across ordinary installs. Unlike the adjacent exceptions, this comment does not state a remediation or removal condition. Add a TODO to upgrade node-forge and remove the exception when a patched release becomes available, so the temporary no-fix rationale does not become a permanent suppression.
source: muse-spark-1.3-contributor (phase1-reviewer: general)
Basic explanation
Every night a CI job checks our JavaScript dependencies against the public list of known security problems. It has been failing for over 60 nights, because 116 problems built up while nobody was looking. This PR updates the affected libraries to versions where the problems are fixed. The nightly check now passes.
Most of the old versions were held in place by version pins in the root
package.jsonthat had been added to fix older problems and were never raised again. The biggest one forced every copy ofprotobufjsonto version 6, a line that never received the 2026 fixes, even where dockerode and gRPC asked for version 7.Before, the two critical findings (from
--json, base5303dd391c):After:
Three of the 116 have no fix anywhere, so the second commit ignores them by advisory ID (see "Still open" below). Without that commit the audit reports exactly those three.
Issue being fixed or feature implemented
The scheduled "Security: JS NPM" workflow (
.github/workflows/security-audit-js-npm.yml) only runs at night, not on PRs, so advisories piled up. The two critical ones were on shipped paths:tarin dashmate, andprotobufjsvia dockerode in dashmate.What was done?
Root
resolutionsfloors raised (they force every copy of a package in the tree, so a stale floor keeps the vulnerable version):^6.11.4(resolved 6.11.4)^7.6.5(7.6.6)7.5.107.5.22^6.14.1(6.15.0)^6.16.0(6.16.1)^4.1.1^4.3.2^8.17.1^8.21.0(8.22.0)^4.17.23^4.18.1^6.4.2/^4.2.3^6.6.10/^4.2.7^2.8.1(2.8.3, ip-address 9)^2.8.10(ip-address 10.7.4)^3.3.2^3.4.16(3.4.17)New scoped resolutions:
uuid@^8.3.2anduuid@^10.0.0go to^11.1.1. jayson 4 and dockerode 4 pin older uuid majors, and both only callrequire('uuid').v4()with no arguments. uuid 11 still ships CommonJS, so nothing changes for them.Removed: the global
"brace-expansion": "^2.0.2"resolution. Every brace-expansion line now has a patched release (1.1.21, 2.1.7, 5.0.12). Keeping the global pin would have forced v2 onto minimatch 10, which needs v5's namedexpandexport.Direct dependencies:
js-grpc-common:@grpc/proto-loader^0.5.2to^0.8.0. 0.5 needs protobufjs 6, which has no patched release. 0.8 is the loader@grpc/grpc-js1.14 already uses, and theloadSyncoptions we pass are the same.dapi,dapi-grpc,js-grpc-common:@grpc/grpc-jsfloor^1.14.5(resolves 1.14.6; this fixes the server crash on malformed or compressed messages and thegetAuthContextadvisory). dockerode's copy moves from 1.13.2 to 1.14.6 within its existing^1.11.1range.dashmate: tar 7.5.22, node-forge^1.4.0, js-yaml^4.3.2, systeminformation^5.31.7(5.33.16), qs^6.16.0.js-dapi-client: undici^6.0.0to^6.28.1(6.29.1).dapi,platform-test-suite: ws^8.21.0.wallet-lib: pbkdf2^3.1.7.Lockfile refreshes within existing ranges (
yarn up -R): fast-uri 3.1.9, picomatch 2.3.2, flatted, browserslist, baseline-browser-mapping, @babel/core and @babel/plugin-transform-modules-systemjs 7.29.x, http-cache-semantics, @humanfs/node, @protobufjs/utf8, fast-copy, yaml, socket.io 4.8.4. The refresh also pulled minimatch 3.1.5 / 5.1.9 / 9.0.9, braces and glob 10.5.0. Those were hidden bynpmAuditExcludePackagesbut had patch releases available.Still open
Ignored by advisory ID in
.yarnrc.yml(npmAuditIgnoreAdvisories), so any new advisory on these packages still fails the nightly:<=1.4.0, the latest). Dashmate only uses node-forge to generate keys and sign CSRs and certificates. It verifies signatures withnode:cryptoX509Certificate, so the affected RSA PKCS#1 v1.5 verification path is never called.encrypt/decryptneed a code change to drop it.@oclif/core3 in dashmate;@oclif/core4 drops it, but that is a CLI framework major bump.Still hidden by the existing
npmAuditExcludePackageslist (unchanged by this PR): braces 3.0.3 (karma, no newer release), the leveldb packages in dash-spv, ajv 6 under eslint, elliptic and bn.js under dashcore-lib, plus deprecation notices for glob 7/8, inflight, rimraf 2 and lodash.get.How Has This Been Tested?
yarn install --immutable --immutable-cache --check-cache: clean.yarn npm audit --environment production --all --recursive:No audit suggestions, exit 0.@dashevo/grpc-commontest:coverage(unit + integration, includesloadPackageDefinitionon proto-loader 0.8): 34 passing, coverage thresholds met.@dashevo/dapi-grpctest:unit(loads the real Core/Platform.protodefinitions): 46 passing.@dashevo/dapitest:unit: 144 passing. The integration suite needs a Docker daemon and was not run locally.@dashevo/dapi-clienttest:coverage(unit + integration): 350 passing, 4 pending.dashmatetest:unit: 876 passing.@dashevo/wallet-libmnemonic, Account encrypt and DerivableKeyChain specs (pbkdf2 and crypto-js users): 30 passing.Not run locally: karma browser suites (socket.io / engine.io changed there), platform-test-suite (needs a running network), dashmate integration and e2e.
Breaking Changes
None. Published packages only raise minimum versions within the same major, except
@dashevo/grpc-common's internal@grpc/proto-loader(0.5 to 0.8), whose output we pass straight togrpc.loadPackageDefinition.Checklist:
structure.rs, regeneratedgrovedb-structure.json, and checked the structure viewer link posted on this pull requestFor repository code-owners and collaborators only
🤖 Generated with Claude Code
PR Hygiene ·
36e9704/skip-botsproceeds without the ones not yet reported/self-revieweddashmate(packages/dashmate/package.json) — approved by shumkovWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.