macOS release binaries are ad-hoc signed and rejected by Gatekeeper; sign with Developer ID and notarize

Author: code-yeongyuCreated Sep 29, 2026Updated Sep 29, 2026

Summary

Every macOS binary omo ships is ad-hoc signed (or carries a broken signature), so Gatekeeper rejects all of them. A user who downloads omo-darwin-* or senpi-desktop-engine-darwin-* through a browser (quarantine xattr set) gets "Apple could not verify ..." instead of a running binary, and the desktop engine's TCC grants (Accessibility, Screen Recording) are keyed to a per-build cdhash, so every release invalidates them. Sisyphus Labs now has an Apple Developer Program membership, so these assets should be Developer ID signed with the hardened runtime and notarized.

Reproduction

bash
gh release download v5.1.0 --repo code-yeongyu/oh-my-openagent -p omo-darwin-arm64 -p omo-darwin-x64 -p 'senpi-desktop-engine-darwin-*'
for f in omo-darwin-* senpi-desktop-engine-darwin-*; do
  codesign -dv "$f" 2>&1 | grep -E 'flags|Signature|TeamIdentifier|Authority'
  spctl -a -vvv -t open --context context:primary-signature "$f"
done

Actual (v5.1.0, measured 2026-09-29)

Asset Signature spctl
omo-darwin-arm64 flags=0x20002(adhoc,linker-signed), Identifier=a.out, no team rejected
omo-darwin-x64 Bun's own Developer ID Application: Jarred Sumner (7FRXF46ZSN) signature, invalidated because the compiled payload is appended after Bun signed its runtime invalid signature (code or signature have been modified)
senpi-desktop-engine-darwin-arm64 / -x64 flags=0x2(adhoc), Identifier=senpi-desktop-engine-darwin-arm64-<hash> (script/desktop-engine-release.ts:30 runs codesign -s -) rejected

Expected (ideal state)

  • Every Darwin release asset (omo-darwin-arm64, omo-darwin-x64, omo-darwin-x64-baseline, senpi-desktop-engine-darwin-arm64, senpi-desktop-engine-darwin-x64) is signed with the Sisyphus Labs Developer ID Application certificate, hardened runtime, a secure timestamp, and a stable identifier (ai.sisyphuslabs.omo, ai.sisyphuslabs.senpi-desktop-engine), so the designated requirement is team + identifier and TCC grants survive upgrades.
  • Every one of them is notarized (notarytool submit --wait with an App Store Connect API key) before it reaches the GitHub release; the job fails if Apple does not return Accepted.
  • Bun-compiled omo binaries carry the entitlements Bun's own notarized runtime ships with. Measured locally on a hardened-runtime re-sign: without com.apple.security.cs.allow-jit JSC silently loses the JIT (a CPU-bound loop ran 9.67s vs 5.36s), and without com.apple.security.cs.disable-library-validation process.dlopen of a native addon fails with mapping process and mapped file (non-platform) have different Team IDs. Rust engine binaries need no entitlements (--selftest passes hardened).
  • Signing material lives only in GitHub Actions secrets, imported into a throwaway keychain that is deleted on every exit path; values are never printed or committed.
  • Missing secrets never silently ship an unsigned release once signing is turned on: a repository variable makes absence fatal.
  • A dispatch-only canary re-signs and notarizes existing assets and uploads them as a workflow artifact, so the credentials can be proven without cutting a release.

Stapling: bare Mach-O executables cannot carry a stapled ticket, so Gatekeeper fetches the notarization ticket online on first launch of a quarantined copy. An offline first launch of a quarantined download still needs the ticket lookup; downloads through curl/gh/omo update are not quarantined and are unaffected.

Scope

In: the Darwin legs of publish-platform.yml (desktop-engine job and build job), a signing/notarization script, entitlements, a canary workflow, workflow tests. Out: the desktop app (separate repo, separate signing path), comment-checker (separate repo, tracked there), senpi's own release assets.

Secrets (names only)

CSC_LINK (base64 Developer ID Application .p12), CSC_KEY_PASSWORD, APPLE_API_KEY (App Store Connect .p8 contents), APPLE_API_KEY_ID, APPLE_API_ISSUER; variable MACOS_SIGNING_REQUIRED. Same names the desktop app release workflow already reads.

Acceptance criteria

  1. A notarized canary run: codesign --verify --strict --verbose=2 passes, codesign -dv shows flags=0x10000(runtime), the Sisyphus Labs team and the stable identifier; spctl -a -vvv -t open --context context:primary-signature prints accepted / source=Notarized Developer ID; notarytool history shows Accepted.
  2. The signed omo binary passes the existing release smoke (--version line, first-run provisioning, pty smoke) and loads native addons.
  3. The next pre-release's Darwin assets satisfy (1) when downloaded from the release.

Source: code-yeongyu/oh-my-openagent