Skip to content

fix(deps): remediate Dependabot npm alerts via lockfile bumps + overrides (#1353) - #1354

Merged
vybe merged 1 commit into
devfrom
feature/1353-dependabot-remediation
Jun 26, 2026
Merged

vybe merged 1 commit into
devfrom
feature/1353-dependabot-remediation

Conversation

@dolho

@dolho dolho commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Clears the remaining fixable npm Dependabot alerts across all three lockfiles. The frontend vite (→8.1.0) and top-level dompurify (→3.4.11) bumps already landed on dev; this PR covers what's still open against the current lockfiles.

Live alert snapshot re-checked via gh api /repos/Abilityai/trinity/dependabot/alerts before starting (the issue's 2026-06-26 snapshot predates ~260 commits of dev movement).

Changes (grouped by lockfile)

src/frontend — dompurify cluster

[email protected] pinned a nested [email protected], which tripped every dompurify advisory against the frontend lockfile even though the direct dep is already 3.4.11. Added an overrides: { "dompurify": "^3.4.11" } entry so monaco dedups to the hoisted 3.4.11 — the nested copy is gone.

root package-lock.json

Package Was Now Note
@hono/node-server 1.19.12 1.19.14 ^1.19.13 override — stays on 1.x to satisfy the MCP SDK's declared ^1.19.9 (avoids the unwanted 2.x major jump)
ip-address 10.1.0 10.2.0
qs 6.15.0 6.15.3

src/mcp-server/package-lock.json

Package Was Now Note
qs 6.15.0 6.15.3
esbuild 0.28.0 0.28.1 dev/build-time

All bumps applied via the existing overrides convention + npm install --package-lock-only (lockfile-only; no node_modules churn).

Verification

  • npm audit — 0 vulnerabilities in all three manifests (both prod-only and full/dev runs).
  • npm install --package-lock-only exits 0 in each dir → lockfiles in sync with package.json.
  • Surgical diffs — only the named packages (+ their in-range transitive sub-deps / esbuild platform binaries) change.

Notes

  • The lone "unpatched" dompurify low (GHSA-x4vx-rjvf-j5p4, range ≤ 3.4.6) is also cleared — 3.4.11 is above its affected range, so no documented exception is needed after all.
  • The HIGH vite CVE is a dev-server fs.deny bypass; prod serves static assets via nginxinc/nginx-unprivileged (not exploitable). Already remediated on dev (vite 8.1.0).
  • CI frontend-e2e revalidates the DOMPurify markdown-render + dev-server surfaces on a fresh npm ci.

Fixes #1353

🤖 Generated with Claude Code

…#1353)

Clears the remaining fixable npm advisories across all three lockfiles.
frontend vite/top-level dompurify were already bumped on dev; this covers
what's left:

- src/frontend: force monaco-editor's nested dompurify 3.2.7 -> 3.4.11 via
  an `overrides` entry (dedups to the hoisted copy), clearing the dompurify
  advisory cluster against the frontend lockfile.
- root: @hono/node-server 1.19.12 -> 1.19.14 (^1.19.13 override, stays on 1.x
  to satisfy the MCP SDK's ^1.19.9 range), ip-address 10.1.0 -> 10.2.0,
  qs 6.15.0 -> 6.15.3.
- src/mcp-server: qs 6.15.0 -> 6.15.3, esbuild 0.28.0 -> 0.28.1.

`npm audit` reports 0 vulnerabilities in all three manifests (prod and dev).

Related to #1353

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@github-actions

Copy link
Copy Markdown

⚠️ Nightly unit-suite check skipped — merge conflict against dev.

Resolve by running git merge dev locally and pushing the result. The next nightly run will re-test once the conflict is gone.

@dolho

dolho commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Functional verification (built + ran, not just npm audit)

Did a clean npm ci from each lockfile and exercised the real surfaces:

mcp-server (qs 6.15.3, esbuild 0.28.1)

frontend (vite 8.1.0, dompurify 3.4.11)

  • npm ci → 321 pkgs, exit 0; monaco-editor's nested [email protected] is gone (deduped to the hoisted 3.4.11 by the override).
  • vite build (production, rolldown) → ✓ built in 2.14s, full asset graph emitted (AgentDetail/Settings/Dashboard/etc.). (The default dist/ is a root-owned Docker leftover so I built to a scratch --outDir; not a dep issue.)
  • DOMPurify 3.4.11 runtime sanitize smoke (the H-005 guard behind utils/markdown.js), incl. its afterSanitizeAttributes link hook:
    input output
    <img src=x onerror=alert(1)> <img src="x">
    <script>alert(1)</script>hi hi
    <svg><script>alert(1)</script></svg> <svg></svg>
    <a href="https://x.com">l</a> …target="_blank" rel="noopener noreferrer"…
    • ALL SANITIZE CHECKS PASS — XSS neutralized, link hook intact.

root (@hono/node-server 1.19.14, ip-address 10.2.0, qs 6.15.3) — npm ci exit 0, pins verified.

Playwright frontend-e2e (full-stack browser path) still runs in CI as the final gate — but build + the security-critical DOMPurify behavior are now proven locally, not just asserted.

@vybe vybe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated: tightly-scoped lockfile-only Dependabot remediation; supply-chain scan clean (registry-only resolved URLs, no install hooks, surgical node_modules deltas), npm audit 0-vuln across all three manifests. Note: frontend-e2e was skipped (no ui label) — DOMPurify dedup not exercised by e2e; risk accepted as version-bumps-in-range. Approving.

@vybe
vybe merged commit 8cdd29c into dev Jun 26, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants