diff --git a/apps/desktop/entitlements.node.plist b/apps/desktop/entitlements.node.plist new file mode 100644 index 0000000..09ac564 --- /dev/null +++ b/apps/desktop/entitlements.node.plist @@ -0,0 +1,11 @@ + + + + + + com.apple.security.cs.allow-jit + + com.apple.security.cs.allow-unsigned-executable-memory + + + \ No newline at end of file diff --git a/apps/desktop/forge.config.ts b/apps/desktop/forge.config.ts index 966884c..f64464a 100644 --- a/apps/desktop/forge.config.ts +++ b/apps/desktop/forge.config.ts @@ -296,6 +296,20 @@ const config: ForgeConfig = { : { osxSign: { identity: process.env.CODESIGNING_IDENTITY, + // Apply different entitlements based on file path + optionsForFile: (filePath: string) => { + // Apply minimal entitlements to Node binary + if (filePath.includes('node-binaries')) { + return { + entitlements: './entitlements.node.plist', + hardenedRuntime: true, + }; + } + // Use default entitlements for everything else + // https://www.npmjs.com/package/@electron/osx-sign#opts + // !still need to do any + return null as any; + }, }, // Notarization for macOS ...(process.env.SKIP_NOTARIZATION === "true"