From 2d1a52afe51b3c2dbac97d658dd63fe439010d66 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Andrea Date: Sat, 11 Feb 2023 21:10:18 +0100 Subject: [PATCH 01/11] Update documentation on temporary files naming (#1673) --- docs/privacy-and-security.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/privacy-and-security.md b/docs/privacy-and-security.md index a55e6fa3..32cf8ac3 100644 --- a/docs/privacy-and-security.md +++ b/docs/privacy-and-security.md @@ -78,7 +78,7 @@ unencrypted temporary remains on your disk. If your computer were to shut off during this time, or the `jrnl` process were killed unexpectedly, then the unencrypted temporary file will remain on your disk. You can mitigate this issue by only saving with your editor right before closing it. You can also -manually delete these files (i.e. files named `jrnl_*.txt`) from your temporary +manually delete these files (i.e. files named `jrnl*.jrnl`) from your temporary folder. ## Plausible deniability From 6b179e673b0637fcc9ce1b6c9917aa34cd8f36f1 Mon Sep 17 00:00:00 2001 From: Jrnl Bot Date: Sat, 11 Feb 2023 20:12:27 +0000 Subject: [PATCH 02/11] Update changelog [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad10e106..1abc2e78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ **Documentation:** - Documentation Change [\#1651](https://github.com/jrnl-org/jrnl/issues/1651) +- Update documentation on temporary files naming [\#1673](https://github.com/jrnl-org/jrnl/pull/1673) ([giuseppedandrea](https://github.com/giuseppedandrea)) - Update docs to include time and title in arguments with `--edit` [\#1657](https://github.com/jrnl-org/jrnl/pull/1657) ([pconrad-fb](https://github.com/pconrad-fb)) - Fix markup in "Advanced Usage" doc [\#1655](https://github.com/jrnl-org/jrnl/pull/1655) ([multani](https://github.com/multani)) - Remove Windows 7 known issue since Windows 7 is no longer supported [\#1636](https://github.com/jrnl-org/jrnl/pull/1636) ([micahellison](https://github.com/micahellison)) From 6c6937c5078fa4a7a31d18e044cc067a74dd7013 Mon Sep 17 00:00:00 2001 From: David Isaksson Date: Sat, 11 Feb 2023 21:16:31 +0100 Subject: [PATCH 03/11] Add documentation about information leaks in Vim/Neovim (#1674) * Add documentation about using Vim/Neovim as editor * Add documentation about information leaks in editors * Spelling fix --------- Co-authored-by: Jonathan Wren --- docs/external-editors.md | 14 +++++++ docs/privacy-and-security.md | 78 ++++++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) diff --git a/docs/external-editors.md b/docs/external-editors.md index 977a9de2..b7219d8d 100644 --- a/docs/external-editors.md +++ b/docs/external-editors.md @@ -37,6 +37,9 @@ jrnl yesterday: All my troubles seemed so far away. --edit All editors must be [blocking processes](https://en.wikipedia.org/wiki/Blocking_(computing)) to work with jrnl. Some editors, such as [micro](https://micro-editor.github.io/), are blocking by default, though others can be made to block with additional arguments, such as many of those documented below. If jrnl opens your editor but finishes running immediately, then your editor is not a blocking process, and you may be able to correct that with one of the suggestions below. +Please see [this section](./privacy-and-security.md#editor-history) about how +your editor might leak sensitive information and how to mitigate that risk. + ## Sublime Text To use [Sublime Text](https://www.sublimetext.com/), install the command line @@ -71,6 +74,17 @@ back to journal. In the case of MacVim, this is `-f`: editor: "mvim -f" ``` +## Vim/Neovim + +To use any of the Vim derivatives as editor in Linux, simply set the `editor` +to the executable: + +```yaml +editor: "vim" +# or +editor: "nvim" +``` + ## iA Writer On OS X, you can use the fabulous [iA diff --git a/docs/privacy-and-security.md b/docs/privacy-and-security.md index 32cf8ac3..c767c5e0 100644 --- a/docs/privacy-and-security.md +++ b/docs/privacy-and-security.md @@ -67,6 +67,84 @@ Windows doesn't log history to disk, but it does keep it in your command prompt session. Close the command prompt or press `Alt`+`F7` to clear your history after journaling. +## Editor history + +Some editors keep usage history stored on disk for future use. This can be a +security risk in the sense that sensitive information can leak via recent +search patterns or editor commands. + +### Vim + +Vim stores progress data in a so called Viminfo file located at `~/.viminfo` +which contains all sorts of user data including command line history, search +string history, search/substitute patterns, contents of register etc. Also to +be able to recover opened files after an unexpected application close Vim uses +swap files. + +These options as well as other leaky features can be disabled by setting the +`editor` key in the Jrnl settings like this: + +``` yaml +editor: "vim -c 'set viminfo= noswapfile noundofile nobackup nowritebackup noshelltemp history=0 nomodeline secure'" +``` + +To disable all plugins and custom configurations and start Vim with the default +configuration `-u NONE` can be passed on the command line as well. This will +ensure that any rogue plugins or other difficult to catch information leaks are +eliminated. The downside to this is that the editor experience will decrease +quite a bit. + +To instead let Vim automatically detect when a Jrnl file is being edited an +autocommand can be used. Place this in your `~/.vimrc`: + +``` vim +autocmd BufNewFile,BufReadPre *.jrnl setlocal viminfo= noswapfile noundofile nobackup nowritebackup noshelltemp history=0 nomodeline secure +``` + +Please see `:h