Orkas is an open-source (MIT), local-first AI team for your desktop: a Commander turns your goal into to-dos and coordinates 16 built-in specialist agents plus Claude Code, Codex, OpenCode, OpenClaw and Hermes, with projects, scheduled automations and connectors. Free app for macOS & Windows; built-in models or your own keys.
JavaScript agent-collaborationagent-harnessagent-orchestrationagent-teamagent-workflowai-assistantai-automationai-employeeai-productivityai-teamai-workflowautonomous-agentsclaude-code-guiclaude-coworkdesktop-agentlocal-firstmulti-agentmulti-agent-systemself-evolving-agentstask-automation
fix(build): restrict macOS signing exceptions
Orkas2597923f5286
diff --git a/product/signing/entitlements.mac.inherit.plist b/product/signing/entitlements.mac.inherit.plistindex 89ad76d4..d389af8d 100644--- a/product/signing/entitlements.mac.inherit.plist+++ b/product/signing/entitlements.mac.inherit.plist@@ -2,14 +2,10 @@<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict>- <!-- Nested helper processes (renderer, GPU, plugin) need the same- hardened-runtime exceptions as the main app; without this the- inherited signature blocks JIT and bundled native modules. --><key>com.apple.security.cs.allow-jit</key><true/>+ <!-- Preserve executable memory compatibility for the bundled Intel Node runtime. --><key>com.apple.security.cs.allow-unsigned-executable-memory</key><true/>- <key>com.apple.security.cs.disable-library-validation</key>- <true/></dict></plist>diff --git a/product/signing/entitlements.mac.plist b/product/signing/entitlements.mac.plistindex a00169ed..ab78ecfe 100644--- a/product/signing/entitlements.mac.plist+++ b/product/signing/entitlements.mac.plist@@ -2,18 +2,8 @@<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict>- <!-- V8 requires writable+executable memory for JIT. -->+ <!-- Electron's main process needs JIT, but not the child runtime exceptions. --><key>com.apple.security.cs.allow-jit</key><true/>- <!-- Chromium still maps executable memory in a few paths that are not- covered by allow-jit alone. -->- <key>com.apple.security.cs.allow-unsigned-executable-memory</key>- <true/>- <!-- The bundled runtime and native modules (better-sqlite3, sharp,- onnxruntime, sqlite-vec, and the prepared node/python/ffmpeg/whisper- binaries) are not all signed by the same Team ID as the app, so the- hardened runtime must not enforce library validation. -->- <key>com.apple.security.cs.disable-library-validation</key>- <true/></dict></plist>diff --git a/test/main/util/mac-signing-entitlements.test.ts b/test/main/util/mac-signing-entitlements.test.tsnew file mode 100644index 00000000..0d815648--- /dev/null+++ b/test/main/util/mac-signing-entitlements.test.ts@@ -0,0 +1,46 @@+import { readFileSync } from 'node:fs';+import { join } from 'node:path';+import { XMLParser, XMLValidator } from 'fast-xml-parser';+import { describe, expect, it } from 'vitest';++type PlistEntry = { key?: { '#text': string }[]; true?: unknown[] };+type OrderedPlist = { plist: { dict: PlistEntry[] }[] }[];++function configuredPolicy(field: 'entitlements' | 'entitlementsInherit'): Record<string, boolean> {+ const root = process.cwd();+ const { build } = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8'));+ // Follow the builder configuration so a dangling path fails this contract.+ const xml = readFileSync(join(root, build.mac[field]), 'utf8');+ expect(XMLValidator.validate(xml)).toBe(true);+ const document = new XMLParser({+ preserveOrder: true,+ ignoreDeclaration: true,+ processEntities: false,+ }).parse(xml) as OrderedPlist;+ const entries = document[0].plist[0].dict;+ expect(entries.length % 2).toBe(0);+ const policy: Record<string, boolean> = {};+ for (let index = 0; index < entries.length; index += 2) {+ const key = entries[index].key?.[0]['#text'];+ expect(key).toBeTypeOf('string');+ expect(entries[index + 1]).toEqual({ true: [] });+ expect(Object.hasOwn(policy, key!)).toBe(false);+ policy[key!] = true;+ }+ return policy;+}++describe('macOS signing entitlements', () => {+ it('supports main-process JIT without granting child-only runtime exceptions', () => {+ expect(configuredPolicy('entitlements')).toEqual({+ 'com.apple.security.cs.allow-jit': true,+ });+ });++ it('preserves inherited Intel Node executable memory without disabling library validation', () => {+ expect(configuredPolicy('entitlementsInherit')).toEqual({+ 'com.apple.security.cs.allow-jit': true,+ 'com.apple.security.cs.allow-unsigned-executable-memory': true,+ });+ });+});