A desktop coding agent with free access to frontier models.
TypeScript
fix: engine signature check by team only
ogsamrat70c5dd95b90f
diff --git a/apps/desktop/electron/build-variant.mjs b/apps/desktop/electron/build-variant.mjsindex b6667ca1..d6dcb509 100644--- a/apps/desktop/electron/build-variant.mjs+++ b/apps/desktop/electron/build-variant.mjs@@ -67,7 +67,7 @@ function sha256File(file) {/** The Apple Developer ID team that signs the app and its bundled engine. */export const ENGINE_SIGNING_TEAM = "2KFG4BXC8K";/** codesign requirement: a Developer ID certificate (Apple anchor) of that team. */-export const ENGINE_SIGNING_REQUIREMENT = `identifier "ai.omnirush.desktop" and anchor apple generic and certificate leaf[subject.OU] = "${ENGINE_SIGNING_TEAM}"`;+export const ENGINE_SIGNING_REQUIREMENT = `anchor apple generic and certificate leaf[subject.OU] = "${ENGINE_SIGNING_TEAM}"`;/*** macOS: whether `file` carries a valid signature by this app's team. Signing anddiff --git a/apps/desktop/electron/build-variant.test.mjs b/apps/desktop/electron/build-variant.test.mjsindex 962c173e..1fc76c0c 100644--- a/apps/desktop/electron/build-variant.test.mjs+++ b/apps/desktop/electron/build-variant.test.mjs@@ -122,7 +122,7 @@ test("macOS: signing changes the engine after its sha256 is recorded; this team'const stat = () => ({ size: 1, mtimeMs: 1 });assert.equal(engineSignedByTeam("/x/opencode", { platform: "darwin", run, stat }), true);assert.deepEqual(calls[0], ["/usr/bin/codesign", "--verify", "--strict", `-R=${ENGINE_SIGNING_REQUIREMENT}`, "/x/opencode"]);- assert.match(ENGINE_SIGNING_REQUIREMENT, /^identifier "ai\.omnirush\.desktop" and anchor apple generic and certificate leaf\[subject\.OU\] = "2KFG4BXC8K"$/);+ assert.match(ENGINE_SIGNING_REQUIREMENT, /^anchor apple generic and certificate leaf\[subject\.OU\] = "2KFG4BXC8K"$/);assert.equal(engineSignedByTeam("/x/other", { platform: "darwin", run: () => ({ status: 1 }), stat }), false);// A pass is cached (same file, size, time): codesign is not asked again.assert.equal(engineSignedByTeam("/x/opencode", { platform: "darwin", run, stat }), true);diff --git a/apps/server/src/release-guard.ts b/apps/server/src/release-guard.tsindex 5af0f9d9..076660c0 100644--- a/apps/server/src/release-guard.ts+++ b/apps/server/src/release-guard.ts@@ -81,7 +81,7 @@ async function fileSha256(path: string): Promise<string> {/** The Apple Developer ID team that signs the app and its bundled engine (electron/build-variant.mjs). */export const ENGINE_SIGNING_TEAM = "2KFG4BXC8K";-export const ENGINE_SIGNING_REQUIREMENT = `identifier "ai.omnirush.desktop" and anchor apple generic and certificate leaf[subject.OU] = "${ENGINE_SIGNING_TEAM}"`;+export const ENGINE_SIGNING_REQUIREMENT = `anchor apple generic and certificate leaf[subject.OU] = "${ENGINE_SIGNING_TEAM}"`;/*** macOS: whether `file` carries a valid signature by this app's team. Signing and