-
Notifications
You must be signed in to change notification settings - Fork 996
Open
Labels
Description
I am building a custom python wrapper over sops (called via subprocess), and i currently am following this approach
- Decrypt the file to stdout
- Convert that yaml content into a python dict
- Operate on the dict in memory
- Encrypt it and dump it back to the same file path
This works great and all but, it will always re-encrypt the entire file (and uses a different data key), which makes sense.
The reason why I'm doing it like this is because it's easier to operate on a dict rather than having to do type conversions, dump as json string, etc.
I am wondering, is there a reasonable way I could do this where sops would use the same data key to encrypt the context again before saving it to the final file path ?
Thank you