Skip to content

Build/unsigned mac packaging - #1

Merged
digitalysin merged 2 commits into
mainfrom
build/unsigned-mac-packaging
Sep 17, 2026
Merged

digitalysin merged 2 commits into
mainfrom
build/unsigned-mac-packaging

Conversation

@digitalysin

Copy link
Copy Markdown
Owner

No description provided.

digitalysin and others added 2 commits September 17, 2026 16:58
Packaging never used a certificate, but it did not say so either: with no
identity set, electron-builder auto-discovers whatever sits in the local
keychain, so a build on a machine holding a Development certificate produced an
app that only ran on that machine. When it found nothing it skipped signing
altogether, which is worse than it sounds -- the bundle keeps the signature
Electron shipped with, over resources electron-builder has since rewritten, and
`codesign --verify` fails it with "code has no resources but signature indicates
they must be present". Gatekeeper calls a quarantined copy of that "damaged and
can't be opened", which right-click Open will not clear.

`identity: "-"` signs ad-hoc instead: no certificate, no team, nothing Gatekeeper
accepts -- but a signature that verifies, so a quarantined copy gets the ordinary
unidentified-developer dialog that right-click Open does clear. `dist:mac` sets
CSC_IDENTITY_AUTO_DISCOVERY=false as well, so a certificate in the keychain
cannot quietly change what a local build produces; CI already passed it.

Verified against a real `npm run dist:mac`: both architectures report
flags=0x2(adhoc) with no team identifier, `codesign --verify --deep --strict`
exits 0, the signature survives the zip round-trip, and the binary executes on
arm64 once the quarantine flag is removed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The old two lines said builds were unsigned and how to sign them, which left out
the only part a recipient needs: macOS quarantines the app the moment it arrives
by download, AirDrop, Slack or email, and an ad-hoc signature does not clear
that. Right-click Open, or `xattr -dr com.apple.quarantine`, once per install.

Also records why the build signs ad-hoc rather than not at all, with the
`codesign --verify` error the previous arrangement produced, and completes the
notarisation note: dropping `identity` is not enough, hardenedRuntime has to go
back on for Apple to accept the upload.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@digitalysin
digitalysin merged commit cc508a3 into main Sep 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant