macOS release binaries are ad-hoc signed and rejected by Gatekeeper; sign with Developer ID and notarize
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
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"
doneActual (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 --waitwith an App Store Connect API key) before it reaches the GitHub release; the job fails if Apple does not returnAccepted. - 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-jitJSC silently loses the JIT (a CPU-bound loop ran 9.67s vs 5.36s), and withoutcom.apple.security.cs.disable-library-validationprocess.dlopenof a native addon fails withmapping process and mapped file (non-platform) have different Team IDs. Rust engine binaries need no entitlements (--selftestpasses 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
- A notarized canary run:
codesign --verify --strict --verbose=2passes,codesign -dvshowsflags=0x10000(runtime), the Sisyphus Labs team and the stable identifier;spctl -a -vvv -t open --context context:primary-signatureprintsaccepted/source=Notarized Developer ID;notarytool historyshowsAccepted. - The signed omo binary passes the existing release smoke (
--versionline, first-run provisioning, pty smoke) and loads native addons. - The next pre-release's Darwin assets satisfy (1) when downloaded from the release.
Source: code-yeongyu/oh-my-openagent