[docs] #42 signer audit complete — active-signer path clean (adminListStore was the only bug)

Swept every .signEvent(/window.nostr/ensureExtensionPermissions caller. No window.nostr
is used to sign or encrypt anywhere; all publishing uses the active signer, and every
extension-permission gate is guarded on signer type/capability so nsec + NIP-46 pass
through. Recorded the findings + one dead-code note (auth/signingAdapter.js
createNip07SigningAdapter is unused by app code).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
thePR0M3TH3ANandClaude Opus 4.8 committed 2026-06-30 21:54:43 -04:00
1 parent c48083dfcc
commit 7a11473d0d
1 file changed
+19 -6
+19 -6
View File
@@ -534,12 +534,25 @@ toward freshness and looked identical. Gave each a structural identity:
extension (`type === "extension"/"nip07"`). Regression test added to
`tests/admin-list-store.test.mjs` (nsec signer used while `window.nostr.signEvent`
throws). Build + lint clean.
- [ ] **AUDIT (follow-up):** sweep EVERY place that signs an event and confirm it uses the
active-signer path (`getActiveSigner().signEvent` / the client's sign helper), NOT
`window.nostr` directly. `window.nostr`-only signing breaks nsec + NIP-46. Grep for
`window.nostr`, `extension.signEvent`, and direct `signEvent` calls across publish
paths (lists, reactions, reposts, comments, profile metadata, NWC, watch history,
deletes, NIP-71 mirror, view events) and fix any that bypass the active signer.
- [x] **AUDIT DONE 2026-06-30 — clean (adminListStore was the only bug).** Swept every
`.signEvent(`, `window.nostr`, and `ensureExtensionPermissions`/
`requestDefaultExtensionPermissions` caller:
- **Signing:** NO `window.nostr` is used to sign/encrypt anywhere. Every publish
path signs with the active signer (`signer.signEvent`): subscriptions, userBlocks,
hashtag prefs, relay prefs, moderationService reports, nip71MirrorService,
encryptedSyncFacade, DM seal + legacy DM (`nostr/client` signingAdapter defaults
to the active signer), DM relay list, admin lists.
- **Extension-permission gates:** every caller (reactions, comments, subscriptions,
userBlocks, watchHistory, relayManager, DM relays) guards the request behind a
signer-type (`extension`/`nip07`) or capability check, so nsec/NIP-46 skip it and
go straight to active-signer signing — they never hit the `extension-missing`
failure that broke admin lists.
- **Decrypt:** gates on the active signer's nip04/nip44 capability with `window.nostr`
only as a fallback; nsec (closures) + NIP-46 (remote) both decrypt fine.
- **Cleanup note (low priority):** `js/auth/signingAdapter.js`
(`createNip07SigningAdapter`, defaults to `window.nostr`) is dead production code —
referenced only by its own test, no app callers. Harmless; remove or repoint at
the active signer if ever reused.
### 43. Logged-in profile card at the top of the profile modal (UX)
- [ ] Show the **logged-in user's profile photo + name** at the **top-center** of the