fix(sign): embed Developer ID intermediate so Apple notary accepts#22
Merged
Conversation
The v1.2.1 release.yaml ran rcodesign successfully but Apple's notary
rejected with:
"The binary is not signed with a valid Developer ID certificate."
A typical Keychain Access `.p12` export packages only the leaf cert
("Developer ID Application: <name> (TEAMID)") + private key — the
intermediate ("Developer ID Certification Authority") isn't included.
rcodesign embeds whatever's in the .p12, so the resulting signature
has the leaf only. Apple's notary can't trace the chain back to a
trusted root, so it marks the submission Invalid.
Fix: have sign-macos.sh fetch the intermediate from Apple's stable URL
and pass it to rcodesign as an extra cert to embed. No re-export
required from the user.
Also: turn `output: true` on the goreleaser hook so future failures in
this script actually surface in the workflow log — previously the
script's stdout/stderr was hidden, which is what kept this debugging
blind.
This was referenced May 19, 2026
Closed
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.
Diagnosis
The v1.2.1 release got past goreleaser — `rcodesign sign` ran cleanly on each darwin binary — but Apple's notary rejected the submission (run 26098346551):
```
notary log> {
notary log> "path": "refuse_darwin_arm64.zip/refuse",
notary log> "message": "The binary is not signed with a valid Developer ID certificate."
notary log> }
```
Root cause
A typical Keychain Access `.p12` export only packages the leaf cert (`Developer ID Application: (TEAMID)`) + the matching private key. The intermediate (`Developer ID Certification Authority`) isn't included. rcodesign embeds whatever's in the .p12, so the resulting signature has the leaf only. Apple's notary can't trace the chain back to a trusted root, so the submission is marked `Invalid`.
Fix
`scripts/sign-macos.sh` now fetches the intermediate from Apple's stable URL (`https://www.apple.com/certificateauthority/DeveloperIDCA.cer\`) and passes it to rcodesign as an extra cert to embed:
```sh
rcodesign sign \
--p12-file "$p12" \
--p12-password "$MACOS_SIGN_PASSWORD" \
--certificate-der-file "$intermediate" \
--code-signature-flags runtime \
"$BINARY"
```
No re-export required from the user side. The intermediate cert is public.
Also turns `output: true` on the goreleaser hook so future failures in this script actually surface in the workflow log — previously the script's stdout/stderr was hidden, which is what kept the v1.2.1 debug blind.
Test plan