Skip to content

fix(security): patch storybook and dompurify - #36072

Merged
harsh-vador merged 1 commit into
mainfrom
fix/dependabot-storybook-dompurify-oct23
Oct 23, 2026
Merged

harsh-vador merged 1 commit into
mainfrom
fix/dependabot-storybook-dompurify-oct23

Conversation

@harsh-vador

@harsh-vador harsh-vador commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Closes the two critical Storybook alerts and patches the vulnerable dompurify that openmetadata-ui resolves. Both are patch releases. Only package ranges and the lockfile blocks of these packages change. No source files change.

Package From → To Advisories Where
storybook, @storybook/* (8 direct, 25 installed) 8.6.18 → 8.6.19 #771, #772 (critical): GHSA-f2ph-cmg5-wxc8, missing origin validation in the Storybook preview ui-core-components (dev only)
dompurify 3.4.16 → 3.4.17 GHSA-cg2g-xh64-v4q7 (critical), GHSA-mrv2-3pqr-j5jr (high), GHSA-c6gr-qvv4-5v3f (low) openmetadata-ui

dompurify. This repo shows no alert for it yet, but openmetadata-ui resolves 3.4.16, which is in all three advisories' range, and Collate flags the same version. 3.4.17 fixes three modes:

  • SAFE_FOR_TEMPLATES output with an attached shadow root;
  • IN_PLACE sanitizing with a hook that removes a parent;
  • SMIL attributeName=href under PARSER_MEDIA_TYPE: application/xhtml+xml.

The UI uses none of these. RichTextStringUtils calls sanitize() with the default profile, and getSanitizeContent in sanitize.utils.ts adds ADD_TAGS: ['block-math-equation'] and ADD_ATTR: ['math_equation', 'isediting']. Output for both is unchanged (see Tests).

Still open on purpose: @tiptap/core #713 needs the tiptap v2 → v3 migration of BlockEditor.

Companion Collate PR: open-metadata/openmetadata-collate#7801 (the same dompurify bump, plus stream-json). Each repo resolves its own node_modules, so neither PR depends on the other to merge.

Type of change:

  • Bug fix

High-level design:

N/A, small change.

Tests:

Use cases covered

  • Dependency resolution only. No source file changes.

Unit tests

  • No new tests: no source changed.
  • Lockfiles: openmetadata-ui was regenerated with yarn install (yarn 1.22.22), and only the dompurify block changes. In ui-core-components, yarn also split the unrelated string-width-cjs / strip-ansi-cjs alias entries, so I applied only the 28 Storybook blocks onto main's lock. yarn install --frozen-lockfile from an empty node_modules passes on both. Every installed @storybook/* package and storybook are on 8.6.19. The installs ran with --ignore-engines because the newest node 22 on my machine is below the new >=22.23.4 engine; that changes no resolution.
  • ui-core-components build: vite build passes, and dist/ is byte-identical to the main build.
  • ui-core-components vitest run: 924 passed, 6 failed. Baseline on unmodified main: 923 passed, 7 failed. No new failures. The 6 are the components/application/tag/* › should render a tooltip trigger when tooltip is passed tests, which also fail on main. The 7th, autocomplete.test.tsx › filters the full list and inserts a match, failed once in the baseline full run and passed 4 of 4 times on its own, so it is flaky, not fixed by this change.
  • Storybook 8.6.19: storybook build succeeds, with the same 330 output files and the same 458 stories in index.json as on 8.6.18.
  • dompurify 3.4.16 vs 3.4.17, differential check: I ran both versions in jsdom over 31 inputs, each with both configs the UI uses (62 cases). Output is byte-identical in every case. The inputs were real rich-text shapes (headings, lists, task lists, tables, code blocks, mentions, <#E::…> entity links, images, block-math-equation, SVG, MathML) plus XSS and mXSS payloads, DOM clobbering, and a block-math-equation carrying onclick and a nested img onerror.
  • openmetadata-ui Jest on dompurify 3.4.17: sanitize.utils.test.ts and StringUtils.test.ts pass 141/141, the same as on 3.4.16.

Backend integration tests

  • Not applicable (no backend API changes). make java_affected: no Java tests are impacted.

Playwright (UI) tests

Not run. make playwright_affected maps package.json / yarn.lock to 21 canary and smoke specs (an impact-map gap; the merge queue runs the full suite). Storybook is dev only. dompurify ships in the bundle, but 3.4.17 produces byte-identical output for both configs the UI uses (see above), and its fixes are in modes the UI never calls.

Manual testing performed

N/A, no runtime code path changes.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Updates Storybook and DOMPurify package ranges and matching lockfile entries.

  • The component library uses Storybook 8.6.19 for its stories.
  • The main UI uses DOMPurify 3.4.17 when it sanitizes text.

Acknowledgment: harsh-vador explicitly deferred the @tiptap/core alert to the BlockEditor v2-to-v3 migration.

Reviews (1) · Last reviewed commit: "fix(security): patch storybook and dompu..." · Reviewed by Greptile

- ui-core-components: storybook and @storybook/* 8.6.18 -> 8.6.19
  (#771, #772; GHSA-f2ph-cmg5-wxc8 critical, dev only)
- openmetadata-ui: dompurify 3.4.16 -> 3.4.17 (GHSA-cg2g-xh64-v4q7,
  GHSA-mrv2-3pqr-j5jr, GHSA-c6gr-qvv4-5v3f; same vulnerable version
  Collate flags)
@harsh-vador
harsh-vador requested a review from a team as a code owner October 23, 2026 08:14
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added the UI UI specific issues label Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot

gitar-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Updating production DOMPurify changes the UI’s HTML sanitizer implementation, which could alter rendered content or filtering; Storybook bumps are development-only.

Patches Storybook to 8.6.19 across the dev-only ui-core-components package and bumps dompurify to 3.4.17 in openmetadata-ui to address the listed critical, high, and low advisories. Only dependency ranges and lockfile blocks change, with no source edits. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@harsh-vador harsh-vador self-assigned this Oct 23, 2026
@harsh-vador harsh-vador added the safe to test Add this label to run secure Github workflows on PRs label Oct 23, 2026
@harsh-vador
harsh-vador enabled auto-merge October 23, 2026 08:30
@harsh-vador harsh-vador added the To release Will cherry-pick this PR into the release branch label Oct 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 79%
79.43% (129303/162775) 65.9% (45499/69041) 68.82% (25860/37575)

@sonarqubecloud

Copy link
Copy Markdown

@harsh-vador
harsh-vador added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 0dbdf17 Oct 23, 2026
159 of 169 checks passed
@harsh-vador
harsh-vador deleted the fix/dependabot-storybook-dompurify-oct23 branch October 23, 2026 12:43
harsh-vador added a commit that referenced this pull request Oct 23, 2026
…36110)

- ui-core-components: storybook and @storybook/* 8.6.18 -> 8.6.19
  (GHSA-f2ph-cmg5-wxc8 critical, dev only)
- openmetadata-ui: dompurify 3.4.13 -> 3.4.17 (GHSA-cg2g-xh64-v4q7,
  GHSA-mrv2-3pqr-j5jr, GHSA-c6gr-qvv4-5v3f, plus the 3.4.14-3.4.16
  fixes 2.0 never received)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs To release Will cherry-pick this PR into the release branch UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants