Repository navigation
Bump tar to 8.1.2 - #39769
Bump tar to 8.1.2#39769
Conversation
tar <8.0.0 lets an archive create a symlink that escapes the extraction directory through an in-archive symlink chain. tar is only pulled in by node-gyp@latest, which Yarn injects for packages whose scripts mention node-gyp; node-gyp never runs in our installs because every native dependency ships N-API prebuilds.
| "serialize-javascript": "7.1.4", | ||
| "postcss-selector-parser": "7.1.7" | ||
| "postcss-selector-parser": "7.1.7", | ||
| "tar": "^8.1.2" |
There was a problem hiding this comment.
⚠️ Bug: tar 8 pin breaks node-gyp's header download, and node-gyp can run
This pull request contradicts the Accepted record ADR:2026-11-19-ui-yarn-resolutions-pin-only-what-a-fresh-resolve-gets-wrong, so it is blocking. That record says a resolution may cross a major its dependent did not declare only "after checking that what the dependent imports still exists in the forced major". tar has one requester in both lockfiles, [email protected], which declares tar: ^7.5.7. The description skips that check and argues that node-gyp never runs.
That argument does not hold. Yarn injects node-gyp@npm:latest into [email protected], @tree-sitter-grammars/[email protected], [email protected] and others. Only [email protected] and tree-sitter-json have built: false. The other packages install through node-gyp-build, and its install script falls back to node-gyp rebuild when no matching prebuild exists. The record already notes that linux arm64 is missing working prebuilds for some tree-sitter packages.
The import check fails. node-gyp's install.js downloads headers by using tar.extract({strip, filter, cwd}) as the destination of a stream pipeline. tar v8.0.0 removed Node stream support from its commands, and extract() now has to be given an input option or a file. On any machine where a build falls back to source, the header download breaks, and so does the install.
The bare tar key also leaves out the dependent's name. The record's consequences rely on each pin naming its dependent so that removing it later is a lookup.
Either supersede the record with a new ADR stating that the pin knowingly breaks node-gyp source builds (and add dependenciesMeta built: false for every remaining native package so node-gyp truly never runs), or keep tar within node-gyp's major and scope the pin to the dependent so it is removed when node-gyp ships tar 8 support (nodejs/node-gyp#3396). Note: this scoped pin is only valid if a patched 7.x exists; otherwise the ADR supersession is required.:
"node-gyp/tar": "^8.1.2"
Was this helpful? React with 👍 / 👎
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
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 |
There was a problem hiding this comment.
🔵 Needs a closer look
The override breaks node-gyp’s header-extraction API, making reliance on native prebuilds and loss of source-build fallback require cross-platform validation unavailable in this review.
No open issues 🎉
What changed in this PR
No blocking issues. This PR updates the transitive tar dependency in both UI projects to address GHSA-4pf9-5fpx-xmr6.
Changes:
- Adds
tar: ^8.1.2resolutions to both manifests. - Regenerates lockfiles with tar 8.1.2 and removes unused dependencies.
Placement: Affects UI installation tooling, not application source. Reported build and installation checks were not independently verified.
Trade-off: none — no user-visible cost.
Recommendation: Approve based on the supplied changes.
| File | Description |
|---|---|
| openmetadata-ui/src/main/resources/ui/yarn.lock | Locks tar 8.1.2 and removes obsolete dependencies. |
| openmetadata-ui/src/main/resources/ui/package.json | Adds the UI application's tar resolution. |
| openmetadata-ui-core-components/src/main/resources/ui/yarn.lock | Locks tar 8.1.2 and removes obsolete dependencies. |
| openmetadata-ui-core-components/src/main/resources/ui/package.json | Adds the component library's tar resolution. |
Review effort: Balanced
Code Review
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source
|
🤖 Backport to |
|
🤖 Backport to |
|
🤖 Backport to |
|
🤖 Backport to |
(cherry picked from commit daed271) Co-authored-by: Karan Hotchandani <[email protected]>
(cherry picked from commit daed271) Co-authored-by: Karan Hotchandani <[email protected]>
Describe your changes:
No linked issue: this is a dependency bump for advisory GHSA-4pf9-5fpx-xmr6. In
tar>= 7.5.5 and < 8.0.0, an archive can create a symlink that escapes the extraction directory through a chain of symlinks inside the archive. 7.x has no patched release.Both UI projects resolved
[email protected]. It comes only throughnode-gyp@latest, which Yarn 4 adds to any package whose registry scripts mentionnode-gyp(fsevents,tree-sitter*,evp_bytestokey,node-addon-api,@swagger-api/apidom-parser-adapter-json).This PR adds a
resolutionsentry,"tar": "^8.1.2", to:openmetadata-ui/src/main/resources/ui/package.jsonopenmetadata-ui-core-components/src/main/resources/ui/package.jsonThe lockfiles were regenerated.
tar's old 7.x deps (chownr,minizlib,@isaacs/fs-minipass) drop out.Why forcing the major is safe here: tar 8 rewrote its API, and
[email protected](still ontar@^7.5.7; the upgrade is pending in nodejs/node-gyp#3396) cannot extract headers with it. But node-gyp never runs in our installs:[email protected]/0.22.4,tree-sitter-json,@tree-sitter-grammars/tree-sitter-yaml,fsevents) loads ready-made N-API binaries for darwin, linux and win on x64 and arm64;[email protected]andtree-sitter-jsonare alreadybuilt: false;--mode=skip-build.Once node-gyp ships tar 8 support, this resolution can be dropped.
Type of change:
High-level design:
N/A — small dependency resolution change (2
package.jsonlines plus lockfiles).Tests:
Which test layer and why
No new tests: this is a dependency resolution with no code change. Verification was a full build, plus running the app.
Use cases covered
yarn install --immutableand build scripts enabled;node_modules/taris 8.1.2 and no native module compiles from source.Unit tests
Not applicable — no code changes.
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
All on Node v22.23.5 (
.nvmrc):yarn install --immutablein both UI projects with build scripts enabled. Both passed.yarn why tarshows[email protected] → [email protected], and notree-sitter*package produced abuild/folder.mvn -DskipTests clean package. BUILD SUCCESS, all modules, 2:57, including both UI modules'yarn install --immutableand Vite builds../docker/run_local_docker.sh -s true -i false. Server, MySQL and Elasticsearch are healthy, and/api/v1/system/versionreports the built revision./docs(the swagger/apidom page whose deps pull in node-gyp). Both rendered with 0 console errors.node-gyp-buildto confirm none falls back to node-gyp.UI screen recording:
Not applicable — dependency resolution only; no UI behaviour change.
Checklist:
Fixes <issue-number>: <short explanation>— no issue; dependency bump.Fixes #<issue-number>above — no issue; dependency bump.package.jsontakes no comments, so the reasoning is above.REVIEW.mdand fixed every 🔴 finding, or answered it on the line below.Reviewed
7cce24fe707. REVIEW.md excludesyarn.lockand lockfile-only bumps from review. For "a dependency major" I checked Collate: its UI does not depend ontar, so no companion PR is needed. No 🔴 findings.