Security context

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

lensapp/lens
lens-desktop @ 01a4a98
24
Fixes
3
CVEs
HIGH
Peak severity
Highlights
Denial of Service: 5 prior fixes. Scrutinize any change in this area.
src/main/lens-proxy.ts: most-fixed (5 issues). Treat as high-risk during review.
11 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.

Auth Bypass: WebSocket terminal sessions could be hijacked by untrusted local or web-based clients. Remediation required implementing single-use authentication tokens via IPC and timing-safe token comparisons to guarantee that only the authorized Lens frontend can initiate shell sessions.
Command Injection: Resolving the UNIX shell environment relied on unsafe argument interpolation, allowing arbitrary command execution when spawning processes. This was mitigated by implementing robust single-quote escaping for shell parameters.
SSRF: The local kubectl auth proxy initially accepted connections from any host and used wildcards for target routing, permitting local or cross-origin attackers to reach cluster APIs. The fix restricted `--accept-hosts` to the specific target cluster hostname and introduced randomized API path prefixes.