Skip to content

Hardening: set a real CSP in tauri.conf.json instead of null #117

Description

@shellen

Context

src-tauri/tauri.conf.json ships "security": { "csp": null }, so Tauri injects no Content-Security-Policy into app webviews. Article content is untrusted remote HTML; today the only defense is DOMPurify sanitization at render time (sanitizeHtml in viewer/02-utils.js). That has held up, but a CSP is the standard second layer if a sanitizer bypass ever appears.

Ask

Define a CSP that the viewer can actually live with — needs img-src/media-src for arbitrary article images and enclosures, inline styles for the email-style HTML, and script only from self (the viewer is fully inlined; no external scripts by design). Verify TTS, mermaid, hls.js, and YouTube embeds still work before shipping.

Found during the August 2026 security sweep (same sweep that removed the wildcard CORS headers from the local API).

Filed by Claude Code on behalf of @shellen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions