Skip to content

fix(security): patch @vitest/mocker and postcss-selector-parser - #35937

Merged
harsh-vador merged 1 commit into
mainfrom
fix/dependabot-vitest-selector-parser-oct22
Oct 22, 2026
Merged

harsh-vador merged 1 commit into
mainfrom
fix/dependabot-vitest-selector-parser-oct22

Conversation

@harsh-vador

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

Copy link
Copy Markdown
Contributor

Describe your changes:

Closes the 4 open Dependabot alerts in this repo for @vitest/mocker and postcss-selector-parser. Only the pins in resolutions, one devDependency range and the lockfile blocks of these packages change. No source files change.

Package From → To Alerts Where
vitest + @vitest/* 4.1.11 → 4.1.12 #773, #774 (medium): GHSA-qxg6-89mg-rqv8, GHSA-xp26-3454-mjgp ui-core-components devDependency (test only)
postcss-selector-parser 6.0.10 → 7.1.7 (resolution) #749, #753 (medium): GHSA-rj75-hqrm-r3gf openmetadata-ui, ui-core-components (build time only)

postcss-selector-parser. #35837 left this open because forcing 7.x overrides an exact pin across a major version. I checked that this is safe:

  • The only consumer in either lock is @tailwindcss/typography. It pins 6.0.10 exactly, up to its latest release (0.5.20).
  • The advisory lists 7.1.6 as the only patched version. 6.1.4 backports the same fix, but Dependabot would still flag it, so the pin is 7.1.7.
  • The one breaking change in 7.0.0 is "make insertions during iteration safe". Typography calls the parser in one function, commonTrailingPseudos in src/utils.js, and only uses astSync, remove, and prepend onto a fresh selector, so that change does not reach it.
  • The compiled CSS does not change (see Tests).

Companion Collate PR: open-metadata/openmetadata-collate#7700 (the same two fixes there, plus the vite 7.3.7 bump in collate-local-webserver). Each repo resolves its own node_modules, so neither PR depends on the other to merge.

Not fixed here: @tiptap/core #713 still needs the tiptap v2 → v3 migration of BlockEditor.

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 postcss-selector-parser block changes. In ui-core-components, yarn also split the unrelated string-width-cjs / strip-ansi-cjs alias entries, so I applied only the 8 vitest blocks and the parser block onto main's lock. yarn install --frozen-lockfile from a clean node_modules passes on both and installs vitest 4.1.12 and postcss-selector-parser 7.1.7.
  • ui-core-components vitest run: 914 passed and 6 failed, the same as on unmodified main, with no new failures. The 6 are the should render a tooltip trigger when tooltip is passed tests in components/application/tag/* (no button role found), and they fail on main too.
  • ui-core-components yarn build: passes, and dist/ is byte-identical to the main build, including ui-core-components.css.
  • openmetadata-ui Tailwind output: I compiled src/styles/tailwind.css (typography plugin, full @source scan, 74,272 candidates) through @tailwindcss/node before and after. The output is byte-identical: 482,293 bytes, with 266 prose rules that include the ::marker rules, which go through the parser.
  • The fix itself: parsing a 40k-token flat selector takes 446 ms on 6.0.10 and 27 ms on 7.1.7.

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, and those pull in the full chromium project. Neither package reaches the browser bundle. vitest runs only the core-components unit tests, and postcss-selector-parser runs only inside typography while the CSS is built, where the output is byte-identical (see above).

Manual testing performed

N/A, no runtime code path changes.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

This dependency-only PR appears safe to merge; no actionable issues were found.

Summary

Updates dependencies in both UI packages without changing source files.

  • Both UI workspaces now use postcss-selector-parser 7.1.7.
  • Core-components unit tests now use Vitest 4.1.12.

Reviews (1) · Last reviewed commit: "fix(security): patch @vitest/mocker and ..." · Reviewed by Greptile

- ui-core-components: vitest/@vitest/* 4.1.11 -> 4.1.12 (#773, #774)
- openmetadata-ui, ui-core-components: resolve postcss-selector-parser
  to 7.1.7 over @tailwindcss/typography's exact 6.0.10 pin (#749, #753).
  7.0's only break (safe insertion during iteration) does not touch
  typography's commonTrailingPseudos; compiled CSS is byte-identical.
@harsh-vador
harsh-vador requested a review from a team as a code owner October 22, 2026 08:15
@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 22, 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 22, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Pinning Vitest and postcss-selector-parser to patched versions changes test/build dependency resolution; parser incompatibility could disrupt UI CSS builds.

Bumps vitest and @vitest/* to 4.1.12 in the ui-core-components devDependencies and pins postcss-selector-parser to 7.1.7 via resolutions to close four Dependabot alerts. Lockfile-only changes with no source modifications. 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 22, 2026
@harsh-vador harsh-vador added the safe to test Add this label to run secure Github workflows on PRs label Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 79%
79.07% (128143/162059) 65.47% (44988/68713) 68.48% (25675/37491)

@sonarqubecloud

Copy link
Copy Markdown

@harsh-vador
harsh-vador enabled auto-merge October 22, 2026 09:01
@shah-harshit

Copy link
Copy Markdown
Contributor

LGTM!

@harsh-vador
harsh-vador added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit e9c307d Oct 22, 2026
118 of 124 checks passed
@harsh-vador
harsh-vador deleted the fix/dependabot-vitest-selector-parser-oct22 branch October 22, 2026 12:05
harsh-vador added a commit that referenced this pull request Oct 23, 2026
…35937) (#35976)

- openmetadata-ui, ui-core-components: vite 7.3.5 -> 7.3.7 (main got
  the core-components bump in #35837)
- openmetadata-ui, ui-core-components: resolve postcss-selector-parser
  to 7.1.7 over @tailwindcss/typography's exact 6.0.10 pin; compiled
  CSS unchanged.
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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants