Commit Graph
10 Commits
Author SHA1 Message Date
Erdogan AbacıandDraculabo 92dc2f6f21 fix(security): add safeStorage fallback for production builds (#38)
* fix(security): add safeStorage fallback for production builds

- Replace hard keytar dependency with multi-strategy key storage:
  1. safeStorage (Electron built-in) - preferred
  2. keytar (system keychain) - fallback
  3. File-based encryption - last resort
- Dynamically import keytar to avoid hard failure in production
- Refactor cloudHandler to use const instead of let (Clean Code)
- Fix 'Failed to load cloud accounts' error in packaged app

The keytar native module fails to load from asar archives in
production builds. This fix ensures the app works even when
system keychain access is unavailable.

* refactor(security): address code review feedback

- Replace sync file ops with async (fs/promises)
- Add atomic file writes to prevent data races
- Implement concurrency lock for key generation
- Add SecurityError class with specific error codes:
  - KEY_STORAGE_FAILED, ENCRYPTION_FAILED, DECRYPTION_FAILED
  - INVALID_FORMAT, AUTH_TAG_MISMATCH, CORRUPTED_DATA
- Enhance error categorization in decrypt() for better diagnostics
- Add security warnings for file-based fallback mode

* fix: align error handling after merge

* feat: migrate legacy encrypted account data

* chore: enable beta prerelease workflow *skip release*

---------

Co-authored-by: Draculabo <[email protected]>
2026-01-26 01:53:25 +08:00
Draculabo 6a07bc0a10 ci: trigger publish on release published event 2026-01-25 18:35:20 +08:00
Draculabo d2945a6e8a ci: setup semantic release configuration and github actions workflow 2026-01-25 05:07:39 +08:00
Draculabo e96d3e0e8e fix: add macOS arm64 build for Apple Silicon support 2026-01-21 17:15:17 +08:00
Draculabo a079cf5ccc fix: ci build error 2026-01-10 01:17:48 +08:00
Draculabo c4a0fa773f docs: update project document 2025-12-24 23:11:54 +08:00
Draculabo 91ed81f736 ci: disable E2E tests in CI
Publish Release / publish (ubuntu-latest) (push) Failing after 5m44s
Publish Release / publish (macos-latest) (push) Canceled after 0s
Publish Release / publish (windows-latest) (push) Canceled after 0s
2025-12-23 20:09:26 +08:00
Draculabo 0652c31b3e fix: add node-addon-api and remove redundant rebuild step 2025-12-23 19:41:08 +08:00
Draculabo 6071f2a930 fix: rebuild native modules for Electron in CI 2025-12-23 02:00:37 +08:00
Draculabo d0417339c1 Initial Commit 2025-12-23 01:38:53 +08:00