configuring-tauri-csp
CommunitySecure Tauri apps with strict CSP.
Authordchuk
Version1.0.0
Installs0
System Documentation
What problem does it solve?
CSP misconfigurations in Tauri v2 apps can expose security risks such as XSS and uncontrolled resource loading. This skill guides developers to implement a robust Content Security Policy tailored to the Tauri environment.
Core Features & Use Cases
- Provide a secure CSP baseline for Tauri v2 apps by defining default-src and directive-specific sources.
- Demonstrate how to configure tauri.conf.json under the security.csp section, including nonce/hash strategies and common directives (default-src, script-src, style-src, connect-src, img-src, font-src, frame-src, object-src).
- Offer troubleshooting guidance for CSP issues in a desktop WebView, including how to verify policies in DevTools and how to adjust policies for production.
Quick Start
Update tauri.conf.json to enable a restrictive CSP with default-src 'self' and targeted script-src, style-src, and connect-src directives, then test in the running app to confirm resources are loaded only from trusted sources.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: configuring-tauri-csp Download link: https://github.com/dchuk/claude-code-tauri-skills/archive/main.zip#configuring-tauri-csp Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.