[Question] Encrypt using the same data key
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository file, test, or entry point. Start by reviewing the described Python subprocess flow and how SOPS handles data keys during decrypt and re-encrypt operations. Done means determining whether reusing the same data key is supported and documenting the confirmed behavior or required interface.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100