Repository navigation
refactor(packaging): sign Keybase.app inside-out instead of codesign --deep (untested on build machine) - #29765
Merged
chrisnojima merged 4 commits intoOct 15, 2026
Conversation
chrisnojima
added this pull request to stack #29759
October 12, 2026 19:16
chrisnojima
force-pushed
the
nojima/HOTPOT-packaging-signing
branch
from
October 12, 2026 19:21
9570a0f to
b7b43b7
Compare
chrisnojima
force-pushed
the
nojima/HOTPOT-packaging-signing
branch
2 times, most recently
from
October 14, 2026 14:25
4a12b45 to
a2a3641
Compare
chrisnojima
force-pushed
the
nojima/HOTPOT-packaging-signing
branch
from
October 14, 2026 17:42
a2a3641 to
a56df36
Compare
chrisnojima
marked this pull request as ready for review
October 14, 2026 18:04
…sign --deep kb_sign_app_inside_out (lib.sh) finds nested code by Mach-O type and bundle extension, signs it deepest-first, then frameworks, helper apps and the main app, so Electron upgrades no longer need the hand-kept dylib list. Entitlements per item match what the --deep run produced (main app, helper apps and crashpad handler get Keybase.entitlements; dylibs, frameworks and ShipIt get none); Resources/ (the pre-signed installer/updater apps) and SharedSupport/ are left as they are, as before. kb_sign_binary drops --deep, which was a no-op on single binaries.
Skip the Gatekeeper assessment of Keybase.app when KB_CODESIGN_IDENTITY=-, since spctl rejects an ad-hoc signature. kb_sign_binary now drops --timestamp for ad-hoc signing, matching kb_sign_app_inside_out.
chrisnojima
force-pushed
the
nojima/HOTPOT-packaging-signing
branch
from
October 15, 2026 15:57
ffc9bad to
ed66d4d
Compare
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.
What
Signs
Keybase.appinside-out instead of withcodesign --deep, which Apple deprecates for signing. Stacked on #29764.kb_sign_app_inside_out <app> <entitlements>inlib.sh:.app,.frameworkand.xpcbundles. Only candidates are classified: executable files and*.dylib,*.soand*.node.--force --options runtime --timestampwith the Developer ID (no--timestampwhen signing ad-hoc).Resources/(ShipIt) don't.Resources/KeybaseInstaller.appandResources/KeybaseUpdater.app, which arrive signed by Keybase with their own entitlements, andSharedSupport/, whose binarieskb_sign_binarysigns earlier.package_darwin.shsign()calls the new function, and the app check is nowcodesign --verify --deep --strict.kb_sign_binarydrops--deep, which did nothing on a single binary: the CDHash is the same with and without it.KB_CODESIGN_IDENTITYcan be overridden, for example with-for local ad-hoc test signing. An ad-hoc build leaves out--timestampin bothkb_sign_binaryand the new function, and skips thespctl --assessofKeybase.app, which Gatekeeper always rejects for an ad-hoc signature. The installer and updater apps are still assessed, since Keybase signs them.Equivalence with the
--deepsigning it replacesKeybase.app(SharedSupport/bin, the real installer and updater apps), were signed ad-hoc. One used the oldsign()sequence and the other the new function.codesign --verify --deep --strict.--deepdid:Keybase.entitlementsto the main app, the 4 helper apps andchrome_crashpad_handler. The new code keeps that.SharedSupport/bin. The new code leaves them alone too.libEGL.dylib, a new helper executable andResources/app.asar.unpacked/x.nodeadded. All three were found and signed with the right entitlements, and the installer and updater stayed byte-for-byte the same.Why not
@electron/osx-signIt's installed only as a dependency of
@electron/packager, not as a direct dependency. It also signs during packaging, beforepackage_darwin.shcopies the Go binaries and the installer and updater apps into the bundle.Checked on a build-machine dmg
An arm64 dmg built by the bot from
ed66d4dc0dwas compared with one built from #29756'sad4436a112, which still signs with--deep.codesign --verify --stricton its own.Keybase.app: signed with the Keybase Developer ID and a timestamp.codesign --verify --deep --strictpasses, andspctl --assessaccepts it as "Notarized Developer ID".chrome_crashpad_handlercarryKeybase.entitlements. Nothing else does, apart fromkeybase.Helper, which keeps its own.KeybaseInstaller.app,KeybaseUpdater.appandkeybase.Helperhave the same CDHash as in the--deepbuild, and Gatekeeper accepts both apps as notarized.Still to confirm
KeybaseUpdater.app) applies an update. Squirrel/ShipIt is only signed because Electron bundles it; the app doesn't use it.