Skip to content

Commit b3c9913

Browse files
committed
chore: update entitlments for node binaries
1 parent c602c75 commit b3c9913

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<!-- Minimal entitlements specifically for Node.js binary -->
6+
<key>com.apple.security.cs.allow-jit</key>
7+
<true/>
8+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
9+
<true/>
10+
</dict>
11+
</plist>

apps/desktop/forge.config.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,20 @@ const config: ForgeConfig = {
296296
: {
297297
osxSign: {
298298
identity: process.env.CODESIGNING_IDENTITY,
299+
// Apply different entitlements based on file path
300+
optionsForFile: (filePath: string) => {
301+
// Apply minimal entitlements to Node binary
302+
if (filePath.includes('node-binaries')) {
303+
return {
304+
entitlements: './entitlements.node.plist',
305+
hardenedRuntime: true,
306+
};
307+
}
308+
// Use default entitlements for everything else
309+
// https://www.npmjs.com/package/@electron/osx-sign#opts
310+
// !still need to do any
311+
return null as any;
312+
},
299313
},
300314
// Notarization for macOS
301315
...(process.env.SKIP_NOTARIZATION === "true"

0 commit comments

Comments
 (0)