This page argues that CtrlAltNotes meets its security requirements, and points to the evidence. It ties together the security model, the architecture, the hardening checklist, the pentest report and the known limits.
Claim
Note titles, bodies, attachments and folder structure can be read only by someone who has the vault password, the recovery key or an enrolled security key, both on disk and in the sync folder; and a note cannot be changed or replaced without the change being detected.
Threat model
The adversaries and what each can and cannot do are listed in the security model: the cloud provider or anyone with the synced folder, a thief of the vault folder, other local users and processes (web version), and malicious note or import content. Malware on the unlocked computer is out of scope, and so is anyone who knows the password.
Trust boundaries
- Sync folder and vault files: untrusted. Every object is authenticated (ChaCha20-Poly1305 with the object id, type and a per-file salt as associated data, so a file cannot be moved to another id or type) and strictly validated after decryption; anything else is rejected as corrupt. See Vault format.
- UI ↔ host: the UI is treated as an untrusted input producer. It never receives or sends a file path; every command argument is validated by the service. See Architecture.
- Web version ↔ other local processes: loopback only, a 256-bit random token, Host and Origin checks, size and time limits. See Web host.
- Imported files and note content: untrusted. Parsed with bounded, fuzzed parsers; rendered with DOM calls only, never HTML strings; no script, no remote content. See Note features.
- Dependencies and build: crates.io only, locked versions, audited on every change; releases built only by GitHub Actions from signed tags, with attestations. See Building.
Secure design principles applied
| Principle | How |
|---|---|
| Economy of mechanism | One AEAD (ChaCha20-Poly1305), one KDF (Argon2id), HKDF for subkeys; no custom cryptography; a small UI with no third-party JavaScript |
| Fail-safe defaults | Auto-lock on idle, close and quit; sync off until a folder is chosen; anything that fails validation is rejected, not repaired |
| Complete mediation | Every API call goes through the service, which checks the vault is unlocked and validates arguments |
| Open design | All code, formats and tests are public; security does not depend on secrecy of the design |
| Separation of privilege | Vault key wrapped separately by the password, the recovery key and each security key; note locks use a separate password |
| Least privilege | The Tauri window gets no core permissions, only opening web and mail links; file dialogs are opened by the Rust side; CI tokens read-only by default |
| Least common mechanism | Each note is its own sealed file, so one damaged file affects one note |
| Psychological acceptability | Long passphrases without composition rules (NIST SP 800-63B-4), fingerprint/security-key unlock, a recovery key shown once |
| Defence in depth | Strict CSP and DOM-only rendering on top of input validation; per-note authentication on top of folder sync |
Common weaknesses countered
| Weakness (CWE / OWASP) | Countered by | Evidence |
|---|---|---|
| Memory safety (CWE-119 family) | Rust with #![forbid(unsafe_code)] in every crate |
source scan in crates/core/tests/security.rs |
| Weak or broken cryptography (CWE-327, CWE-916) | ChaCha20-Poly1305, Argon2id (64 MiB, t=3, p=4), RustCrypto crates | known-answer tests crates/core/tests/kat.rs |
| Tampering and swapped files (CWE-345) | AEAD with the object id, type and a per-file salt bound in; anything that fails is rejected; replaying one older object is blocked. Rolling back the whole vault to an older consistent copy is a known limit | crates/core/tests/security.rs (tamper tests) |
| Cross-site scripting (CWE-79) | DOM APIs only, strict CSP, no innerHTML, safe link schemes |
tests/md_robustness.py, tests/e2e_ui.py |
| Path traversal (CWE-22) | The UI never supplies paths; import paths are labels only; .. rejected |
import tests, fuzzing |
| Resource exhaustion (CWE-400) | Size, depth and count limits on every parser, zip bomb detection | fuzz targets, tests/import_formats.py |
| Brute force (CWE-307) | Argon2id plus an unlock back-off, separate back-off for note passwords | crates/service/tests/service.rs |
| CSRF / DNS rebinding on the web version | Bearer token, Host and Origin checks, loopback only | crates/server/tests/http.rs |
| Secrets in the repository (CWE-798) | gitleaks in the gate, a hook and CI | CI secrets job |
| Vulnerable dependencies (CWE-1395) | cargo audit, cargo deny, OSV-Scanner, Dependabot as required checks | SECURITY.md |
Evidence that it holds
- The automated tests, fuzzing and static analysis described in Testing run on every change and block merges when they fail.
- The penetration test found and fixed issues, and records the controls that held.
- What is not protected is listed openly in Known limits (for example file counts, sizes and times visible to the cloud provider, and the visible title of a locked note).
This case has not yet been reviewed by an independent auditor; that is on the roadmap.