We provide security updates for the following versions of this template:
| Version | Supported |
|---|---|
| Latest | ✅ |
| < 1.0 | ❌ |
We take security vulnerabilities seriously. If you discover a security vulnerability in this template, please follow these steps:
Please do not report security vulnerabilities through public GitHub issues, discussions, or other public channels.
Send details of the vulnerability to: [security@yourorganization.com] (replace with your actual security contact)
Include the following information:
- Description of the vulnerability
- Steps to reproduce the issue
- Potential impact assessment
- Any suggested fixes or mitigations
- Initial Response: Within 48 hours
- Vulnerability Assessment: Within 7 days
- Fix Development: Timeline depends on severity
- Public Disclosure: After fix is available
This template includes several security measures by default:
- Content Security Policy: Configured in
index.html - Input Validation: Client-side validation for all user inputs
- XSS Prevention: React's built-in protections + additional sanitization
- Secure Communication: HTTPS-only in production
- Tauri Security: Uses Tauri's security model with restricted permissions
- File Path Validation: All file operations validate paths to prevent traversal
- Command Validation: Input sanitization for all Tauri commands
- Minimal Permissions: App requests only necessary system permissions
- Dependency Auditing: Regular security audits of dependencies
- Automated Updates: Dependabot configured for security updates
- Code Signing: Template ready for code signing (requires certificates)
- Sandboxing: Tauri's security model provides app sandboxing
When building applications with this template:
# Never commit secrets to version control
echo "API_KEY=your-secret-key" >> .env.local
# Add .env.local to .gitignore// ✅ Good: Validate file paths
if filename.contains("..") || filename.contains("/") {
return Err("Invalid filename".to_string());
}
// ❌ Bad: Direct file access without validation
std::fs::write(user_input, data) // Dangerous!// ✅ Good: Validate and sanitize
const sanitizeInput = (input: string) => {
return input.replace(/[<>'"]/g, '').trim()
}
// ❌ Bad: Direct use of user input
dangerouslySetInnerHTML={{ __html: userInput }}// ✅ Good: Validate URLs and use HTTPS
const isValidUrl = (url: string) => {
try {
const parsed = new URL(url)
return parsed.protocol === 'https:'
} catch {
return false
}
}Always validate file paths to prevent access to system files:
// Prevent "../../../etc/passwd" attacks
fn validate_filename(filename: &str) -> bool {
!filename.contains("..") && !filename.contains("/") && !filename.contains("\\")
}Never pass user input directly to system commands:
// ❌ Dangerous
await invoke('execute_command', { command: userInput })
// ✅ Safe - predefined commands only
await invoke('predefined_safe_command', { args: validatedArgs })Avoid exposing sensitive information in error messages:
// ❌ Bad: Exposes file system structure
Err(format!("File not found: {}", full_path))
// ✅ Good: Generic error message
Err("File not found".to_string())# Check for vulnerabilities
npm audit
cargo audit
# Fix automatically where possible
npm audit fix- Keep dependencies updated
- Review dependency licenses
- Monitor security advisories
- Use exact versions for critical dependencies
# macOS
codesign --force --options runtime --sign "Developer ID Application" app.app
# Windows
signtool sign /f certificate.p12 /p password app.exe- Use HTTPS for all downloads
- Provide checksums for verification
- Sign all releases
- Use official distribution channels
- Security-focused unit tests
- Integration tests for authentication
- Dependency vulnerability scanning
- Static code analysis
- Penetration testing for critical applications
- Code reviews focusing on security
- Input validation testing
- File system access testing
In case of a security incident:
- Contain: Immediately limit the scope of the issue
- Assess: Understand the impact and affected systems
- Notify: Inform users if their data may be affected
- Fix: Develop and deploy a security patch
- Learn: Document lessons learned and improve processes
For security-related questions or concerns:
- Security Team: [security@yourorganization.com]
- General Contact: [contact@yourorganization.com]
- Documentation Issues: Open a GitHub issue (for non-security matters only)
Note: Replace placeholder email addresses with your actual contact information before publishing this template.