# Security policy [中文](SECURITY.md) ## Support The maintained published security line is `2.2.x`; `2.3.0` is currently an unreleased candidate. Fixes ship only as new patch versions. Development branches and older releases are not promised separate backports. Report suspected vulnerabilities privately through the GitHub repository **Security / Report a vulnerability**. Do not first publish a reproducible exploit, user data, or a real local path. Include the affected version, a minimal reproduction, expected impact, and log fragments with secrets removed. ## Threat model - The plugin targets local DSH Web. HTTP APIs reject non-loopback TCP peers by default and check Host, same-origin writes, and Content-Type. This is not account authentication. A trusted local process can still access the API. - Tavern resources, character cards, world books, imported records, model replies, and display regex are untrusted input. Resource bodies may become model instructions. Display content is handled only in the browser. - DSH session and durable history are the message authority. The plugin does not copy or rewrite original history. Timeline stores pointers, branches, and display metadata only. - RP secure mode is a conservative overlay on DSH permissions. It is not OS-level isolation and cannot stop a user from pasting secrets into the chat. ## Implemented boundaries - All v1/v2/v3 browser APIs share the same security middleware. Mutating requests require same-origin and a supported media type. - Request bodies, resources, structures, Trace, persistent state, and play workspace files have explicit limits. - The play workspace uses safe relative paths, per-segment link/reparse checks, root revalidation, exclusive temp files, atomic replace, and revision/CAS. - Rich text is parsed as Markdown and then must pass DOMPurify. script, iframe, object, embed, form controls, user-supplied template, meta/link/base, and `srcdoc` are forbidden; event handlers and unsafe URLs are sanitized too. `