understanding-tauri-ecosystem-security
Guides developers through Tauri ecosystem security practices including security auditing, dependency management, vulnerability reporting, and organizational security measures for building secure desktop applications.
What this skill does
# Understanding Tauri Ecosystem Security
This skill covers Tauri's organizational security practices, dependency management, vulnerability reporting, and comprehensive security auditing approaches.
## Tauri Security Philosophy
Tauri operates on a principle of defense-in-depth with human-in-the-loop oversight. The framework acknowledges that "the weakest link in your application lifecycle essentially defines your security" and provides mechanisms to address threats at every stage.
### Trust Boundaries
Tauri distinguishes between:
- **Rust backend code**: Trusted, with full system access
- **Frontend code**: Untrusted, runs in the system WebView
- **IPC layer**: The communication bridge enforcing security boundaries
Frontend code accesses system resources exclusively through the IPC layer, with permissions restricted by capabilities defined in application configuration.
## Organizational Security Practices
### Build Pipeline Security
The Tauri organization uses highly automated GitHub Actions workflows with mandatory human review and approval before deployment.
Key practices:
- **Signed commits**: Core repositories enforce signed commits to mitigate impersonation risks
- **Code review**: Every pull request requires approval from at least one maintainer
- **Security workflows**: Default security checks run on all code changes
### Release Procedures
The working group manages releases through:
1. Review code modifications and categorize PRs by scope
2. Maintain current dependencies
3. Conduct internal security audits for security-related PRs before minor and major releases
4. Tag releases on the development branch, triggering:
- Core functionality validation
- Test execution
- Security audits of dependencies
- Changelog generation
- Artifact creation
5. Review and edit release notes before publication
## Dependency Security
### Auditing Dependencies
Use automated tools to identify vulnerable packages:
```bash
# Rust dependencies
cargo audit
# Node.js dependencies
npm audit
```
### Advanced Supply Chain Tools
Consider emerging tools for deeper supply chain analysis:
```bash
# Verify dependencies against trusted sources
cargo vet
# Community-driven code reviews
cargo crev
```
### Dependency Pinning
For critical dependencies, pin to specific git hash revisions rather than floating versions:
```toml
# Cargo.toml - pinned dependency
[dependencies]
critical-lib = { git = "https://github.com/org/repo", rev = "abc123def456" }
```
### Keeping Dependencies Updated
Regularly update Tauri, compilers, and related tooling:
```bash
# Update Rust toolchain
rustup update
# Update Tauri CLI
cargo install tauri-cli --locked
# Check for outdated dependencies
cargo outdated
```
## Application Lifecycle Security
### Upstream Threats
**Evaluate third-party libraries for:**
- Trustworthiness of maintainers
- Maintenance status and update frequency
- Known vulnerabilities
- Code quality and review practices
### Development Threats
**Development server risks:**
The default development server lacks encryption and authentication, exposing frontend assets to local networks. Only develop on trusted networks or implement mutual TLS (mTLS) for untrusted environments.
**Machine hardening practices:**
- Avoid administrative accounts for daily coding
- Never store production secrets on development machines
- Prevent secrets from entering version control
- Use hardware security tokens
- Maintain minimal installed applications
- Keep systems fully patched
**Source control security:**
- Implement proper access controls for repositories
- Require commit signing from all contributors
### Buildtime Threats
**CI/CD infrastructure:**
Use reputable providers or host systems on controlled hardware. Pin action versions explicitly in workflows:
```yaml
# Good - pinned to specific version
- uses: actions/[email protected]
# Bad - floating tag
- uses: actions/checkout@latest
```
**Reproducible builds:**
Current challenge: Rust and many frontend bundlers do not reliably produce reproducible builds by default. Maintain high trust in CI/CD systems until reproducibility tooling improves.
### Distribution Threats
Control over manifest servers, build systems, and binary hosting is essential. Consider trusted third-party solutions for binary distribution.
### Runtime Threats
Tauri assumes webview insecurity and implements protections via:
- Content Security Policy (CSP)
- Capabilities system
- Runtime authority validation
## Content Security Policy
CSP mitigates cross-site scripting (XSS) attacks. Tauri automatically handles cryptographic protections for bundled assets.
### CSP Configuration
```json
{
"app": {
"security": {
"csp": {
"default-src": "'self' customprotocol: asset:",
"connect-src": "ipc: http://ipc.localhost",
"font-src": ["https://fonts.gstatic.com"],
"img-src": "'self' asset: http://asset.localhost blob: data:",
"style-src": "'unsafe-inline' 'self' https://fonts.googleapis.com"
}
}
}
}
```
### CSP Best Practices
- Make policies as restrictive as possible
- Whitelist only trusted, preferably self-owned hosts
- Avoid remote scripts from CDNs (they introduce attack vectors)
- For WebAssembly frontends, include `'wasm-unsafe-eval'` in `script-src`
## Permissions and Capabilities
### Permission Structure
Permissions describe explicit privileges governing frontend command access:
```toml
# src-tauri/permissions/my-permission.toml
[[permission]]
identifier = "my-identifier"
description = "Describes the impact and scope"
commands.allow = ["read_file"]
[[scope.allow]]
my-scope = "$HOME/*"
[[scope.deny]]
my-scope = "$HOME/secret"
```
### Capability Configuration
Capabilities grant permissions to specific windows or webviews:
```json
{
"identifier": "main-window-capability",
"description": "Capability for the main window",
"windows": ["main"],
"permissions": [
"core:default",
"fs:read-files",
"fs:scope-home"
]
}
```
### Security Boundaries
**Capabilities protect against:**
- Frontend compromise impact minimization
- Accidental system data exposure
- Privilege escalation from frontend to backend
**Capabilities do NOT protect against:**
- Malicious Rust code
- Overly permissive scopes
- WebView zero-day vulnerabilities
- Supply chain attacks
### Command Scopes
Scopes provide granular control with allow and deny rules (deny always supersedes allow):
```toml
# Allow recursive directory access
[[scope.allow]]
path = "$APPLOCALDATA/**"
# Deny sensitive folders
[[scope.deny]]
path = "$APPLOCALDATA/EBWebView"
```
Command developers must ensure no scope bypasses are possible through careful validation.
## Runtime Authority
The runtime authority manages security enforcement at runtime:
1. Intercepts IPC requests from webview
2. Validates origin authorization
3. Confirms capability inclusion
4. Applies command-specific scopes
5. Permits or denies execution
This multi-layer validation creates defense-in-depth against privilege escalation.
## Vulnerability Reporting
### How to Report
Report vulnerabilities privately through:
- **Preferred**: GitHub Private Vulnerability Disclosure feature
- **Alternative**: Email to [email protected]
### What NOT to Do
Do not disclose vulnerabilities via:
- Pull requests
- GitHub issues
- Discord
- Forum posts
### Disclosure Process
The Tauri team commits to:
- Triaging reports promptly
- Maintaining confidentiality during investigation
- Following 90-day standard for coordinated public disclosure
- Offering optional public attribution
### Supported Versions
Only Tauri versions greater than 1.0 receive security support. Earlier versions receive no security updates.
## Security Audit Checklist
### Pre-Release Audit
```markdown
## Dependency Audit
- [ ] Run `cargo audit` - no critical vulnerabilities
- [ ] Run `npm audit` - no critical vulnerabilities
- [ ] Review new dependencies for trusRelated in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.