apple: silent empty-password unlock of login keychain on open#69
Merged
jgowdy-godaddy merged 1 commit intomainfrom Apr 17, 2026
Merged
apple: silent empty-password unlock of login keychain on open#69jgowdy-godaddy merged 1 commit intomainfrom
jgowdy-godaddy merged 1 commit intomainfrom
Conversation
After #68 the Swift bridge opens the login keychain by explicit absolute path and routes all `SecItem*` calls through it. On GitHub Actions `macos-latest` runners that keychain is locked between jobs (it was unlocked once with an empty password at image-provision time). With the explicit handle in hand the next `SecItemAdd` blocks indefinitely waiting for a GUI unlock prompt that never arrives, hanging the job. Fix: after `SecKeychainOpen`, attempt a silent unlock with an empty password. Interactive dev sessions already have the keychain unlocked so this is a no-op; CI runners get their keychain unlocked without any prompt. If the keychain has a real password the unlock silently fails and the subsequent operation surfaces the real error — we deliberately do not mask it with a fallback.
This was referenced Apr 17, 2026
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.
Summary
SecItem*calls through it viakSecUseKeychain/kSecMatchSearchList.macos-latestrunners the login keychain is re-locked between jobs. With an explicit locked handle in hand the nextSecItemAddblocks indefinitely waiting for a GUI unlock prompt that never arrives — hanging npmenc CI for 30+ minutes.SecKeychainOpen, attempt a silent unlock with an empty password (SecKeychainUnlock(kc, 0, nil, true)). Interactive dev sessions already have the keychain unlocked, so this is a no-op. CI runners get their keychain unlocked without any prompt.Test plan
cargo build -p enclaveapp-apple --features signing,encryptioncargo test -p enclaveapp-apple --features signing,encryption --lib— 44 pass, including real-keychainkeychain_wrap::testscargo clippy -p enclaveapp-apple --features signing,encryption --all-targets -- -D warnings