Editing file in-place with data from stdin
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
I would like to be able to edit an already encrypted file in-place using the data from stdin so that I can use it as part of a script to modify a file. I am using a .sops.yaml file with pattern matching and multiple KMSs.
One option I found is to do -d | -e /dev/stdin, but that has the drawback that I need to specify the KMS to be used explicitly, although that is already configured in .sops.yaml.
Another possibility I could imagine is that the KMS pattern is taken from --output should that be specified.
What I don't get is why -i seems to open the editor in any case – can't it simply read from stdin if connected to a pipe? Or am I maybe missing something?
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
Start by tracing how the CLI handles -i, stdin pipes, -d/-e, --output, and .sops.yaml pattern matching. Define and verify behavior for editing an encrypted file from piped input while reusing its configured KMS settings, including what should happen when --output is supplied.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100