Fix macOS CLI binary SIGKILL (Code Signature Invalid)#451
Open
citadelgrad wants to merge 1 commit intoRightNow-AI:mainfrom
Open
Fix macOS CLI binary SIGKILL (Code Signature Invalid)#451citadelgrad wants to merge 1 commit intoRightNow-AI:mainfrom
citadelgrad wants to merge 1 commit intoRightNow-AI:mainfrom
Conversation
- install.sh: strip quarantine/provenance xattrs before codesigning, surface errors instead of silencing them - release.yml: sign CLI binary with Developer ID certificate (reusing the same secrets already configured for the Tauri desktop app) instead of ad-hoc signing which is invalid on other machines
c738b4b to
7bb5c3e
Compare
Author
Local verification on macOS ARM64Tested end-to-end on Apple Silicon (macOS 26.3, arm64) by building from source and simulating the download flow: The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #452
Summary
The CLI binary (
openfang) is immediately killed on macOS Apple Silicon withSIGKILL (Code Signature Invalid)/Taskgated Invalid Signature. Two compounding issues in the release pipeline:release.yml: The CLI binary is signed withcodesign --force --sign -(ad-hoc) in CI. Ad-hoc signatures are machine-specific and invalid when transferred to another Mac. Meanwhile, the Tauri desktop app is properly signed with a Developer ID certificate + notarized.install.sh: The install script tries to re-sign locally but silences ALL errors (2>/dev/null || true). It also doesn't strip extended attributes first (com.apple.provenance), which causes codesign to produce an invalid result on newer macOS versions.Changes
scripts/install.shxattr -cr) before codesigning.github/workflows/release.ymlMAC_CERT_BASE64/MAC_CERT_PASSWORDsecrets already configured for the Tauri desktop build (lines 73-93)--timestampand--options runtimeflags for proper signatureNotes
release.ymlchange depends on the existingMAC_CERT_BASE64andMAC_CERT_PASSWORDCI secrets already configured for the desktop app buildinstall.shfix works independently and will improve the experience even before the CI change takes effectImmediate workaround (for users hitting this now)
Test plan
install.shstrips xattrs and re-signs successfully on macOS ARM64install.shshows error message if codesign fails (instead of silent failure)release.ymlCI signs CLI binary with Developer ID on macOS runners