No auto-lock: unlock session lasts as long as the browser lives

Component: ghost-extension-wallet @ 66bd207, src/background/keyring.ts:218-236 (let currentPassword: string | undefined), src/background/heartbeat.ts:18-35, assets/manifest-v3-chrome.json:9.

Description: unlock() keeps currentPassword in service-worker memory. lock() is only called manually from the UI (useKeyring.tsx:56). There is no chrome.alarms, no chrome.idle listener, no timeout anywhere, even though the "alarms" permission is already declared in the manifest (manifest-v3-chrome.json:9) and never used (grep chrome.alarms in src/ = nothing). The claim that the 20-second heartbeat keeps the SW alive indefinitely is HYPOTHESIS (MV3 SW termination behavior is not guaranteed); what is verified is the total absence of any auto-lock mechanism.

Impact: The physical-access / local-malware attack window becomes “as long as the browser runs” instead of “a few idle minutes”. Password and decrypted secrets persist in process memory.

Reproduction: Static: grep alarms|onIdle|setTimeout.*lock in src/ → nothing besides the permission declaration; read heartbeat.ts + keyring.ts:236.

Severity: Low-Medium. Reason: needs local machine access (not remote), but deviates from the standard wallet practice of auto-lock after 5-15 idle minutes.

Recommendation: Add auto-lock via chrome.alarms (e.g. 15 minutes) + chrome.idle state, and/or lock when the service worker suspends.

Verification: VERIFIED.

Thank you for your report!

The current version of the extension is deprecated in favor of a different approach to storing and accessing keys. In short:

  1. Only one public address (derivation or root) is exposed at any time.
  2. During any password-protected request, the modal will request a password and try to forward the function with the filled arguments, attaching the password at that moment.

That’s the concept - we’re aiming to minimize the time during which the keystore is decrypted and the password exists in memory. We’ll push the latest version of the extension this week.