Skip to content

fix(desktop): pass the keychain password to set-key-partition-list - #14610

Merged
dylanjeffers merged 1 commit into
mainfrom
fix/desktop-mac-keychain-partition-list
Sep 24, 2026
Merged

dylanjeffers merged 1 commit into
mainfrom
fix/desktop-mac-keychain-partition-list

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

Mac desktop builds have failed on every main deploy since 2026-09-08 (latest: run 36038859427):

security set-key-partition-list -S apple-tool:,apple: -s -k *** <tmp>.keychain
security: SecKeychainUnlock: The user name or passphrase you entered is not correct.

Cause: electron-builder creates a temp keychain with a random password, but passes the .p12 password (CSC_KEY_PASSWORD) as -k to set-key-partition-list. Older macOS let that through because the keychain was already unlocked. The runner image moved from macOS 26.5 to 26.6 between the last green run (09-01) and the first red one (09-08), and 26.6 validates the password. Secrets haven't changed since 08-14. The bug is still present in electron-builder 26.15.3, so upgrading doesn't fix it.

Fix: a patch-package patch to app-builder-lib@25.1.8 that passes the keychain password instead. I reproduced this locally on macOS 27 with a throwaway keychain: -k <p12 password> gives the same SecKeychainUnlock error, and -k <keychain password> exits 0.

Also: the Windows/Linux Slack notification steps call jq, which the electronuserland/builder container doesn't include. The step exits 127, so those jobs show red even though the build published. Switched it to node -p.

Verify after merge: the Mac job logs signing … identity=8F3E8976… and notarizes, and latest-mac.yml on download.audius.co gets a fresh last-modified.

🤖 Generated with Claude Code

electron-builder passes the .p12 password as the keychain password when
it calls `security set-key-partition-list` on the temp keychain it just
created. macOS 26.6 now checks that password, so Mac signing fails with
SecKeychainUnlock on every run since the runner image moved to 26.6.
Still unfixed upstream as of electron-builder 26.15.3, so patch it.

Also drop jq from the Windows/Linux Slack steps; the builder container
doesn't have it, which marked successful publishes as failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 49f4cbc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@socket-security

Copy link
Copy Markdown

Dependency limit exceeded — report not shown.

This pull request scan exceeded the 10,000-dependency limit applied to this scan, so the results are incomplete and may be inaccurate. To avoid reporting false positives, Socket has not posted a report.

Upgrade your plan to raise the dependency limit and get complete reports, or view the partial scan in the dashboard.

Socket is always free for open source. If this is a non-commercial open source project, contact us to request a free Team account.

@dylanjeffers
dylanjeffers merged commit 57fcd1c into main Sep 24, 2026
18 checks passed
@dylanjeffers
dylanjeffers deleted the fix/desktop-mac-keychain-partition-list branch September 24, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant