Skip to content

Fix yarn dependency vulnerabilities - #30318

Merged
chirag-madlani merged 1 commit into
mainfrom
fix-yarn-vulnerabilities
Jul 22, 2026
Merged

chirag-madlani merged 1 commit into
mainfrom
fix-yarn-vulnerabilities

Conversation

@harsh-vador

@harsh-vador harsh-vador commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

Fixes only the currently listed Dependabot Yarn alerts that have available version-only fixes, plus the compatibility issue called out in review:

  • Root yarn.lock: pins brace-expansion to 1.1.16.
  • UI core components yarn.lock: pins brace-expansion to 5.0.7.
  • Main UI yarn.lock: bumps dompurify to 3.4.12.
  • Main UI compatibility: replaces global immutable and js-yaml resolutions with compatible scoped/separated lockfile entries.

Compatibility details:

  • @melloware/react-logviewer now keeps Immutable v5 via @melloware/react-logviewer/immutable: 5.1.9.
  • @react-awesome-query-builder/core stays on Immutable v4 via @react-awesome-query-builder/core/immutable: 4.3.9.
  • js-yaml@^3.13.1 stays on v3.15.0 while v4 consumers resolve to v4.3.0.

Removed the earlier unrelated dependency changes from this PR, including axios, linkify-it, fast-uri, diff, and yaml changes beyond what is already in origin/main.

Verification

  • git diff --check
  • Root yarn audit --level low: still reports unrelated diff and yaml advisories that are not in the current Dependabot screenshot.
  • UI core components yarn audit --level low: 0 vulnerabilities found.
  • Main UI yarn audit --level low: dompurify is no longer reported; remaining reports are no-patch advisories.

Remaining no-patch advisories

These current listed alerts cannot be fixed by a direct version bump today because npm reports no patched release:

  • showdown: ReDoS in link/anchor parsing.
  • quill: XSS via HTML export feature.

The main UI audit also reports elliptic as no-patch, but it was not part of the current screenshot list.

Greptile Summary

This PR updates dependency resolutions and lockfiles for the targeted Yarn advisories. The main changes are:

  • Pins root brace-expansion to 1.1.16.
  • Pins UI core brace-expansion to 5.0.7.
  • Updates the main UI to DOMPurify 3.4.12.
  • Separates Immutable v4 and v5 consumers.
  • Restores js-yaml v3 for the Istanbul configuration loader.

Confidence Score: 5/5

This looks safe to merge.

  • The Immutable consumers now resolve to their required major versions.
  • The Istanbul configuration loader now receives its compatible js-yaml v3 dependency.
  • No blocking issue was found in the updated dependency paths.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/package.json Updates DOMPurify, scopes Immutable versions by consumer, and removes the global js-yaml override.
openmetadata-ui/src/main/resources/ui/yarn.lock Separates the Immutable v4/v5 and js-yaml v3/v4 dependency trees.
openmetadata-ui-core-components/src/main/resources/ui/package.json Adds the brace-expansion 5.0.7 resolution.
openmetadata-ui-core-components/src/main/resources/ui/yarn.lock Resolves UI core brace-expansion to 5.0.7.
package.json Adds the root brace-expansion 1.1.16 resolution.
yarn.lock Resolves root brace-expansion to 1.1.16.

Reviews (4): Last reviewed commit: "Limit yarn vulnerability fixes to open a..." | Re-trigger Greptile

Context used (3)

  • Context used - openmetadata-ui-core-components/CLAUDE.md (source)
  • Context used - CLAUDE.md (source)
  • Context used - AGENTS.md (source)

@harsh-vador
harsh-vador requested review from a team, chirag-madlani and karanh37 as code owners July 22, 2026 06:18
@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

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!

@harsh-vador harsh-vador added safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Jul 22, 2026
@harsh-vador harsh-vador self-assigned this Jul 22, 2026
@harsh-vador
harsh-vador force-pushed the fix-yarn-vulnerabilities branch from a506cdc to 8ac17ff Compare July 22, 2026 07:19
@harsh-vador
harsh-vador force-pushed the fix-yarn-vulnerabilities branch from 8ac17ff to ddf8c8e Compare July 22, 2026 07:28
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 65%
65.24% (75942/116399) 49% (45246/92330) 49.87% (13695/27460)

@sonarqubecloud

Copy link
Copy Markdown

@karanh37
karanh37 added this pull request to the merge queue Jul 22, 2026
@chirag-madlani
chirag-madlani merged commit 09f9e82 into main Jul 22, 2026
53 checks passed
@chirag-madlani
chirag-madlani deleted the fix-yarn-vulnerabilities branch July 22, 2026 15:53
@gitar-bot

gitar-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Pins brace-expansion and updates dompurify to resolve active yarn security vulnerabilities. No issues found.

✅ 1 resolved
✅ Bug: Global immutable resolution forces react-logviewer off required v5

📄 openmetadata-ui/src/main/resources/ui/package.json:290 📄 openmetadata-ui/src/main/resources/ui/yarn.lock:2119 📄 openmetadata-ui/src/main/resources/ui/yarn.lock:2288 📄 openmetadata-ui/src/main/resources/ui/yarn.lock:7738-7740 📄 openmetadata-ui/src/main/resources/ui/package.json:295 📄 openmetadata-ui/src/main/resources/ui/yarn.lock:7738
This commit replaced the scoped resolutions @melloware/react-logviewer/immutable: 5.1.9 and @react-awesome-query-builder/core/immutable: 4.3.9 with a single global "immutable": "4.3.9". The lockfile now collapses [email protected], [email protected], immutable@^4.3.6 all to 4.3.9 (yarn.lock:7738-7740), even though @melloware/[email protected] hard-depends on [email protected]. Immutable v5 removed/changed APIs relative to v4, so forcing the logviewer down to 4.3.9 can break it at runtime. This also contradicts the PR summary's claim that v4 and v5 consumers were separated. Restore per-consumer scoped resolutions instead of a single global pin.

Options

Display: compact → Showing less information.

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

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

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 skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants