Repository navigation
fix(credentials): stop re-prompting for Keychain access on every upgrade - #708
Merged
Merged
Conversation
Bump cli-common to v0.5.1, which reads macOS Keychain secrets through /usr/bin/security. A binary without a TeamIdentifier gets a per-build partition entry from Always Allow, so every release counted as a new application. security keeps one apple-tool entry across releases. Twapp-Session: 59d912f3-982f-402e-8bd8-3e31269a28b0
piekstra-dev
approved these changes
Nov 3, 2026
piekstra-dev
left a comment
Collaborator
There was a problem hiding this comment.
Automated PR Review
Reviewed commit: 86b29a953ca6
Profile: reviewer - Posting as: piekstra-dev
Summary
| Reviewer | Findings |
|---|---|
| automation:ci-release | 0 |
| documentation:docs | 0 |
| go:implementation-tests | 0 |
| policies:conventions | 0 |
| privacy:captured-data | 0 |
| structure:repo-health | 0 |
| security:code-auditor | 0 |
Reviewer Coverage
Complete coverage details are retained in the local coverage.json artifact.
automation:ci-release— complete (broad); scope: 1 file; examples:go.mod; body-inspected: 1 file; examples:go.mod; skipped: none; constraints: Did not run build, lint, or tests; reviewed the go.mod and go.sum diff only. Did not verify the cli-common v0.5.1 checksums against the Go checksum database.documentation:docs— complete (broad); scope: 1 file; examples:README.md; body-inspected: 1 file; examples:README.md; skipped: none; constraints: Claims about cli-common v0.5.1 behavior (system security tool, 60s timeout) were taken from the PR description and not verified against the dependency source.go:implementation-tests— complete (broad); scope: 1 file; examples:go.mod; body-inspected: 1 file; examples:go.mod; skipped: none; constraints: Did not inspect the cli-common v0.5.1 module source; behavior claims rely on the PR description. Review limited to the go.mod and go.sum diff; did not build or run tests.policies:conventions— complete (broad); scope: 2 files; examples:README.md,go.mod; body-inspected: 2 files; examples:README.md,go.mod; skipped: none; constraints: Shared cli-common docs were not available in context; review limited to the visible diff and repo files. go.sum was checked only as context to confirm it carries the v0.5.1 entries.privacy:captured-data— complete (constrained); scope: 2 files; examples:README.md,go.mod; body-inspected: 2 files; examples:README.md,go.mod; skipped: none; constraints: nonestructure:repo-health— complete (broad); scope: 1 file; examples:go.mod; body-inspected: 1 file; examples:go.mod; skipped: none; constraints: Reviewed only the go.mod/go.sum diff; did not inspect cli-common v0.5.1 source or run builds/tests. The Keychain behavior change (reads via ) is not verified here; PR states the Always Allow path was not exercised.security:code-auditor— complete (broad); scope: 2 files; examples:README.md,go.mod; body-inspected: 2 files; examples:README.md,go.mod; skipped: none; constraints: Did not inspect the cli-common v0.5.1 source; the review covers only the dependency pin, go.sum hashes and README text in this PR. The go.sum h1 hash for cli-common v0.5.1 was not checked against the Go checksum database.
0 PR discussion threads considered. 0 summarized; 0 resolved.
Completed in 1m 09s | $0.50 | claude-sonnet-5-5 | cr 0.10.363
| Field | Value |
|---|---|
| Model | claude-sonnet-5-5 |
| Reviewers | automation:ci-release, documentation:docs, go:implementation-tests, policies:conventions, privacy:captured-data, structure:repo-health, security:code-auditor |
| Engine | claude_cli · claude-sonnet-5-5 |
| Reviewed by | cr · piekstra-dev |
| Duration | 1m 09s wall · 2m 45s compute |
| Cost | $0.50 |
| Tokens | 72 in / 8.4k out |
Per-workstream usage
orchestrator-selection— claude-sonnet-5-5- In: 6
- Out: 1.0k
- Cache read: 20.1k
- Cache create: 12.0k
- Cost: $0.06
- Duration: 14s
automation:ci-release— claude-sonnet-5-5- In: 8
- Out: 1.1k
- Cache read: 33.4k
- Cache create: 9.2k
- Cost: $0.05
- Duration: 22s
documentation:docs— claude-sonnet-5-5- In: 10
- Out: 1.2k
- Cache read: 46.1k
- Cache create: 9.2k
- Cost: $0.05
- Duration: 17s
go:implementation-tests— claude-sonnet-5-5- In: 8
- Out: 943
- Cache read: 34.0k
- Cache create: 9.4k
- Cost: $0.05
- Duration: 17s
policies:conventions— claude-sonnet-5-5- In: 10
- Out: 1.1k
- Cache read: 43.3k
- Cache create: 8.2k
- Cost: $0.05
- Duration: 14s
privacy:captured-data— claude-sonnet-5-5- In: 8
- Out: 883
- Cache read: 37.1k
- Cache create: 10.8k
- Cost: $0.06
- Duration: 21s
structure:repo-health— claude-sonnet-5-5- In: 8
- Out: 979
- Cache read: 33.1k
- Cache create: 9.0k
- Cost: $0.05
- Duration: 37s
security:code-auditor— claude-sonnet-5-5- In: 8
- Out: 922
- Cache read: 35.0k
- Cache create: 10.1k
- Cost: $0.05
- Duration: 12s
orchestrator-rollup— claude-sonnet-5-5- In: 6
- Out: 339
- Cache read: 46.9k
- Cache create: 2.8k
- Cost: $0.08
- Duration: 6s
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
Every
crupgrade raises a Keychain prompt for each credential it reads. Always Allow adds a partition entry for that exact build, because a binary without a TeamIdentifier is identified by its cdhash, so the next release counts as a new application even though its designated requirement is stable.Change
Bump
cli-commonfromv0.4.1tov0.5.1.v0.5.1reads Keychain secrets through the system/usr/bin/security, whose ACL andapple-tool:partition entries do not change whencrdoes, and returns the exact stored bytes, so a multi-line value such as a GitHub App private key survives the read.v0.5.0addsStore.ListProfiles, which needs no change here becausecruses the concrete*credstore.Store.The README states the behaviour under Platform Support.
What a user sees
securityfor each item that does not yet trust it. Choose Always Allow.securityraises no prompt at all.cr set-credentialorcr init, raises that one prompt on its first read. Writes still run as thecrbinary.Verification
make lint buildgo test -tags=keyring_nopassage -count=1 ./...TestPiRPCReviewerImageProcessingBoundsunder full-suite load, with no credstore dependency. The package passes alone at this pin.cr me --profile, on an item that already trustssecurityNot verified: the Always Allow click on an item that does not trust
security, because a probe raises a dialog on the owner's screen, and a Homebrew cask upgrade of an installedcr.