Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sops seems to duplicate yaml comments in certain cases #865

Open
felder opened this issue May 5, 2021 · 1 comment
Open

sops seems to duplicate yaml comments in certain cases #865

felder opened this issue May 5, 2021 · 1 comment
Labels

Comments

@felder
Copy link

felder commented May 5, 2021

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
@felixfontein
Copy link
Contributor

#866 should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants