Repository navigation
Conversation
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.
Problem
On macOS the credential item is created by the Node interpreter that runs the CLI. Homebrew upgrades Node through a versioned Cellar path, so the item's ACL no longer matches the current interpreter. Every later command then asks for the login keychain password again; denying or timing out surfaces
CREDENTIAL_STORE_ERROR.auth logincould not repair this because it read the previous secret before writing, and that read is exactly what the stale ACL blocks.Fix
/usr/bin/securityhelper for get/set/delete instead of@napi-rs/keyring.-U -T /usr/bin/security: the ACL trusts the system helper rather than a versioned Node path, so upgrades no longer invalidate it. Passwords are fed on stdin, never argv.saveStoredCredentialstolerates an unreadable previous secret so a freshauth logincan replace a stale item; rollback is skipped when there is no readable baseline.Verification
npm test— 496 tests passing.-U -T /usr/bin/security, repeatedsustech bb content/bb attachmentscalls complete without keychain prompts.sustech auth login(or an equivalentsecurity add-generic-password -U -T /usr/bin/security).Trade-off
The item is still in the user's login keychain and readable only by that user. Trusting
/usr/bin/securitymeans any process running as the user can invoke that helper to read it; this matches the previous practical access model while removing the interpreter-path fragility. Happy to switch to a per-binary-Tlist if maintainers prefer tighter scoping.