Repository navigation
Remediate dependency advisories + add audit CI gate (closes #1728, #1719) - #1745
Conversation
) Rust (cargo audit, .cargo/audit.toml): - cargo update: crossbeam-epoch 0.9.20 (RUSTSEC-2026-0204), quinn-proto 0.11.16 (RUSTSEC-2026-0185). - Allowlist 6 upstream-blocked vulns w/ justification: quick-xml x2 (pinned by tauri/plist), rustls-webpki x4 (0.102.8 pinned by libsql 0.6.0; fixed 0.103.13 already in tree). Tracked for follow-up. npm (bun audit via scripts/audit-npm.ts): - package.json overrides pin patched versions of 14 prod/framework advisories incl. critical shell-quote, high @grpc/grpc-js, protobufjs, devalue, lodash-es, form-data; plus dompurify (3.4.7 - the Happy-DOM sanitization ceiling), svelte, @sveltejs/kit, mermaid, postcss, uuid, ws, js-yaml. - scripts/audit-npm.ts wraps bun audit and fails on any advisory outside a justified allowlist (dev/build/test-only + upstream-pinned). 18 allowlisted. Gate (.github/workflows/audit.yml): cargo audit + bun run audit on every PR. Both exit 0 now; full frontend suite 4091/4091 green after the dep bumps. Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
APPROVE Independent adversarial review returned CONFIRMED-GOOD after verifying against the live tree (ran the gate script, cross-checked both lockfiles, web-verified each dompurify advisory's preconditions). Key confirmations: no accepted advisory is a real shipped-to-users vulnerability — all 4 dompurify residuals require config options (setConfig / CUSTOM_ELEMENT_HANDLING / SAFE_FOR_TEMPLATES+RETURN_DOM / RETURN_TRUSTED_TYPE) that neither DOMPurify consumer (mermaid-render + chat-markdown) sets; all 14 overrides stay in-major (no surprise prod bump, all resolve in the frozen lockfile); the 6 cargo ignores are genuinely upstream-blocked (libsql 0.6.0 / tauri); and the gate still fails on any NEW advisory on both sides. The review's one finding — a fail-open if |
Reaffirms the standing decision from ci.yml's removal (#1618) — GitHub Actions is scoped to release.yml only, no workflow runs automatically on pull_request. audit.yml (dependency-vuln scanning, added #1745) had re-introduced a PR-triggered hosted workflow; removed to match the current intended posture. Local pre-push hook remains the sole gate. Revisit CI/CD on GitHub at a later time — see ADR-047's 2026-08-07 amendment in nodespace-docs. Co-Authored-By: Claude <[email protected]>
Summary
Remediates the pre-existing dependency advisories that blocked the #1719 audit gate, then lands the gate itself (green). Fix what's fixable; allowlist the rest with per-entry justification and a tracked follow-up. Closes #1728 and #1719; supersedes the parked draft PR #1727.
Rust (
cargo audit)cargo update: crossbeam-epoch 0.9.20 (RUSTSEC-2026-0204), quinn-proto 0.11.16 (RUSTSEC-2026-0185)..cargo/audit.tomlallowlists 6 upstream-blocked vulns with justification: quick-xml×2 (pinned by tauri/plist), rustls-webpki×4 (the vulnerable 0.102.8 is pinned bylibsql 0.6.0; the fixed 0.103.13 is already in the tree). Tracked in Bump libsql (rustls 0.23) + tauri/quick-xml to clear the 6 allowlisted Rust advisories #1743.warnings (no ignore needed).npm (
bun audit)package.jsonoverridespin patched (same-major) versions of the 14 production/framework advisories: criticalshell-quote, high@grpc/grpc-js/protobufjs/devalue/lodash-es/form-data, plus@sveltejs/kit,svelte,mermaid,postcss,uuid,ws,js-yaml, anddompurify.dompurifyis pinned to 3.4.7 — the highest version DOMPurify still sanitizes correctly under Happy-DOM (our unit-test DOM);>3.4.7fails-open there and would silently dropsanitizeSvg's coverage. 3.4.7 fixes the cross-realm / IN_PLACE / prototype-pollution advisories; the 4 residual low/moderate ones are allowlisted (dompurify is defense-in-depth over mermaid, which renderssecurityLevel:'strict',htmlLabels:false). Tracked in Clear the 18 allowlisted npm advisories (dompurify→browser-mode tests, dev-tooling major bumps) #1744.scripts/audit-npm.tswrapsbun auditand fails on any advisory outside a justified allowlist. 18 entries, every one dev/build/test-only (vitest, @vitest/browser, happy-dom, vite, esbuild, brace-expansion-via-eslint) or upstream-pinned (cookie via SvelteKit, dompurify residuals). A NEW advisory in any non-allowlisted (incl. production) package fails the gate.Gate
.github/workflows/audit.yml—cargo audit(reads.cargo/audit.toml) +bun run audit(the wrapper) on every PR.actions/checkout@v7,oven-sh/setup-bun@v2pinned1.3.11.Verification
cargo audit: exit 0.bun run audit: exit 0 (18 allowlisted).bun install --frozen-lockfile: clean.svelte-check: 0 errors.sanitizeSvgunder Happy-DOM — is resolved by the dompurify 3.4.7 ceiling).mermaid-render.tsand the primary chat-markdown sanitizer), so none is reachable here. All 14 overrides stay in-major (no surprise prod major bump);.cargo/audit.tomlignores are genuinely upstream-blocked; the gate still fails on any new advisory on both sides. The review's one code finding —audit-npm.tscould fail-open ifbun audititself errored with empty stdout — is fixed (it now checks the exit code and fails closed); the dompurify allowlist comment was tightened to note its primary chat-markdown role.Closes #1728. Closes #1719.