Skip to content

[codex] Harden account storage and web access#73

Open
HongjieS wants to merge 4 commits into
Lampese:mainfrom
HongjieS:codex/security-hardening
Open

[codex] Harden account storage and web access#73
HongjieS wants to merge 4 commits into
Lampese:mainfrom
HongjieS:codex/security-hardening

Conversation

@HongjieS

Copy link
Copy Markdown

Summary

  • Default browser dashboard binding to localhost and require a session token when binding to non-loopback hosts.
  • Encrypt local account storage with an OS credential-store-backed key, while still reading legacy plaintext stores for migration on next save.
  • Replace the hardcoded full-backup passphrase with user-provided passphrases for export/import.
  • Add a restrictive Tauri CSP and update vulnerable frontend dependencies through pnpm workspace overrides.
  • Add a cross-platform Node Tauri wrapper so pnpm tauri ... does not require POSIX sh on Windows.

Security Notes

  • Non-local browser mode now prints a tokenized URL unless CODEX_SWITCHER_WEB_TOKEN is provided.
  • Full .cswf backups now require a minimum 12-character passphrase and no longer use a repository-committed secret.
  • Existing plaintext accounts.json files continue to load; subsequent saves write the encrypted format.

Verification

  • cargo test
  • pnpm build
  • pnpm audit --audit-level moderate
  • pnpm tauri --version

@HongjieS HongjieS marked this pull request as ready for review June 12, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant