Add generic_password_read op: signed-helper keychain reads - #24
Merged
Merged
Conversation
…ller's signed binary The sidecar gains a product-neutral generic-password op backed by SecItemCopyMatching so a product can ship a signed helper copy inside its own app bundle and get a Keychain prompt and access-list entry in its own name instead of the 'security' tool's. Selectors are exact and bounded, values return as bounded base64, and denials, missing items, locked keychains and other OS failures map to typed codes. There is no TypeScript fallback by design: a native read is the whole point of the op.
0thernet
added a commit
that referenced
this pull request
Sep 27, 2026
Version bump for the merged signed-helper keychain read (#24): package.json, rust/Cargo.toml, Cargo.lock, portfolio-inventory.json, and a README change note. Co-authored-by: 0thernet <894119+0thernet@users.noreply.github.com>
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
Adds a product-neutral
generic_password_readop to thelocal-custodysidecar, backed bySecItemCopyMatchingon macOS.Why
Cookie readers that spawn
/usr/bin/securityget prompts namingsecurity, and "Always Allow" widens access to everysecuritycaller. When the read happens inside a caller-chosen signed binary — a helper assembled into the product'sContents/Helpers/— the prompt names the product and the keychain ACL binds to that helper's signature, surviving upgrades under the shared local signing identity.This is the foundation half of the ux-audit GG-8 item ("signed cookie reader"): consumers ship the same binary signed as their own helper (e.g.
ghostget-cookie-reader) and call this op for the Safe Storage read.Contract
{"op":"generic_password_read","service":"...","account":"..."}→{"contentBase64":"…"}limit).missing,denied,interaction-not-allowed(locked/no-UI),keychain-error(numeric status only),unsupportedoff macOS.Changes
rust/src/lib.rs:read_generic_password(security-framework3 on macOS;unsupportedelsewhere, after selector validation).rust/src/main.rs: sidecar dispatch + doc line.src/custody-rust.ts:readGenericPassword(binaryPath, service, account)over the existing bounded spawn protocol.spec/custody.md,spec/vectors.json: contract section + five shared vectors.src/custody-rust.test.ts,rust/tests/sidecar.rs: validation, typed-error, and missing-binary coverage (macOSmissingverified against the real keychain on this host).bun run checkis green end-to-end on darwin-arm64.