getsops / getsops/sops

Allow secret modification in exec-file mode

Open
#1,217 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
23.1k
Forks
1.1k
Avg merge
1d 11h
Merged PRs (30d)
9

Description

We have a case where a program needs to modify the secrets.

So the existing workflow is to make the program behave like an editor, and execute sops like:

EDITOR=path/to/tool sops path/to/encrypted_secret

This approach works for most of the case, however, we cannot pass arguments to the tool unless using a wrapper script for the conversion.

On the other hand, exec-file mode provides a much better interface for interacting with external tools. Which even uses FIFO device to avoid putting the secret on disk. It would be nice to make the FIFO bi-directional, so that the program could optionally write the modified content back to the device.

sops exec-file --edit path/to/encrypted_secert 'path/to/tool -file={} -other-flag'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the exec-file mode entry point and its FIFO handling. Check how the current one-way device is created and consumed, then determine how modified content could be written back without placing the secret on disk. Done means the shown command can pass arguments to an external tool and receive its modified secret content.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.