Sublime Forum

Security: Does Sublime create temporary files?

#1

Hello everyone,

I was wondering whether Sublime creates temporary files to cache information of the opened files on the hard drive, say in /tmp or its config directory. When I have sensitive information (e.g. keyfiles used by my cryptography software, my Bitcoin wallet, …) open, is this data anywhere but in the RAM and in the respective file location?

0 Likes

#2

Sublime Text saves unsaved changes in the files you are editing in “Data/Settings/Session.sublime_session” (and its “Auto Save Session” equivalent). I am not entirely sure but I think the same things are saved in your respective “.sublime-workspace” file associated with the project file you are in. So, as long as you only “read” the data it shouldn’t be saved anywhere. I’m not sure about the time interval when unsaved changes are saved in the mentioned files. Neither do I know if you can disable this.

0 Likes

#3

Alright, thanks for the info. I guess I should find out how vi or nano handle this issue to deal with those files.

0 Likes

#4

AFAIK, only unsaved files are stored in Session.sublime_session. If a file is marked as saved, only a reference to it being opened is stored in the session file, not its content.

Disabling hot_exit in settings will disable that behaviour, less convenient but more secure.

If you’re routinely working on security sensitive stuff you should think about using a PGPdisk/Truecrypt volume (win/mac) or encfs mountpoint (linux) and popping your files/sublime profiles in there, or running a “portable install” version entirely from there, or a USB (or secure USB) stick. There are plenty of options.

Remember that with modern OSes nothing is guaranteed to be in RAM and can be swapped out to the paging file or systems like hibernate storage. So you mustn’t assume that because software holds data in RAM that it vanishes when the machine is switched off. Most swapping schemes don’t erase data from the pagefile once it’s paged back into RAM either, so such sensitive data could reside in swap storage for some time, and potentially between reboots.

:smile:

0 Likes

#5

You could always encrypt your swap partition or disable it entirely too (linux).

0 Likes