From 20d58feb9c011cd202c9b4c6f2a17e7af62a43f8 Mon Sep 17 00:00:00 2001 From: Tero Date: Sat, 10 Oct 2026 19:23:01 +0300 Subject: [PATCH] Update security review and todo --- SECURITY_REVIEW.md | 15 +++++++++++++++ TODO.md | 3 +++ 2 files changed, 18 insertions(+) diff --git a/SECURITY_REVIEW.md b/SECURITY_REVIEW.md index 586865b..25c526b 100644 --- a/SECURITY_REVIEW.md +++ b/SECURITY_REVIEW.md @@ -41,3 +41,18 @@ No critical or high severity issues were reported. - Run `npm audit` and pin the OpenPGP.js version. - Re-run the GnuPG interoperability tests after dependency updates. - Android has no encryption support yet, so it was not reviewed. + +## Second review pass (2026-10-09) + +Fresh review of the same scope after the first round of fixes. Tests: 20 passed, 0 failed. No code was changed in this pass. + +| # | Severity | File | Issue | Confidence | Status | +|---|----------|------|-------|------------|--------| +| 3 | 🟡 MEDIUM | `desktop/pgp-keystore.cjs`, `desktop/main.cjs` | `pgp:add-contact` adds a key for an address that already has one without a main-process confirmation. At equal trust the newest key wins recipient selection, so an added key can take over outgoing encryption. The trust dialog does not cover replacement. | 9/10 | Open | +| 4 | 🟡 MEDIUM | `desktop/main.cjs`, `desktop/preload.cjs` | The send-time downgrade check exists only in the renderer. `mail:send` sends plaintext when `pgp` is omitted, so a compromised renderer can bypass the warning. | 9/10 | Open | +| 5 | 🟡 MEDIUM | `desktop/main.cjs` | `safeStorage` is used without checking the backend. On Linux the `basic_text` backend uses a hardcoded password, so a copied store would expose account credentials and mail data. PGP private keys stay protected by their own passphrases. | 8/10 | Open | + +Suggested fixes: +- #3: native confirmation showing both fingerprints when a key overlaps existing contacts, and do not select the new key until confirmed. +- #4: make the main process decide on plaintext sends when recipient keys exist, with a trusted confirmation. +- #5: on Linux, reject or warn on `basic_text`, or add independent encryption. \ No newline at end of file diff --git a/TODO.md b/TODO.md index ec6a7b6..204fb62 100644 --- a/TODO.md +++ b/TODO.md @@ -68,3 +68,6 @@ - [x] Fix draft mail deletion to work like the Inbox: select multiple drafts and delete the selected drafts at once. - [x] Show created IMAP folders in the same list as Inbox and the other folders, and move the folder list and the add-folder button to the top row above Inbox. Add scrolling to the IMAP folders area. - [ ] Add public key server support for finding and publishing OpenPGP keys: keys.openpgp.org (VKS), keys.mailvelope.com (HKPS), and user-defined custom key servers. +- [ ] Add the ability to attach files to outgoing mails. +- [ ] Fix security review findings: confirm key replacement in the main process, enforce the plaintext-send check in the main process, and handle the Linux safeStorage basic_text backend. See SECURITY_REVIEW.md. +- [ ] Add the ability to change the passphrase of an encryption key.