fix(desktop): sign Windows native addons - #8206
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — The change expands signed Windows release artifacts to include native You can add or adjust custom eligibility rules. Learn more. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2fda067. Configure here.
| // Smart App Control validates unpacked native addons independently from | ||
| // the signed desktop executable. Extend release signing to every native | ||
| // Windows library that Electron or the server sidecar loads at runtime. | ||
| signExts: [".node", ".dll"], |
There was a problem hiding this comment.
Linux addons submitted for Windows signing
High Severity
signExts matches every unpacked .node file by extension, including Linux WSL natives in server.asar.unpacked such as Linux ffi-rs addons and pty.node. Azure Trusted Signing then attempts Authenticode on ELF binaries, which is likely to fail the signed Windows release build.
Reviewed by Cursor Bugbot for commit 2fda067. Configure here.


Problem
The signed Windows desktop build only signs
.exefiles by default. Native addons and libraries copied intoapp.asar.unpackedandserver.asar.unpackedremain unsigned, so Windows Smart App Control can block them independently from the signed T3 Code executable. Blockingffi-rs.win32-x64-msvc.nodecrash-loops the embedded backend and leaves the renderer on the genericfetch-session-state (HTTP 500)error screen.Fix
Add
.nodeand.dllto Electron Builder's WindowssignExtsconfiguration. Release builds will use the existing Azure Trusted Signing configuration for these native runtime files as well as the default executable targets.The Windows build-config test now asserts that both native extensions remain covered.
Fixes #8201.
Testing
vp test run scripts/build-desktop-artifact.test.ts -t "configures Windows executable metadata and native signing extensions"vp lint scripts/build-desktop-artifact.ts scripts/build-desktop-artifact.test.tspnpm --filter @t3tools/scripts typecheckA full run of
scripts/build-desktop-artifact.test.tsreached 46 passing tests; 6 existing environment-sensitive tests failed locally on Windows because the sandbox cannot create symlinks/spawn the packaged probe and an ancestornode_modulesis intentionally rejected. The focused test, lint, and typecheck pass.Generated with GPT-5 via Codex.
Note
Medium Risk
Changes Windows release signing scope for all signed builds; misconfiguration could break signing CI or leave natives unsigned if Electron Builder behavior differs from expectations.
Overview
Extends Windows release packaging so Electron Builder signs
.nodeand.dllfiles, not just the main.exe. The change setswin.signExtsto['.node', '.dll']increateBuildConfig, so Azure Trusted Signing (whensignedis enabled) also covers native addons and libraries unpacked fromapp.asarand the server sidecar—addressing Smart App Control blocking unsigned runtime natives (e.g. ffi-rs) that can crash-loop the embedded backend.The build-config test was renamed and now asserts
signExtsalongside existing checks for icon,signAndEditExecutable, and absentazureSignOptionson unsigned builds.Reviewed by Cursor Bugbot for commit 2fda067. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add
signExtsto Windows build config increateBuildConfigSets
winConfig.signExtsto['.node', '.dll']in the Windows branch ofcreateBuildConfigso Electron-builder signs native addons. Updates the test in build-desktop-artifact.test.ts to assert the extension list.Macroscope summarized 2fda067.