Repository navigation
Conversation
5552e05 to
6a75010
Compare
Clears GHSA-cg2g-xh64-v4q7 (critical), GHSA-mrv2-3pqr-j5jr (high), and GHSA-c6gr-qvv4-5v3f, GHSA-6688-9rhm-gjv2 and GHSA-p98j-92pf-mc4p (low), all fixed in 3.4.17. 3.4.18 adds a further SAFE_FOR_TEMPLATES fix. No overrides were needed. Co-Authored-By: Claude Opus 5.5
6a75010 to
178e7f1
Compare
jolierabideau
left a comment
There was a problem hiding this comment.
Verified that the rebuilt bundle changes only DOMPurify's source (sourcemap diff: 1 of 197 sources changed, 3.4.13 → 3.4.18) and the lockfile has no older dompurify left. The paste path's existing tests cover the sanitize call. Once platform-yalc moves, a quick manual HTML paste in paranext-core would cover the ticket's "HTML paste still works" testing idea from start to finish.
|
|
||
| ### Security | ||
|
|
||
| - Bundled DOMPurify updated from 3.4.13 to 3.4.18, past its published security advisories (one |
There was a problem hiding this comment.
Optional: consider naming the five GHSA IDs here, as the commit message does. paranext-core readers see this CHANGELOG but not our commit log, and a count alone can't be checked against an advisory scanner. Fine to keep as-is if the CHANGELOG convention is counts only.
| "@lexical/react": "^0.43.0", | ||
| "@lexical/utils": "^0.43.0", | ||
| "dompurify": "^3.4.13", | ||
| "dompurify": "^3.4.18", |
There was a problem hiding this comment.
👍 Raising the floor rather than only re-locking means a future lockfile regeneration can't quietly fall back to a vulnerable 3.4.x.
Code Review Summary
Branch: pt-5057-dompurify
Base: origin/main
Date: 2026-11-17
Review model: Claude Opus 5.5
Files changed: 5
Overview
This updates the DOMPurify that platform-editor bundles from 3.4.13 to 3.4.18. That clears five published advisories, all fixed in 3.4.17:
It also takes 3.4.18's further
SAFE_FOR_TEMPLATESfix. The changes:libs/shared-reactraises itsdompurifyfloor to^3.4.18, and the lockfile changes only dompurify.packages/platform/distis rebuilt.### Securityline.This is the editor half of PT-5057, which fixes the known advisories in what Paratext 10 ships and adds a check to run before each release. The core half is paranext/paranext-core#3021.
The editor's only DOMPurify call,
DOMPurify.sanitize(html)inStructureKeyboardPlugin.tsx, uses the default config. Every advisory here needsIN_PLACE,SAFE_FOR_TEMPLATES,PARSER_MEDIA_TYPEor hooks, so none could be reached through the editor and the real exposure was low.API Changes
None. The public API of the published packages is unchanged:
packages/platform,etc/*.api.mdanddist/index.d.tsare untouched.dist/index.jskeeps the same export block, external modules and imported names. Only a local alias for thequill-deltadefault import is renamed.dompurifyis bundled and isn't listed inpackages/platform/package.json, so consumers' dependency trees don't change.Findings
Critical — Must address before merge
None.
Important — Should address before merge
None.
Minor — Consider
docs/dependency-updates.mdstep 9 asks for. The PR body and CHANGELOG counted them without naming them. (fixed during review: the commit message and the PR body name the five GHSA IDs and say no overrides were needed. The CHANGELOG line keeps the count.)The CHANGELOG could say the advisories aren't reachable through the editor's default-config use of DOMPurify.(no change: the PR body explains the low exposure, and the CHANGELOG entry is accurate as written)Most of the(informational, no change)dist/index.jsdiff is minifier renaming. Only the DOMPurify source changed, and CI confirmed the committed output is current.The author accepted the recommendations: name the advisories in the commit message and the PR body, and make no other change.
Template Propagation
Shared Regions Modified
None.
Extension Config Changes
None. This repository has no
extensions/directory.Positive Observations
distcontains only this change. Of the 197 sources inindex.js.map, only the DOMPurify entry changed (3.4.13 → 3.4.18); every othersourcesContententry is byte-identical.libs/shared-reactis the only manifest that declaresdompurify.pnpm auditreports no dompurify advisories.shared-reactis a devDependency ofplatform-editor.### Securityis the last subsection of Unreleased, where Keep a Changelog puts it.Interview Notes
@dependabot rebasecomment doesn't apply.Suggested Review Focus
libs/shared-react/package.json(next to thedompurifyline),pnpm-lock.yaml, the platform CHANGELOG and the committeddist. Whichever merges second rebases and rebuildsdist. PT-4911 + PT-4921: Hidden-view clipboard filters and lossless paste #43 keepsDOMPurify.sanitize(html)with the default config, so the exposure reasoning above still holds.platform-yalcso paranext-core's main picks up 3.4.18. Release builds get it when release-prep next takes main.Updates the DOMPurify that platform-editor bundles from 3.4.13 to 3.4.18. That clears its five published security advisories, all fixed by 3.4.17:
It also takes 3.4.18's further
SAFE_FOR_TEMPLATESfix. No overrides were needed.libs/shared-reactraises itsdompurifyfloor to^3.4.18. The lockfile change touches only dompurify.packages/platform/distis rebuilt withpnpm rebuild-committed-output. Most of theindex.jsdiff is the minifier renaming identifiers across the bundle; the substantive change is DOMPurify's own code.CHANGELOG.mdgets a### Securityline under Unreleased.The paste path calls DOMPurify with default options, not the IN_PLACE, SAFE_FOR_TEMPLATES or XHTML options the advisories need, so the real exposure is low. paranext-core needs no lockfile change, because
shared-reactis a devDependency ofplatform-editor.Testing:
pnpm nx affected -t lint test --base=origin/mainand the platform-editor typecheck pass.verify-committed-distreports the committed output current. The bundle carries only DOMPurify 3.4.18.After merge: move
platform-yalcso paranext-core's main picks this up. Release builds get it when release-prep next takes main. Open PRs that commitdistwill need the usual rebuild on rebase.Jira: PT-5057
🤖 Generated with Claude Code
This change is