Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

lightninglabs/lightning-app
master @ f7c5f4e
5
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Cross-Site Scripting (XSS): 2 prior fixes. Scrutinize any change in this area.
src/action/auth-mobile.js: most-fixed (2 issues). Treat as high-risk during review.
2 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Sandbox Escape: The desktop shell configuration historically instantiated `BrowserWindow` without a sandbox and with Node.js integration enabled, exposing the host system to full remote code execution if untrusted content was rendered. Future changes must strictly enforce isolated renderer contexts via sandbox and preload scripts.
Insecure Randomness: The application relied on `Math.random` to generate wallet passwords, exposing users to predictable keys and potential wallet compromise. Any credential or entropy-generating functions must exclusively use cryptographically secure pseudo-random number generators.
Auth Bypass: Storing credentials using an empty username string failed under Android Keystore constraints, silently failing to save wallet credentials. Implementations using keychain-based authentication must enforce non-empty fields to prevent state-desynchronization and bypass vulnerabilities.