Feature / Security Hardening Request
Extracted from fork codewithsharma/FloCafe (branch: develop):
Overview
Security improvements to protect auth secrets on disk, restrict privileged desktop operations, and sandbox the Electron renderer process.
Proposed Changes
- JWT Secret Storage Migration:
- Move from plain SQLite settings into Electron
safeStorage (OS Keychain / DPAPI / Secret Service).
- Reference:
main/services/jwt-secret.ts and migration version 74 (p0_2_jwt_secret_storage_marker).
- IPC Maintenance Authorization:
- Gate restart and installation IPC handlers (
restart-and-install) behind Owner/Manager JWT validation to prevent unauthenticated renderer calls.
- Reference:
main/security/restart-and-install.ts.
- Electron Sandbox & Navigation Guards:
- Enable renderer process sandbox and enforce strict navigation guards to block arbitrary external navigation or window spawning.
- Reference:
main/security/browser-window-security.ts.
- LAN Network Binding:
- Bind HTTP server to
localhost by default instead of 0.0.0.0 unless explicitly configured in settings via network_mode.
- Reference:
main/services/network-mode.ts and migration 73.
Feature / Security Hardening Request
Extracted from fork
codewithsharma/FloCafe(branch:develop):Overview
Security improvements to protect auth secrets on disk, restrict privileged desktop operations, and sandbox the Electron renderer process.
Proposed Changes
safeStorage(OS Keychain / DPAPI / Secret Service).main/services/jwt-secret.tsand migration version 74 (p0_2_jwt_secret_storage_marker).restart-and-install) behind Owner/Manager JWT validation to prevent unauthenticated renderer calls.main/security/restart-and-install.ts.main/security/browser-window-security.ts.localhostby default instead of0.0.0.0unless explicitly configured in settings vianetwork_mode.main/services/network-mode.tsand migration 73.