Repository navigation
fix(security): remediate production dependency audit findings - #225
Conversation
Upgrades patched direct dependencies, forces patched transitive versions via pnpm.overrides (removing the lone critical shell-quote finding), and documents the remaining accepted findings with owners and expiry dates. Adds a CI gate (pnpm audit:gate) that fails on new critical production dependency findings. Refs wraith-protocol#223
|
@code3ks is attempting to deploy a commit to the truthixify's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@code3ks Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
truthixify
left a comment
There was a problem hiding this comment.
Thanks. Two blockers remain:
- The audit gate treats JSON errors without vulnerability metadata as zero findings and passes. Please require a successful audit result and add a registry-error regression test.
- Global overrides cross declared major ranges: Stellar SDK requests toml 3 but receives 4, Metro and Jayson request ws 7 but receive 8, and Metro requests image-size 1 but receives 2. Please scope or remove these overrides, or add compatibility coverage for every affected path.
The merged-state unit suite otherwise shows only the known #208 failures.
Address the two review blockers on the dependency-audit remediation. - Require a successful audit result. A registry error, a non-JSON response, or a payload without metadata.vulnerabilities now fails CI instead of being read as zero findings, with a regression test in scripts/audit-gate.test.mjs. - Replace the global ws/image-size/toml overrides with path-scoped overrides so no consumer is forced outside the major it declares. ws 7 consumers keep ws 7.5.13; image-size and toml stay scoped to metro and @stellar/stellar-sdk, with compatibility coverage in scripts/dependency-compatibility.test.mjs.
truthixify
left a comment
There was a problem hiding this comment.
The previous blockers are addressed on b5fad70. The audit gate now fails closed on registry/error payloads, and the major-crossing overrides are path-scoped with focused compatibility coverage. I reran the 18 gate/compatibility tests, the live production audit (0 critical, 1 high), and the production build on the merge ref; all pass.
Summary
Remediates the production dependency audit for the demo (issue #223).
Before → after (
pnpm audit --prod):What changed
Upgraded patched direct dependencies (
package.json) and refreshedpnpm-lock.yaml:react-router-dom7.18.4,@stellar/stellar-sdk13.3.0,@ckb-ccc/ccc1.3.6,wagmi2.19.5,@rainbow-me/rainbowkit2.2.11,viem2.57.7,@solana/web3.js1.99.0, the@solana/wallet-adapter-*set,@walletconnect/core+sign-client2.26.0, and@tanstack/react-query5.104.3.Forced patched transitive versions via
pnpm.overridesfor findings onlyreachable deep in the tree:
axios1.20.0,form-data4.0.6,hono4.13.13,socket.io-parser4.2.7,browserslist4.29.3,image-size2.0.4,shell-quote1.12.0 (removes the critical finding),toml4.2.0, andws8.22.0.Documented the unavoidable transitive findings with owner and expiry in
docs/SECURITY_AUDIT.md. The only remaining high isbraces(GHSA-vfj7-8cjw-p6xm) — the latest published release (3.0.3) is the affected
version, and it is only reachable through React Native/Metro build tooling
pulled in by the Solana Mobile wallet adapter (not in the browser bundle).
The remaining moderate/low findings are listed with the same owner/expiry.
Added a CI threshold for new critical findings:
pnpm audit:gate(
scripts/audit-gate.mjs) runspnpm audit --prod --jsonand fails whencritical > 0 (or high > the accepted baseline). Wired into
.github/workflows/ci.yml.Why overrides instead of major bumps
Several advisories (e.g.
axios/tomlvia@stellar/stellar-sdk,axios/wsvia
@ckb-ccc, react-native transitives via the Solana Mobile adapter) only havefixes behind breaking major releases of packages we don't control. Forcing
compatible patched versions keeps runtime behaviour intact; where that is not
possible the finding is documented rather than ignored. The
tomloverride issafe because the demo never calls
StellarToml.Resolver.Verification
pnpm build— passes (tsc + vite + PWA service worker build).pnpm audit:gate—0 critical, 1 high, 8 moderate, 2 low→ gate passes.pnpm test:unit— 266 passed; 2 failures innameWatchlistStore.test.tsarepre-existing and environment-only (jsdom 30 / undici 8.11.2 on Node 20;
both versions are unchanged by this PR and CI runs Node 22).
pnpm format:check— clean.Notes for reviewers
docs/SECURITY_AUDIT.mdare all2027-01-15; adjustthe owner if another team should own these exceptions.
Closes #223