getsops / getsops/sops

sops filestatus should return an different JSON when creation_rules do not apply

Open
#1,758 2 comments 1 reaction 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

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.