Skip to content

fix(deps): keep tar 6 for @electron/rebuild so packaging still works - #39

Merged
ralyodio merged 1 commit into
masterfrom
fix/electron-rebuild-tar
Aug 6, 2026
Merged

fix(deps): keep tar 6 for @electron/rebuild so packaging still works#39
ralyodio merged 1 commit into
masterfrom
fix/electron-rebuild-tar

Conversation

@ralyodio

@ralyodio ralyodio commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What broke

The tar@6 -> ^7.5.19 override added in #38 (to clear critical advisory GHSA-23hp-3jrh-7fpw) broke the v0.9.46 desktop release on every platform:

@electron/rebuild/lib/clang-fetcher.js:5
import tar from 'tar';
SyntaxError: The requested module 'tar' does not provide an export named 'default'

@electron/rebuild default-imports tar. tar 6 is CommonJS and satisfies that; tar 7 is ESM with named exports only.

The fix

Pin tar to ^6.2.1 for @electron/rebuild alone via a scoped pnpm override. It is build tooling and never enters the production graph, so:

  • pnpm audit --prod --audit-level critical still exits 0 (zero criticals)
  • everything that actually ships stays on tar 7.5.22

Why CI didn't catch it

Desktop Release only runs on a tag. PR checks run pnpm build, which never invokes electron-builder — so the full pre-commit gauntlet and all 13 PR checks passed on a tree that could not be packaged.

Verification

Ran the packaging locally rather than trusting the build alone. executing @electron/rebuild now proceeds instead of failing to load; it stops later only at Error: not found: make, a missing local C toolchain (CI installs it).

Note: v0.9.46 is unusable — its tag points at the broken lockfile — so this ships as 0.9.47.

Bumping tar across the 6.x major to clear GHSA-23hp-3jrh-7fpw broke the
desktop release. @electron/rebuild does a default import:

  import tar from 'tar';

tar 6 is CommonJS and satisfies that. tar 7 is ESM with named exports
only, so every platform died before it built anything:

  SyntaxError: The requested module 'tar' does not provide
  an export named 'default'

Pin tar back to ^6.2.1 for @electron/rebuild alone. It is build tooling
and never enters the production graph, so `pnpm audit --prod` still
reports zero criticals; everything that ships stays on tar 7.5.22.

This was missed because `pnpm build` does not invoke electron-builder.
Only the package step does, and that runs solely in CI, so the whole
pre-commit gauntlet passed on a tree that could not be packaged.
Verified this time by running the packaging itself: @electron/rebuild
now executes instead of failing to load.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

159 finding(s)

HIGH/CRITICAL: 111 | MEDIUM: 48

Severity Rule Location
HIGH secret-generic-credential apps/desktop/src/main/ipc/auth.test.ts:18
HIGH secret-generic-credential apps/desktop/src/main/ipc/auth.test.ts:19
HIGH secret-generic-credential apps/desktop/src/main/ipc/auth.test.ts:51
HIGH secret-generic-credential apps/desktop/src/main/ipc/auth.test.ts:52
HIGH secret-generic-credential apps/desktop/src/main/ipc/auth.test.ts:66
HIGH secret-generic-credential apps/desktop/src/main/ipc/auth.test.ts:170
HIGH secret-generic-credential apps/desktop/src/main/ipc/chat.test.ts:16
HIGH secret-generic-credential apps/desktop/src/main/ipc/chat.test.ts:17
HIGH secret-generic-credential apps/desktop/src/main/ipc/session.test.ts:16
HIGH secret-generic-credential apps/desktop/src/main/ipc/session.test.ts:17
HIGH secret-generic-credential apps/desktop/src/renderer/hooks/useRTMPStreaming.test.ts:159
HIGH secret-generic-credential apps/desktop/src/renderer/hooks/useWebRTCHostAPI.test.ts:14
HIGH secret-generic-credential apps/desktop/src/renderer/hooks/useWebRTCHostSFUAPI.test.ts:42
HIGH secret-generic-credential apps/desktop/src/renderer/hooks/useWebRTCHostSFUAPI.test.ts:137
HIGH secret-generic-credential apps/desktop/src/renderer/hooks/useWebRTCViewerAPI.test.ts:13
HIGH secret-generic-credential apps/desktop/src/renderer/hooks/useWebRTCViewerSFUAPI.test.ts:37
HIGH secret-generic-credential apps/desktop/src/renderer/hooks/useWebRTCViewerSFUAPI.test.ts:127
HIGH secret-generic-credential apps/livekit/fly.toml:12
HIGH manifest-typosquat apps/mobile/package.json:43
HIGH secret-generic-credential apps/mobile/src/hooks/useWebRTCHost.test.ts:13
HIGH secret-generic-credential apps/mobile/src/hooks/useWebRTCViewer.test.ts:13
HIGH secret-generic-credential apps/mobile/src/lib/api.test.ts:11
HIGH secret-generic-credential apps/mobile/src/lib/api.test.ts:12
HIGH secret-generic-credential apps/mobile/src/lib/api/auth.test.ts:18
HIGH secret-generic-credential apps/mobile/src/lib/api/auth.test.ts:19
HIGH secret-generic-credential apps/mobile/src/lib/api/auth.test.ts:34
HIGH secret-generic-credential apps/mobile/src/lib/api/auth.test.ts:37
HIGH secret-generic-credential apps/mobile/src/lib/api/auth.test.ts:38
HIGH secret-generic-credential apps/mobile/src/lib/api/auth.test.ts:42
HIGH secret-generic-credential apps/mobile/src/lib/api/auth.test.ts:73
HIGH secret-generic-credential apps/mobile/src/lib/api/auth.test.ts:83
HIGH secret-generic-credential apps/mobile/src/lib/api/auth.test.ts:99
HIGH secret-generic-credential apps/mobile/src/lib/api/chat.test.ts:11
HIGH secret-generic-credential apps/mobile/src/lib/api/sessions.test.ts:11
HIGH secret-generic-credential apps/mobile/src/lib/secure-storage.test.ts:12
HIGH secret-generic-credential apps/mobile/src/lib/secure-storage.test.ts:13
HIGH secret-generic-credential apps/turn/fly.toml:11
HIGH secret-generic-credential apps/web/src/app/api/auth/login/route.test.ts:26
HIGH secret-generic-credential apps/web/src/app/api/auth/login/route.test.ts:54
HIGH secret-generic-credential apps/web/src/app/api/auth/login/route.test.ts:74
HIGH secret-generic-credential apps/web/src/app/api/auth/login/route.test.ts:121
HIGH secret-generic-credential apps/web/src/app/api/auth/reset-password/route.test.ts:44
HIGH secret-generic-credential apps/web/src/app/api/auth/reset-password/route.test.ts:45
HIGH secret-generic-credential apps/web/src/app/api/auth/reset-password/route.test.ts:56
HIGH secret-generic-credential apps/web/src/app/api/auth/reset-password/route.test.ts:65
HIGH secret-generic-credential apps/web/src/app/api/auth/reset-password/route.test.ts:82
HIGH secret-generic-credential apps/web/src/app/api/auth/reset-password/route.test.ts:83
HIGH secret-generic-credential apps/web/src/app/api/auth/reset-password/route.test.ts:99
HIGH secret-generic-credential apps/web/src/app/api/auth/reset-password/route.test.ts:100
HIGH secret-generic-credential apps/web/src/app/api/auth/reset-password/route.test.ts:117

…and 109 more. Full results in the Security tab.

Snippets are redacted; ThreatCrush never prints matched credential material.

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn Medium
Deprecated by its maintainer: npm tar

Reason: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me

From: pnpm-lock.yamlnpm/electron-builder@26.4.0npm/tar@6.2.1

ℹ Read more on: This package | This alert | What is a deprecated package?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Research the state of the package and determine if there are non-deprecated versions that can be used, or if it should be replaced with a new, supported solution.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/tar@6.2.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@ralyodio
ralyodio merged commit 280e798 into master Aug 6, 2026
13 checks passed
@ralyodio
ralyodio deleted the fix/electron-rebuild-tar branch August 6, 2026 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant