Repository separation, signing model, release hardening, and data protection.
Guardian implements a defense-in-depth security model with multiple layers of protection:
┌──────────────────────────────────────────────┐
│ 🔒 Application Layer │
│ • Secure credential storage (Keychain/DPAPI) │
│ • Input validation & sanitization │
│ • CSP-enforced script execution │
└──────────────────────────────────────────────┘
│
┌──────────────────────────────────────────────┐
│ 🔐 Transport Layer │
│ • HTTPS/TLS for API communications │
│ • Update checks via configured updater feed │
│ • Authenticated update feed requests │
└──────────────────────────────────────────────┘
│
┌──────────────────────────────────────────────┐
│ 📦 Distribution Layer │
│ • Optional code signing (build/distribution dependent) │
│ • Versioned release artifacts + metadata │
│ • Updater signature verification (config dependent) │
└──────────────────────────────────────────────┘
Guardian uses a dual-repository model for maximum security:
latest.jsonKey Principle: Never expose source code in distribution locations. Only publish compiled, signed artifacts.
Release hardening depends on your build and distribution setup. Guardian supports common signing and verification patterns, but exact guarantees vary by platform and configuration.
| Platform | Method | Certificate |
|---|---|---|
| macOS | Code signing / notarization | Build dependent |
| Windows | Code signing | Build dependent |
| Linux | Signature verification | Build dependent |
The in-app updater can validate updates before applying them:
1. Download update package
2. Verify update (for example: signature checks depending on configuration)
3. Apply update if checks pass
If any verification fails, the update is rejected and the user is notified.
| Secret Type | Storage Location | Never Store In |
|---|---|---|
| API Keys | Keychain/DPAPI | Plain text files |
| Private Keys | CI Secrets | Repository |
| Auth Tokens | Secure storage | localStorage |
Use Environment Variables: For CI/CD, use encrypted secrets:
# CI example
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
Rotate Keys Regularly: Set calendar reminders for key rotation
Audit Access: Review who has access to secrets quarterly
Guardian stores these data types locally:
| Data Type | Location | Encryption |
|---|---|---|
| Settings | App data folder | OS / filesystem dependent |
| Scan history | App data folder | OS / filesystem dependent |
| API credentials | System keychain | OS keychain encryption |
Guardian enforces strict CSP rules:
default-src 'self';
script-src 'self';
style-src 'self';
img-src 'self' data: https:;
connect-src 'self' https://api.openai.com https://api.anthropic.com https://updates.guardian.example.com;
img-src 'self' data: https:;
This prevents:
Found a security issue? Please report responsibly:
Do Not:
Before deploying Guardian in your organization: