Security context

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

purocean/yn
develop @ 82a859f
3
Fixes
0
CVEs
HIGH
Peak severity
Highlights
Auth Bypass: 1 prior fix. Scrutinize any change in this area.
src/main/server/index.ts: most-fixed (1 issue). 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.

Auth Bypass: The local HTTP server previously allowed unauthorized access when listening on external interfaces. Developers must ensure that all API endpoints are wrapped with JWT permission checks and IP verification before binding to non-loopback interfaces.
Cross-Site Scripting (XSS): The Markdown renderer was susceptible to XSS via unvalidated HTML tags and event attributes. Any component rendering rich text or Markdown must strictly strip blocklisted elements such as script and style tags along with on* handlers.
Path Traversal: User-configurable templates for pasted image filenames permitted directory traversal. Sanitization using path canonicalization and filenamify is required when writing uploaded attachments to the local filesystem.