Use with git-filter config - filter.*.clean and filter.*.smudge
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
I've been able to integrate sops with git such that files are decrypted/encrypted on checkout/commit. This was achieved like this:
-
Set up git-filter config
git config --local filter.sops-json.clean "sops --input-type json --output-type json --encrypt /dev/stdin" git config --local filter.sops-json.smudge "sops --input-type json --output-type json --decrypt /dev/stdin" git config --local filter.sops-json.required true -
Set up
.gitattributesto pass files through the filter*.json filter=sops-json diff=sops-json -
Have a
.sops.yamlconfiguration with default creation_rules:creation_rules: - kms: arn:aws:kms:...:...:key/2305235902
Checkout and commit work well. Unfortunately the files are always considered changed, I believe because the IV is new on every pass.
Is it necessary for the IV to be ephemeral? Is there a way the random IV could be avoided so this workflow is viable - i.e. so the file isn't always marked as modified by git?
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 reviewing the git filter.clean and filter.smudge workflow described in the issue, along with how sops encrypts JSON using the configured AWS KMS rule. Determine whether stable encrypted output can support checkout and commit without Git reporting changes while preserving the required security properties. Done means this workflow no longer marks files as modified after a normal checkout and commit, with its behavior documented or tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, git
- Domain
- devops, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100