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 is duplicating comments in secrets files #2395

Closed
felder opened this issue May 5, 2021 · 6 comments
Closed

sops is duplicating comments in secrets files #2395

felder opened this issue May 5, 2021 · 6 comments
Assignees
Labels

Comments

@felder
Copy link
Contributor

felder commented May 5, 2021

@ryanlovett noticed several duplicate comments in the secrets files. The culprit appears to be sops. I was able to devise a trivial test case that reproduces the bug and I filed a bug report with the sops project:

getsops/sops#865

Note that I also linked this issue another issue that mentions sops also reformatting comments:

getsops/sops#864

It doesn't seem like the sops devs plan on fixing that issue, but I think the duplicate comment issue is more severe. So hopefully they'll address it.

@felder felder added the bug label May 5, 2021
@felder felder self-assigned this May 5, 2021
@felder
Copy link
Contributor Author

felder commented May 5, 2021

Dev just left a comment indicating that this is a bug, so hopefully we'll see a fix for it in the not too distant future.

@felder
Copy link
Contributor Author

felder commented Jun 1, 2021

In theory this has been fixed:
getsops/sops#866

Hopefully this fix will make into the next release.

@balajialg
Copy link
Contributor

@felder Is this issue still relevant?

@felder
Copy link
Contributor Author

felder commented Sep 29, 2021

@balajialg yes it is.

I'm waiting for the next official release where I presume this bug will be patched.

@felder
Copy link
Contributor Author

felder commented Mar 11, 2022

Latest release of sops in theory should fix this. I'm testing it now.

https://github.com/mozilla/sops/releases/tag/v3.7.2

@felder
Copy link
Contributor Author

felder commented Mar 11, 2022

Sops 3.7.2 installed via homebrew works!

$ sops --version
sops 3.7.2 (latest)
$ cat test.yaml
a:
    b:
        c:
            - name: test_1
              test: a
            # I get duplicated
            - name: test_2
              test: b
$ sops -e --verbose -i test.yaml
[GCPKMS]	 INFO[0000] Encryption succeeded                          
[CMD]	 INFO[0000] File written successfully
$ sops -d test.yaml
a:
    b:
        c:
            - name: test_1
              test: a
            # I get duplicated
            - name: test_2
              test: b

@felder felder closed this as completed Mar 11, 2022
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

2 participants