Once you have SOPS setup for your GIT project, it can be a pain in the behind trying to not forget decrypting SOPS encrypted files before editing, and encrypting them again before committing.
This extension makes sure you don't have to think about that anymore. It will allow you to only see and edit decrypted files, but only save and commit the encrypted versions.
This extension is built to facilitate the following:
It does so by doing the following:
*
, the extension does the following:
[filename].tmp.[extension]
copy, which is opened insteadtmp
file will result in an updated, original SOPS encrypted filetmp
file will automatically delete the tmp
file as well, making sure decrypted data never stays on disk and is never accidentally committed*
I.e., any file that satisfies any of the combinations of .sops.yaml
file paths and their path_regex
conditions.
NOTE: It is still possible to edit the SOPS encrypted file directly, if desired, by right-mouse-clicking the encrypted file in the left explorer bar, and selecting SOPS: edit directly
.
.sops.yaml
filestmp
files (**/*.tmp.[extension]
) to your .gitignore
file, to ensure a decrypted file is never ever committed.This extension adds the following event listeners:
Encrypt
/Decrypt
buttonsDecrypt
or Encrypt
button to its top-right editor menu.This extension adds the following buttons to the top-right editor menu of every SOPS encrypted or encryptable file *
:
Decrypt
Encrypt
*
I.e., any file that satisfies any of the combinations of .sops.yaml
file paths and their path_regex
conditions.
This extension adds the following right-mouse-menu button to any yaml
/yml
/json
/env
/ini
/txt
file:
SOPS: edit directly
This extension adds the following settings:
Temp File Pre Extension
tmp
pre-extension to something differentOnly Use Buttons
This extension has the following limitations:
.sops.yaml
are taken into accountSOPS: edit directly
button is only available to yaml
/yml
/json
/env
/ini
/txt
files. Other SOPS encrypted files are rendered impossible to be edited directly by installing this extension.This extension does NOT do or help with any of the following:
.sops.yaml
filesThis extension happily makes use of the following outstanding npm
packages: