-
Notifications
You must be signed in to change notification settings - Fork 960
Open
Labels
Description
I have no idea how many cases this happens in, but I found at least one case where sops duplicates comments in yaml files.
I'm able to reproduce this with the following steps.
First create a yaml file with the following content:
a:
b:
c:
- name: test_1
test: a
# I get duplicated
- name: test_2
test: b
Then encrypt it with sops.
$ cat test.yaml
a:
b:
c:
- name: test_1
test: a
# I get duplicated
- name: test_2
test: b
$ sops --version
sops 3.7.1 (latest)
$ sops -e --verbose -i test.yaml
[GCPKMS] INFO[0000] Encryption succeeded resourceID=REMOVED
[CMD] INFO[0000] File written successfully
Now decrypt it with sops.
$ sops -d test.yaml
a:
b:
c:
- name: test_1
test: a
# I get duplicated
# I get duplicated
# I get duplicated
- name: test_2
test: b