error loading config: no matching creation rules found when encryption with inline key parameters (eg: `--age` `--kms`)
Open
Nobody has claimed this yet.
area/CLI
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
Running following command in a directory doesn't contain .sops.yaml:
sops --age=age1xxfdafu5j4e5z7y5l6my6x07vjuh6unxersnwne4etpvykheq9gsj003fv -e mysecret.json
got results:
error loading config: no matching creation rules found
This is clearly a bug since creation rules should not be required when specific key is provided.
Affect:
- It's not back-compatible with old shell script that using env_var then for loop all files in dir to encrypt
===
SOPS version: sops 3.9.4
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 reproducing the sops --age ... -e mysecret.json command in a directory without .sops.yaml, then trace configuration loading for inline --age and --kms parameters. Done means encryption succeeds without creation rules when an explicit key is supplied, with a regression test covering the command-line case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100