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

**URL:** <https://ghostforum.org/t/no-auto-lock-unlock-session-lasts-as-long-as-the-browser-lives/148>\
**Category:** Bug Bounty\
**Tags:** gst-extension-wallet\
**Created:** [October 6, 2026, 2:46am UTC](https://ghostforum.org/t/no-auto-lock-unlock-session-lasts-as-long-as-the-browser-lives/148 "2026-10-06T02:46:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rusdiwireng](https://ghostforum.org/letter_avatar_proxy/v4/letter/r/9de0a6/32.png) [@Rusdiwireng](https://ghostforum.org/u/Rusdiwireng)\
**Post date:** [October 6, 2026, 2:46am UTC](https://ghostforum.org/t/no-auto-lock-unlock-session-lasts-as-long-as-the-browser-lives/148/1 "2026-10-06T02:46:55Z")

</div>

**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.

---

<div class="post-metadata">

**Author:** ![VoidDragon](https://ghostforum.org/user_avatar/ghostforum.org/voiddragon/32/16_2.png) [@VoidDragon](https://ghostforum.org/u/VoidDragon)\
**Post date:** [October 6, 2026, 9:29am UTC](https://ghostforum.org/t/no-auto-lock-unlock-session-lasts-as-long-as-the-browser-lives/148/2 "2026-10-06T09:29:45Z")

</div>

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.
