Repository navigation
fix: patch pnpm audit advisories via dependency floors and overrides - #430
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
ℹ️ No critical issues. One gap is worth closing: the
viteandzodfixes don't reach published packages.
Reviewed changes
I reviewed the full override and lockfile diff, which pins patched versions for every open pnpm audit advisory.
- Replaced range overrides with exact pins:
undici@7→ 7.30.1,fast-uri→ 4.2.3,dompurify→ 3.4.17. - New pins:
js-yaml@4,vite,vitest/@vitest/mocker/@vitest/coverage-v8andzodare now pinned to exact versions in the workspace. - Pins scoped to one consumer that cross a major line:
mermaid>katex0.18.10 and@tailwindcss/typography>postcss-selector-parser7.1.7 are each scoped to their single consumer. The PR description backs them with MathML and CSS output comparisons. - Lockfile churn: the version bumps pull in rolldown 1.2.15 and
commander@15(through katex). The@oxc-parser/binding-*snapshots also lost theiroptional: trueflag. I ranpnpm install --lockfile-onlywith the pinned pnpm 12.3.4, and it produces the same entries, so this is pnpm's normal output and not a hand edit.
claude-opus-5-5 | 𝕏
There was a problem hiding this comment.
✅ Pullfrog addressed all of its review feedback on this PR.
Addressed the one thread from review #5654682882 in 27bbad5.
- Fixed (
pnpm-workspace.yaml:17-21): I removed the exact overrides onvite,zod,vitest,@vitest/mockerand@vitest/coverage-v8. Thepackage.jsonversion ranges now start at the patched versions instead:vite^8.3.5(core, flame, markdown, themes-colors, ui-react),zod^4.6.7(core, flame),vitest^4.1.12(root) and@vitest/coverage-v8^4.1.12(themes-colors).@vitest/mockerfollowsvitest, so it still resolves to 4.1.12 without an override. The published@docubook/coreand@docubook/flameranges no longer accept the vulnerable versions. - Changeset: I added
.changeset/deps-audit-floors.md, a patch for@docubook/coreand@docubook/flame. - Lockfile: I regenerated it and formatted it with Prettier. The only changes are the version ranges and the removed override block. pnpm also put back the
optional: trueflags on the@oxc-parser/binding-*entries.
Checks: pnpm install --frozen-lockfile passes and pnpm audit reports no known vulnerabilities. pnpm lint is clean. Tests pass for core (121) and themes-colors (120), and pnpm test:release-plan passes. I did not rerun the full turbo test suite. The pre-push hook passed.
The PR description is now out of date: it still lists the five removed pins and says "No changeset". It needs updating before merge.
claude-opus-5-5 | 𝕏
pnpm audit reported 26 advisories (1 critical, 7 high, 13 moderate, 5 low) across direct, dev and transitive dependencies. Each now resolves to the newest patched release of the line already in use. Direct dependencies get raised floors in package.json, not overrides. Workspace overrides are not published, so the released ranges of @docubook/flame (vite, zod) and @docubook/core (zod) would otherwise still accept the vulnerable versions. A global exact pin would also silently hold back later bumps. - zod ^4.6.7 (core, flame; changeset patch for both) - vite ^8.3.5 (flame dependency; dev dependency elsewhere) - vitest ^4.1.12 (root), @vitest/coverage-v8 ^4.1.12 (themes-colors); @vitest/mocker follows vitest exactly Transitive dependencies are pinned in pnpm-workspace.yaml overrides: - dompurify 3.4.17 (mermaid; critical SAFE_FOR_TEMPLATES bypass) - fast-uri 4.2.3 (ajv via commitlint; 8 advisories) - js-yaml@4 4.3.2 (read-yaml-file via changesets; js-yaml 5 untouched) - undici@7 7.30.1 (jsdom) Two fixes exist only on a newer line, so their overrides are scoped to the one consumer: - mermaid>katex 0.18.10: mermaid 11.17.2 (latest 11.x) asks for ^0.16.47. 0.18.10 is the last non-deprecated 0.18 (0.18.11 was published with breaking changes). Mermaid renders with output "mathml" unless legacyMathML/forceLegacyMathML is set, which DocuBook never does, and that output is identical across 0.16.47 and 0.18.10. Only the htmlAndMathml class names changed. - @tailwindcss/typography>postcss-selector-parser 7.1.7: typography pins 6.0.10 exactly and 6.x has no fix. The flame docs CSS rebuilt with 7.1.7 is byte-identical to the 6.0.10 output. pnpm-lock.yaml is regenerated and Prettier-formatted to match the committed style. pnpm audit now reports no known vulnerabilities. Co-authored-by: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <[email protected]>
27bbad5 to
a72dcfb
Compare

Summary
pnpm auditreported 26 advisories (1 critical, 7 high, 13 moderate, 5 low) across direct, dev and transitive dependencies. After this PR,pnpm auditreports no known vulnerabilities. Each package resolves to the newest patched release of the line already in use. The two exceptions are explained below.The fix works differently depending on where the package sits:
package.json. Workspace overrides are not published, so this is the only way the released@docubook/flameand@docubook/coreranges stop accepting the vulnerable versions.pnpm-workspace.yamloverrides.Direct dependencies: raised floors in
package.jsonzod^4.6.5→^4.6.7dependenciesof core, flamevite^8.3.2→^8.3.5dependenciesof flame; dev dep of core, markdown, themes-colors, ui-reactvitest^4.1.8→^4.1.12@vitest/mocker, which followsvitestexactly)@vitest/coverage-v8^4.1.11→^4.1.12vitest)The changeset
.changeset/deps-audit-floors.mdis a patch for@docubook/coreand@docubook/flame, the two packages whose published runtime ranges change. The other packages only change devDependencies.These were exact overrides in this PR's first version. Pullfrog's review pointed out that overrides never reach npm consumers, and that a global exact pin would silently block later
package.jsonbumps. Its fix is folded into the single commit.Transitive dependencies:
overridesinpnpm-workspace.yamldompurifymermaid(markdown)fast-uriajvvia@commitlint/clijs-yaml@4read-yaml-filevia@changesets/cliundici@7jsdom(vitest, markdown)mermaid>katexmermaid(markdown)@tailwindcss/typography>postcss-selector-parser@tailwindcss/typography(flame)js-yaml@4andundici@7are range-scoped, so the installedjs-yaml5.4.2 is left alone.undici,fast-urianddompurifyentries are replaced by exact versions.The two cross-line pins
Neither fix exists on the line the parent package asks for, so each override is scoped to that one consumer.
mermaid>katex0.18.10.mermaid11.17.2, the latest 11.x, asks forkatex ^0.16.47, and the fix starts at 0.18.2. 0.18.11 is deprecated upstream ("accidentally published with breaking changes"), so the pin is 0.18.10, the line mermaid 12 itself targets.output: "mathml"unlesslegacyMathMLorforceLegacyMathMLis set, and DocuBook sets neither.renderToStringwith mermaid's exact options gives identical MathML across 0.16.47 and 0.18.10 for 12 sample formulas. Invalid input still throwsParseError.htmlAndMathmloutput, where 0.18 renames classes (base→katex-baseand so on). DocuBook never uses that path and ships no KaTeX CSS.@tailwindcss/typography>postcss-selector-parser7.1.7. Typography pins6.0.10exactly, and no 6.x release has the fix. The flame docs CSS was rebuilt from scratch (asset cache cleared) with typography resolving 7.1.7. The output is byte-identical to the 6.0.10 build:docs.cssis 148,503 bytes with 134.proseselectors, andsite.cssmatches too.Lockfile
pnpm installrewritespnpm-lock.yamlwith single quotes, so it is Prettier-formatted back to the committed double-quote style, leaving only real changes.vite8.3.5 also bringsrolldown1.2.15, andkatex0.18 bringscommander@15.Verification
All of the following ran on the final commit:
pnpm install --frozen-lockfilepasses.pnpm audit: no known vulnerabilities (was 26).@vitest/mockerand@vitest/coverage-v84.1.12, plus the six overrides.turbo lint build --force: all tasks pass, uncached.turbo test --force: 1,124 tests pass. flame 676, markdown 122, core 121, themes-colors 120, ui-react 85.pnpm test:release-plan: 6 scenarios pass.scripts/flame-browser-smoke.mjs(headless Chromium):/,/docs/, accordion and tabs pages load, hydrate and respond to input.🤖 Generated with Claude Code