Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion scripts/build-desktop-artifact.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
}).pipe(Effect.provide(ConfigProvider.layer(ConfigProvider.fromEnv({ env: {} })))),
);

it.effect("keeps executable resource editing enabled for unsigned Windows builds", () =>
it.effect("configures Windows executable metadata and native signing extensions", () =>
Effect.gen(function* () {
const config = yield* createBuildConfig(
"win",
Expand All @@ -1232,6 +1232,7 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {

const win = config.win as Record<string, unknown>;
assert.equal(win.icon, "icon.ico");
assert.deepStrictEqual(win.signExts, [".node", ".dll"]);
assert.equal(win.signAndEditExecutable, true);
assert.notProperty(win, "azureSignOptions");
}).pipe(Effect.provide(ConfigProvider.layer(ConfigProvider.fromEnv({ env: {} })))),
Expand Down
4 changes: 4 additions & 0 deletions scripts/build-desktop-artifact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2189,6 +2189,10 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
const winConfig: Record<string, unknown> = {
target: [target],
icon: "icon.ico",
// 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"],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2fda067. Configure here.

// Resource editing applies the product metadata and icon independently
// of code signing. Disabling it for local unsigned builds leaves the
// packaged executable with Electron's stock icon.
Expand Down
Loading