Skip to content

fix(deps): clear both open Dependabot alerts (postcss high, dompurify low) - #27

Merged
evangress merged 3 commits into
mainfrom
fix/security-dep-bumps
Jul 25, 2026
Merged

evangress merged 3 commits into
mainfrom
fix/security-dep-bumps

Conversation

@evangress

Copy link
Copy Markdown
Collaborator

Clears the two open Dependabot alerts. Both are transitive-reachable, both have upstream fixes, and neither required a code change.

Alert Package Severity Advisory Fix
#28 postcss <= 8.5.17 high GHSA-r28c-9q8g-f849 forced to 8.5.18
#27 dompurify <= 3.4.11 low GHSA-c2j3-45gr-mqc4 direct dep → 3.4.12, override retargeted

postcss — path traversal in source-map auto-loading

Previous-source-map auto-loading follows sourceMappingURL without constraining the path, so a crafted stylesheet can disclose arbitrary .map files. It reaches us transitively twice — via vite, and via @milkdown/components → vue → @vue/compiler-sfc — so a direct bump wouldn't cover it. Handled with a pnpm override, matching how undici is already pinned in this file.

dompurify — sanitizer bypass

CUSTOM_ELEMENT_HANDLING lets an allowed custom element bypass the afterSanitizeElements hook.

Rated low upstream, and worth more attention than that here: CLAUDE.md §3.3 makes DOMPurify Toril's single chokepoint for hostile markup in an opened file, and §3 treats "treat opened files as untrusted" as non-negotiable. A bypass of the sanitizer's post-processing hook lands directly on that boundary. It's a direct dependency, so package.json moves to 3.4.12 and the existing override is retargeted so Milkdown's transitive copy follows.

Verification

  • No vulnerable versions remain in pnpm-lock.yaml — dompurify@3.4.12 and postcss@8.5.18 resolve everywhere, single version each.
  • pnpm test 133/133 · pnpm typecheck clean · pnpm build succeeds.
  • The security suite (tests/security.test.ts) covers the sanitization chokepoint and passes on the new DOMPurify.

Both overrides carry their advisory ID and a drop-condition inline, so they can be retired when the upstream ranges move rather than lingering unexplained.

Note on the other open PRs

This branches from main and is independent of #25 and #26. It touches pnpm-lock.yaml and pnpm-workspace.yaml, which #25 also touches — whichever merges second may need a lockfile regeneration (pnpm install) after taking both sets of YAML changes.

🤖 Generated with Claude Code

evangress and others added 3 commits July 25, 2026 15:57
postcss <= 8.5.17 (GHSA-r28c-9q8g-f849, high) is a path traversal in
previous-source-map auto-loading that discloses arbitrary .map files. It
arrives transitively twice — via vite, and via @milkdown/components ->
vue -> @vue/compiler-sfc — so it needs an override rather than a direct
bump. Forced to 8.5.18.

dompurify <= 3.4.11 (GHSA-c2j3-45gr-mqc4, low) lets an allowed custom
element bypass afterSanitizeElements via CUSTOM_ELEMENT_HANDLING. Rated
low upstream, but DOMPurify is Toril's whole defense against hostile
markup in an opened file (§3.3), so a sanitizer bypass is worth more here
than the rating implies. Direct dep bumped to 3.4.12 and the existing
override retargeted so the transitive tree follows.

Both overrides carry their advisory ID and a drop-condition inline,
matching the undici entry already in this file.

Verified: no vulnerable versions remain in the lockfile; 133/133 tests,
typecheck and build clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ides

The web-editor conflict resolution left two problems, only one of which
was visible.

Visible: pnpm-lock.yaml had `dompurify@3.4.12` as a duplicated mapping
key, so pnpm refused to read it at all
(ERR_PNPM_BROKEN_LOCKFILE at 790:3) and both frontend jobs failed at the
install step. Lockfiles are generated artifacts and can't be hand-merged
— regenerated from main's copy instead of edited.

Silent, and the one that mattered: the resolution kept main's overrides
block, which reverted `dompurify@<3.4.11: 3.4.11` and dropped the
postcss override entirely, while package.json still asked for 3.4.12.
The high-severity postcss advisory (GHSA-r28c-9q8g-f849) would have been
left unfixed by a PR whose whole purpose was fixing it, and the CI
failure pointed at something unrelated.

Both overrides restored; patchedDependencies from #25 kept.

Verified: lockfile parses with no duplicate keys, `pnpm install
--frozen-lockfile` is a no-op, dompurify@3.4.12 and postcss@8.5.18
resolve everywhere as single versions, 158/158 frontend, mdhtml/mdrtf/
fsatomic green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@evangress
evangress merged commit 7166b4c into main Jul 25, 2026
9 checks passed
@evangress
evangress deleted the fix/security-dep-bumps branch July 25, 2026 16:25
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.

1 participant