sops filestatus should return an different JSON when creation_rules do not apply
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
When using sops filestatus <filename> the response is either {"encrypted":true} or {"encrypted":false}.
There is no indication as to whether or not it would have an encryption applied or not based on creation_rules defined in .sops.yaml.
If the file is not encrypted and it doesn't match any of the creation_rules then filestatus should return either an empty response {} or some other flag, e.g. {"ignored":true}.
This would make linting extremely easy and not require an external function trying to emulate the sops logic.
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 with the sops filestatus <filename> entry point and the .sops.yaml creation_rules configuration described in the issue. Trace how rule matching and the current encrypted/unencrypted JSON responses are handled; done means an unencrypted file that matches no rule has a distinct response, with tests covering the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100