fix(secrets): trust developer-id signed binary in macOS keychain ACLs#903
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 7:52 PM ET / 23:52 UTC. Summary Reproducibility: no. high-confidence runtime reproduction was established. Source inspection confirms current main hard-codes Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Land the focused resolver only after maintainers accept the Keychain ACL policy and signed macOS release/upgrade proof confirms the prompt and token-read behavior; otherwise keep the false default with an explicit opt-in override. Do we have a high-confidence way to reproduce the issue? No high-confidence runtime reproduction was established. Source inspection confirms current main hard-codes Is this the best way to solve the issue? Unclear until maintainer policy is confirmed. The implementation is narrow and preserves ad-hoc defaults, but the best solution needs signed-release upgrade proof because the change is in credential ACL behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c0aac99f6be6. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Problem
Every gog keychain item is created with
KeychainTrustApplication: false, so each of the (three-per-account) token items triggers a macOS "Always Allow + password" prompt on first access — and again after some upgrades. That trade-off exists to protect ad-hoc builds (#86), whose designated requirement changes every rebuild, but the official Homebrew release is Developer-ID signed (stable identity, hardened runtime) and pays the prompt tax for no benefit.Fix
codesign -dv: not unsigned, notSignature=adhoc, non-emptyTeamIdentifier), cached per process; enableKeychainTrustApplicationonly then. Ad-hoc/source builds keep today's behavior.GOG_KEYCHAIN_TRUST_APPLICATION={auto|true|false}override, plumbed like the otherGOG_*envs; documented indocs/spec.md.gog auth doctorreports the effective mode as akeychain.trustcheck (darwin + keychain backend only).Proof
go test ./internal/secrets/... ./internal/cmd/...— okmake lint— 0 issueskeychain.trust = application trust disabled (ad-hoc or unsigned binary); withGOG_KEYCHAIN_TRUST_APPLICATION=truereportsforced on via GOG_KEYCHAIN_TRUST_APPLICATION.Storage format, item names, and existing items' ACLs are untouched; existing items still need their one-time "Always Allow".
🤖 Generated with Claude Code