Security: Harden Nostr private key (prvkey) handling #11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Security audit identified several improvements needed for Nostr private key (
prvkey) handling before production deployment. While no critical vulnerabilities were found (keys are not persisted to storage), the codebase needs hardening.Risk Level: HIGH ⚠️
Audit Findings
✅ Strong Points (Already Implemented)
🔴 Critical Issues
1. Vue DevTools Exposure (Production Blocker)
Private keys visible via Vue DevTools inspector and debug globals in development mode.
Files affected:
src/app.ts:174-182- Exposeswindow.__containerin dev modeRequired fix:
2. No Centralized Signing Service
10+ files directly access
authService.user.value.prvkey:nostr-metadata-service.tschat-service.tsReactionService.tsNoteComposer.vueRideshareComposer.vueuseMarket.tsNostrFeed.vueRisk: Each access point is potential exposure if code modified incorrectly.
Recommendation: Create centralized
SigningService:⚠️ Other Improvements Needed
Implementation Checklist
Immediate (Production Blocker)
developmentMode: falsein production configwindow.__containerundefined in productionShort-Term (Next Sprint)
SigningServiceLong-Term (Roadmap)
Security Testing Checklist
window.__containerundefined in productionRisk Matrix
References
misc-docs/SECURITY_AUDIT_PRVKEY.md