fix(release): the producer does not sign, and must not learn how - #453
Merged
Conversation
macos-builder's producer isolation runs client build scripts with the signing keychain LOCKED and SIGN_IDENTITY set to the ad-hoc identity "-". client/forge.config.ts gated osxSign on SIGN_IDENTITY being non-empty, and "-" is non-empty, so @electron/osx-sign resolves it through `security find-identity`, finds nothing, and the build dies with "No identity found for signing." This repository has not dispatched a build since that landed, so the breakage is latent rather than observed here. It was observed in stuffbucket/monimal, which carries a copy of this producer and hit it on its first real build. Signing moves entirely to the builder. `sign_walk = bun-runtime` asks it to sign every nested code item deepest-first — the four Helper .apps and the Electron Framework included, each sealed as a bundle, which sign_nested cannot express because it takes regular files only — and then seal the outer bundle. The profile is still chosen BY NAME, so this repo cannot widen what it is signed with, and the existing policy already allows bun-runtime. - client/forge.config.ts loses the whole osxSign block. Not gated differently: deleted. Under this contract a packager configured to sign fails, and that failure is the point. - build.sh stops exporting MACOS_ENTITLEMENTS and no longer consumes SIGN_IDENTITY or ENTITLEMENTS_DIR. - Its signing assertions are replaced by their inverse: a Developer ID signature on a bundle the producer built now fails the build, because it would mean the builder's keychain isolation had regressed. Separately, PATH put /opt/homebrew/bin AHEAD of everything, shadowing the pinned Node the builder installs with actions/setup-node with whatever major Homebrew carries. Measured on a developer Mac: `node -v` reported 24.19.0 while the script saw 26.5.0. It is appended now. Note this repo pins .bun-version but has no .nvmrc, so nothing declares which Node it expects and nothing can assert it. Worth adding.
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.
This repository's producer is latently broken. It has not dispatched a build since macos-builder's producer isolation landed, so nothing has surfaced it here — but the next dispatch fails.
It was surfaced in
stuffbucket/monimal, which carries a copy of this producer and hit it on its first real build (run 33566724936):Why
macos-builder now runs client build scripts with the signing keychain locked and
SIGN_IDENTITYset to the ad-hoc identity"-".client/forge.config.tsgatedosxSignonSIGN_IDENTITYbeing non-empty — and"-"is non-empty — so@electron/osx-signresolves it throughsecurity find-identity, finds nothing, and dies.What changes
Signing moves entirely to the builder.
sign_walk = bun-runtimeasks it to sign every nested code item deepest-first — the four Helper.apps and the Electron Framework included, each sealed as a bundle — then seal the outer bundle.sign_nestedcannot express that: it takes regular files only.The profile is still chosen by name, so this repo cannot widen what it is signed with, and
clients/stuffbucket/maximal.policyalready allowsbun-runtime. No policy change.client/forge.config.tsloses the wholeosxSignblock — deleted, not re-gated. Under this contract a packager configured to sign fails, and that failure is the point.build.shstops exportingMACOS_ENTITLEMENTSand no longer consumesSIGN_IDENTITYorENTITLEMENTS_DIR.A second, independent bug
PATHput/opt/homebrew/binahead of everything, so Homebrew's node beat the Nodeactions/setup-nodeinstalls. Measured on a developer Mac:node -vreported 24.19.0 while the script saw 26.5.0. On the builder that silently builds releases on an unpinned major. It's appended now.Verified
Not on this repo — it has no local deps checked out and its CI will cover the TypeScript. The identical change was verified end to end in monimal: real producer, exit 0, version stamped into
Info.plist, and the resulting DMG passingspctlasNotarized Developer IDwith every Helper app and framework validating undercodesign --verify --deep --strict.shellcheckclean onbuild.sh.Worth a follow-up
This repo pins
.bun-versionbut has no.nvmrc, so nothing declares which Node it expects and nothing can assert it. monimal gained a gate gate for exactly this; here there is nothing to gate against.