Benjamin-Loison / vim

The official Vim repository
https://www.vim.org
Vim License
0 stars 0 forks source link

Use `shred` to securely remove content from file #14

Open Benjamin-Loison opened 2 months ago

Benjamin-Loison commented 2 months ago

Instructions: Replace the template text and remove irrelevant text (including this line)

Is your feature request about something that is currently impossible or hard to do? Please describe the problem. A clear and concise description of what is hard to do. Ex. It is difficult to [...] when [...] (If it is related to runtime files, please check their header for where to discuss enhancements.)

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

Benjamin-Loison commented 2 months ago

Tracked at Benjamin_Loison/shred/issues/11.

Benjamin-Loison commented 2 months ago

Otherwise can only rely on Benjamin_Loison/linux/issues/22.

Benjamin-Loison commented 2 months ago

Any Linux command to shred a given byte/range/set of bytes of a file would be already a good start.

Benjamin-Loison commented 1 month ago

Could just write the wanted file content without the secret in another file, shred the initial file and rename the new one to the original file name.

It seems overkill for files that do not only contain this secret but other data.

For instance:

ls -lh ~/.bash_history
-rw-rw-r-- 1 benjamin benjamin 5.8M Sep 10 15:30 /home/benjamin/.bash_history

on my Linux Mint 22 Cinnamon Framework 13.

Removing secrets do not happen much so may be fine.

Benjamin-Loison commented 1 month ago

However, if add content to a file containing a secret, then the secret may be written at multiple locations on the disk, no? It seems to make necessary to use a new file when want to add data to a file with a secret, then shred it...