Repository navigation
fix(security): bump dompurify to patch DOM XSS advisory - #660
Conversation
release: v4.5.3 (Develop v4 -> stage v4)
release: v4.5.3
Bumps dompurify from 3.4.13/3.4.14 to 3.4.16 (direct dependency) in package.json and package-lock.json, resolving a Snyk-reported Cross-site Scripting (XSS) advisory in dompurify. Co-Authored-By: Claude <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The dependency declaration and lockfile metadata are consistent, with no unresolved issues found.
Review effort: Balanced
Findings: None
What changed in this PR
Updates the direct DOMPurify runtime dependency to a version containing the XSS security fix.
Changes:
- Bumps DOMPurify from
^3.4.13to^3.4.16. - Synchronizes resolved package and integrity metadata.
| File | Description |
|---|---|
package.json |
Updates the dependency range. |
package-lock.json |
Locks DOMPurify 3.4.16 and updates metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Coverage Report
File CoverageNo changed files found. |
hitesh-shetty-cstk
left a comment
There was a problem hiding this comment.
Automated review
What this changes: Raises the dompurify range in package.json from ^3.4.13 to ^3.4.16 and updates the one matching entry in package-lock.json (version, resolved URL, integrity). No source file changes. The single call site, sanitizeData in src/visualBuilder/utils/collabUtils.ts, is untouched.
I checked the lockfile edit against the npm registry rather than taking it on trust:
dompurify@3.4.16exists and is the currentlatest.- The integrity hash in the lockfile matches the registry's published hash for 3.4.16 exactly, as does the resolved tarball URL. This is the check that matters most on a hand-edited lockfile.
- There is one
dompurifyentry in the lockfile, now at 3.4.16, andpackages[""].dependenciesagrees withpackage.json. A partial bump leaving a second entry on the old version is the usual failure mode here and it is not present. lockfileVersionis 3, so no legacydependenciesblock needs a parallel edit.
One note on what the manifest bump actually buys, because it is easy to read it as doing more or less than it does. ^3.4.13 already permitted 3.4.16, so a fresh install was resolving to a patched version regardless. What this adds is a floor, so a consumer cannot land on 3.4.13 or 3.4.14 from a stale lockfile, a pinned resolution, or an offline cache. That is the right lever for this repo: tsup.config.js sets no noExternal, and tsup leaves dependencies external by default, so dompurify stays an import in dist and each consumer resolves it from the declared range.
Business impact: None identified. The change does reach customers through the published package's dependency range, so it is fair to treat as customer-facing, but a patch-level dompurify bump carries no expected behavior change. The only call site passes USE_PROFILES: { html: true } and strips remaining tags before using the result.
Security: Remediation rather than a new finding. Snyk and the org security workflow both report clean on this head, and I found nothing they miss. The supply-chain question specific to an edited lockfile, whether the integrity hash matches the real published artifact, I verified directly against the registry.
Flow
No flow change. A dependency bump with no altered control flow or message path.
Findings: 0 blocker, 1 should fix, 1 nit. The should-fix is inline on package.json. The nit is here, because it concerns a different pull request and has no honest line to anchor to.
Nit: #634 is still open. It is lockfile-only and moves dompurify from 3.4.12 to 3.4.13, below the floor this sets. It edits the same lockfile lines, so it cannot merge quietly after this one, and Dependabot normally closes its own pull request once the dependency moves past its target. Worth closing by hand if it does not.
Reviewer candidates: @kirtesh-cstk authored 8 of the last 30 commits on package.json. @csAyushDubey authored 6.
Not covered: I did not run the build, the unit tests, or an install. The test check was still in progress when I read it; the other checks on this head had passed. I could not independently confirm the advisory's affected range or its first patched version, because both advisory databases I tried were unreachable from this run. That part rests on Snyk's clean result for this head rather than on my own reading of the advisory record.
Automated review by Claude Code. A human review is still required.
Generated by Claude Code
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
hitesh-shetty-cstk
left a comment
There was a problem hiding this comment.
Automated review
Re-review after new commits (pass 2 of 4).
What this changes: nothing new since the last pass. The only commit added is a merge of develop_v4 into the branch. Measured against its base, this pull request is still the same two files it was: dompurify moves from ^3.4.13 to ^3.4.16 in package.json, and package-lock.json is updated to match.
Business impact: none identified. dompurify has a single call site in the SDK, sanitizeData in src/visualBuilder/utils/collabUtils.ts, which builds the body of a Collab thread comment. 3.4.14 to 3.4.16 is a patch bump, so no behaviour change is expected on that path.
Security: nothing beyond what the scanners cover. Snyk ran against this head and reported no open source, license or code issues. I checked the bump holds up independently of that result: package-lock.json carries one dompurify entry and it is at 3.4.16, its integrity hash matches what the npm registry publishes for 3.4.16, the root dependency range in the lock agrees with package.json, and the lockfile is version 3, so there is no legacy dependencies mirror left behind on the old version.
Flow
No flow change. This is a dependency version bump with no control flow to draw.
Findings: 0 blocker, 1 should fix, 0 nit. The finding is in this body rather than inline, because it concerns a different pull request and has no line here to anchor to.
Should fix. #634 is still open. It bumps
dompurifyfrom 3.4.12 to 3.4.13 and targetsmain. The description here says this change supersedes it, but while #634 stays open it can still be merged later and move the declared range back down to^3.4.13, one of the versions this change is moving away from. Closing #634 removes that path.
Merge check: the merge pulled in seven source files from the base branch, including the entries-in-page notification work from #662. None of them belongs to this pull request. The base-to-head diff is still only package.json and package-lock.json, which shows the merge took the base side without edits of its own. I did not re-review that code here; it was reviewed on #662.
Reviewer candidates: none, and no reviewer is requested on a re-review. The incremental diff for this pass is entirely base-branch content, so it carries no ownership signal for this change, and the change itself touches only dependency manifests.
Not covered: I did not run the build, the test suite, or the app. The test check was still in progress on this head while I reviewed. I did not inspect the contents of the published 3.4.16 tarball beyond its registry integrity hash, and I did not confirm which advisory identifier the scanner matched.
Automated review by Claude Code. A human review is still required.
Generated by Claude Code
What the vulnerability was
Snyk SCA flagged
dompurify@3.4.13/3.4.14as vulnerable to a Cross-site Scripting (XSS) advisory.dompurifyis a direct runtime dependency here.Note: an earlier open PR (#634, dependabot) bumps
dompurifyto3.4.13, which does not reach the fixed version — this PR supersedes that with a sufficient bump.What the fix does
Bumps
dompurifyfrom^3.4.13to^3.4.16inpackage.json, and updates the correspondingnode_modules/dompurifyentry (version/resolved/integrity) plus the root package's declared range inpackage-lock.jsonto match.How it was verified
dompurifyis a direct dependency inpackage.json.overrides/resolutionsblock added — direct version bump only.🤖 Generated with Claude Code
Generated by Claude Code