Repository navigation
chore(deps): pin dompurify to 3.4.17 in the Studio frontend - #514
Merged
Merged
Conversation
monaco-editor 0.57.0 declares dompurify exactly at 3.4.15, so npm update cannot move the resolved version. An npm override sets dompurify to 3.4.17 for the Studio frontend's whole tree, the patched release for GHSA-cg2g-xh64-v4q7, GHSA-mrv2-3pqr-j5jr, GHSA-c6gr-qvv4-5v3f, GHSA-6688-9rhm-gjv2 and GHSA-p98j-92pf-mc4p. The editor does not import this npm package. It bundles its own copy of DOMPurify, 3.4.15, and the built assets still contain that copy, so the override changes the lockfile and node_modules, not the code that ships. The advisories need options the bundled sanitizer does not set: IN_PLACE, SAFE_FOR_TEMPLATES or PARSER_MEDIA_TYPE. Shipping the patched sanitizer needs a monaco-editor release that bundles 3.4.17. Checked with npm ci, npm run build, typecheck:device-view, test:device-view, test:probescript and check:probescript.
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pins
dompurifyto 3.4.17 in the Studio frontend's npm tree with anoverridesentry, which closes the open Dependabot alerts on the lockfile.monaco-editor0.57.0 (the latest release) pinsdompurifyexactly at 3.4.15, sonpm updatechanges nothing and an override is the only lockfile-level fix. The editor bundles its own copy of DOMPurify, so the shipped editor code does not change until a Monaco release vendors a patched version. The advisories need options (IN_PLACE,SAFE_FOR_TEMPLATES,PARSER_MEDIA_TYPE) that the editor's sanitizer does not set.Test plan
npm ci,npm run build,npm run typecheck:device-viewinstudio/frontendnpm run test:device-view(116) andnpm run test:probescript(11),npm run check:probescript🤖 Generated with Claude Code