You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(desktop): remove safeStorage, store API keys as plaintext 0600
Every decrypt call on unsigned / ad-hoc-signed macOS builds triggered
the system keychain password prompt, making the app practically
unusable in dev and noisy for users who didn't click "Always Allow".
Even "Always Allow" gets invalidated whenever the code signature
changes (every pnpm dev rebuild, every release upgrade).
Fixes the prompt at the root: stop calling safeStorage. Follow the
same convention as Claude Code, Codex, gh CLI, aws CLI, and gcloud —
plaintext credentials in ~/.config/open-codesign/config.toml with
file mode 0600. No OS prompt, ever.
- apps/desktop/src/main/keychain.ts now stores secrets as `plain:<key>`
and falls back to safeStorage only to migrate legacy ciphertexts
once at boot (the last keychain prompt ever, if any).
- Boot-time migration runs inside loadConfigOnBoot; rewritten secrets
land back on disk immediately so the prompt can't repeat.
- Removed apps/desktop/src/main/keychain-ux.ts entirely (explainer +
unavailable dialogs are no longer needed).
- Removed withKeychain / prepareKeychain wrappers from all IPC
handlers — they were only there to gate safeStorage calls.
- Updated onboarding i18n copy and CLAUDE.md / README.zh-CN.md to
reflect the new storage model.
Threat model is unchanged: an attacker with filesystem access to the
user's home dir could already read a decrypted secret via process
memory or by exploiting safeStorage. Plaintext just removes the UX
tax that bought zero real security.
Copy file name to clipboardExpand all lines: CLAUDE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ These are project-level commitments, not preferences:
16
16
17
17
1.**Install size budget: ≤ 80 MB.** Adding a dependency that pushes us over requires PR justification with size diff and alternatives considered. CI enforces this.
18
18
2.**No bundled model runtimes.** No Ollama, llama.cpp, Python, or browser binaries shipped in the installer. Use system installs or lazy-download on demand.
19
-
3.**BYOK only.** No proxied API calls, no cloud account, no telemetry by default. User credentials stay in `~/.config/open-codesign/config.toml` (encrypted via Electron `safeStorage`).
19
+
3.**BYOK only.** No proxied API calls, no cloud account, no telemetry by default. User credentials stay in `~/.config/open-codesign/config.toml` (plaintext, file mode 0600 — matching Claude Code / Codex / gh CLI conventions).
20
20
4.**Local-first storage.** Designs, history, and codebase scans live on disk (SQLite via `better-sqlite3`). No mandatory cloud sync.
0 commit comments