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

Can't pass golang unit tests #882

Closed
lavrd opened this issue Jun 2, 2021 · 10 comments
Closed

Can't pass golang unit tests #882

lavrd opened this issue Jun 2, 2021 · 10 comments

Comments

@lavrd
Copy link

lavrd commented Jun 2, 2021

Hello, I want to add something to project but I can't pass unit tests in develop branch. What am I doing wrong?

vr-Work-MacBook sops % make test
GO15VENDOREXPERIMENT=1 GO111MODULE=on GOPROXY=https://proxy.golang.org go mod tidy
GO15VENDOREXPERIMENT=1 GO111MODULE=on GOPROXY=https://proxy.golang.org go mod vendor
gpg --import pgp/sops_functional_tests_key.asc 2>&1 1>/dev/null || exit 0
gpg: key 3D16CEE4A27381B4: "SOPS Functional Tests Key 1 (https://github.com/mozilla/sops/) <[email protected]>" not changed
gpg: key 3D16CEE4A27381B4: secret key imported
gpg: key D8720D957C3D3074: "SOPS Functional Tests Key 2 (https://github.com/mozilla/sops/) <[email protected]>" not changed
gpg: key D8720D957C3D3074: secret key imported
gpg: key 3D16CEE4A27381B4: "SOPS Functional Tests Key 1 (https://github.com/mozilla/sops/) <[email protected]>" not changed
gpg: key D8720D957C3D3074: "SOPS Functional Tests Key 2 (https://github.com/mozilla/sops/) <[email protected]>" not changed
gpg: key 19F9B5DAEA91FF86: "SOPS Functional Tests Key 3 (https://github.com/mozilla/sops/) <[email protected]>" not changed
gpg: Total number processed: 5
gpg:              unchanged: 5
gpg:       secret keys read: 2
gpg:  secret keys unchanged: 2
./test.sh
ok      go.mozilla.org/sops/v3  0.412s  coverage: 51.7% of statements
ok      go.mozilla.org/sops/v3/aes      0.449s  coverage: 76.9% of statements
ok      go.mozilla.org/sops/v3/age      0.224s  coverage: 49.3% of statements
?       go.mozilla.org/sops/v3/audit    [no test files]
ok      go.mozilla.org/sops/v3/azkv     0.231s  coverage: 25.5% of statements
?       go.mozilla.org/sops/v3/cmd/sops [no test files]
?       go.mozilla.org/sops/v3/cmd/sops/codes   [no test files]
?       go.mozilla.org/sops/v3/cmd/sops/common  [no test files]
ok      go.mozilla.org/sops/v3/cmd/sops/formats 0.211s  coverage: 100.0% of statements
?       go.mozilla.org/sops/v3/cmd/sops/subcommand/exec [no test files]
?       go.mozilla.org/sops/v3/cmd/sops/subcommand/groups       [no test files]
?       go.mozilla.org/sops/v3/cmd/sops/subcommand/keyservice   [no test files]
?       go.mozilla.org/sops/v3/cmd/sops/subcommand/publish      [no test files]
?       go.mozilla.org/sops/v3/cmd/sops/subcommand/updatekeys   [no test files]
ok      go.mozilla.org/sops/v3/config   0.367s  coverage: 73.4% of statements
ok      go.mozilla.org/sops/v3/decrypt  0.337s  coverage: 0.0% of statements [no tests to run]
ok      go.mozilla.org/sops/v3/gcpkms   0.243s  coverage: 25.4% of statements
ok      go.mozilla.org/sops/v3/hcvault  7.174s  coverage: 59.4% of statements
?       go.mozilla.org/sops/v3/keys     [no test files]
ok      go.mozilla.org/sops/v3/keyservice       0.355s  coverage: 3.0% of statements
ok      go.mozilla.org/sops/v3/kms      0.318s  coverage: 57.0% of statements
?       go.mozilla.org/sops/v3/kms/mocks        [no test files]
?       go.mozilla.org/sops/v3/logging  [no test files]
[PGP]    time="2021-06-02T22:27:04+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:05+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:05+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:05+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:05+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:06+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:06+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:06+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:06+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:06+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:07+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:07+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:07+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:07+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:07+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:08+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:08+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:08+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:08+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:08+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:09+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:09+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:09+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:09+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:09+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:10+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:10+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:10+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:10+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:10+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:11+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:11+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:11+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:11+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:11+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:12+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:12+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:12+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:12+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:12+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:13+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:13+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:13+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:13+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:13+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:14+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:14+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:14+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:14+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:14+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:15+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:15+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:15+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:15+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:15+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:16+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:16+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:16+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:16+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:16+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:17+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:17+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:17+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:17+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:17+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:18+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:18+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:18+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:18+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:18+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:19+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:19+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:19+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:19+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:19+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:20+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:20+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:20+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:20+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:20+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:21+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:21+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:21+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:21+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:21+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:22+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:22+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:22+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:22+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:22+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:23+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:23+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:23+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:23+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:23+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:24+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
[PGP]    time="2021-06-02T22:27:24+03:00" level=warning msg="Deprecation Warning: GPG key fetching from a keyserver within sops will be removed in a future version of sops. See https://github.com/mozilla/sops/issues/727 for more information."
--- FAIL: TestRetrievePGPKey (0.16s)
    keysource_test.go:49: 
                Error Trace:    keysource_test.go:49
                Error:          Received unexpected error:
                                could not read entities: openpgp: invalid data: entity without any identities
                Test:           TestRetrievePGPKey
FAIL
coverage: 42.0% of statements
FAIL    go.mozilla.org/sops/v3/pgp      19.859s
FAIL
make: *** [test] Error 1
lavr@Lavr-Work-MacBook sops % 
@lavrd
Copy link
Author

lavrd commented Jun 3, 2021

And I didn't do any changes in go.mozilla.org/sops/v3/pgp package. And tests don't pass without any changes to project.

@Moskovych
Copy link

Moskovych commented Jun 24, 2021

+1. I have the same in https://github.com/mozilla/sops/actions/runs/918083857
And other recent build shows the same: https://github.com/mozilla/sops/actions/runs/962132835

Looks like it is related to #774.

@autrilla , @felixfontein , can anybody take a look into tests?

@felixfontein
Copy link
Contributor

There are some possibilities:

  1. The key at https://keys.openpgp.org/vks/v1/by-fingerprint/FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4 changed.
  2. https://pkg.go.dev/golang.org/x/crypto/openpgp#ReadArmoredKeyRing changed so it no longer likes that key. (This seems unlikely; the version I have locally and with which I'm running the test - same result as above - had last changed in 2019.)

So I guess the public key retrieved changed, and no longer contains an identity. This could be because someone changed the key, or because the key server's software changed. The key server's software is Hagrid, and is actively developed (https://gitlab.com/hagrid-keyserver/hagrid/-/commits/master). I can't find a history which version was running on keys.openpgp.org at which point in time. This must have happened between May 8th (last successful CI run) and June 2nd (first unsuccessful CI run).

Since Hagrid seems to filter identities with email addresses (https://gitlab.com/hagrid-keyserver/hagrid/-/commit/e1e88037e894887bdd0508b185c2fe2a34a43d3a), maybe it's related to that somehow? Though I'm not sure if the public key is supposed to contain any email address; it is the same fingerprint as is used for the integration test and the key is included in the repo, and that key has no email address associated.

@ajvb @autrilla any idea what's going on?

czunker pushed a commit to czunker/sops that referenced this issue Jun 30, 2021
@cameronkerrnz
Copy link

cameronkerrnz commented Jul 1, 2021

A similar issue (possibly related) that I have noticed with sops and newer versions of GnuPG (eg. 2.3.1) is that SOPS doesn't know about the GPG change to use keyboxes (eg. ~/.gnupg/pubring.kbx).

If I start with no ~/.gnupg, and import a key (doing this in a container):

rm -rf ~/.gnupg

gpg --version
--> gpg (GnuPG) 2.2.12
--> libgcrypt 1.8.4

gpg --import private.key
--> gpg: keybox '/root/.gnupg/pubring.kbx' created
--> gpg: /root/.gnupg/trustdb.gpg: trustdb created

gpg -k 
--> shows trust is 'unknown'

gpg --edit-key 6CBBBFF08395F8E19F185780222A65AD721294E8
--> use 'trust' command and set it to be ultimately trusted

ls ~/.gnupg/
--> see   pubring.kbx  pubring.kbx~  trustdb.gpg

dpkg -i sops_3.7.1_amd64.deb

Using sops will fail to decrypt because it cannot find the key:

# sops --decrypt .../secrets.py.sops
Failed to get the data key required to decrypt the SOPS file.

Group 0: FAILED
  6CBBBFF08395F8E19F185780222A65AD721294E8: FAILED
    - | could not decrypt data key with PGP key:
      | golang.org/x/crypto/openpgp error: Could not load secring:
      | open /root/.gnupg/secring.gpg: no such file or directory;
      | GPG binary error: exit status 2

Recovery failed because no master key was able to decrypt the file. In
order for SOPS to recover the file, at least one key has to be successful,
but none were.

Note that it is looking for secring.pgp, which has been deprecated in the move to keyboxes (pubring.kbx)

I can get GPG to to write this file if I edit the key and set the expiry to never (which is already the case, but apparently this still creates the side-effect of creating a file tofu.db

root@669b731fed9b:/work# ls ~/.gnupg
S.gpg-agent  S.gpg-agent.browser  S.gpg-agent.extra  S.gpg-agent.ssh  private-keys-v1.d  pubring.kbx  pubring.kbx~  trustdb.gpg

root@669b731fed9b:/work# gpg --edit-key 6CBBBFF08395F8E19F185780222A65AD721294E8
gpg (GnuPG) 2.2.12; Copyright (C) 2018 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Secret key is available.

sec  ed25519/222A65AD721294E8
     created: 2021-06-29  expires: never       usage: SC
     trust: ultimate      validity: ultimate
ssb  cv25519/1B5CBE5831039829
     created: 2021-06-29  expires: never       usage: E
[ultimate] (1). SOPS Testing (Throwaway key for testing SOPS/KSOPS) <[email protected]>

gpg> expire
Changing expiration time for the primary key.
Please specify how long the key should be valid.
         0 = key does not expire
      <n>  = key expires in n days
      <n>w = key expires in n weeks
      <n>m = key expires in n months
      <n>y = key expires in n years
Key is valid for? (0) 0
Key does not expire at all
Is this correct? (y/N) y

sec  ed25519/222A65AD721294E8
     created: 2021-06-29  expires: never       usage: SC
     trust: ultimate      validity: ultimate
ssb  cv25519/1B5CBE5831039829
     created: 2021-06-29  expires: never       usage: E
[ultimate] (1). SOPS Testing (Throwaway key for testing SOPS/KSOPS) <[email protected]>

gpg> Save changes? (y/N) y
root@669b731fed9b:/work# ls ~/.gnupg
S.gpg-agent  S.gpg-agent.browser  S.gpg-agent.extra  S.gpg-agent.ssh  private-keys-v1.d  pubring.kbx  pubring.kbx~  tofu.db  trustdb.gpg

Not sure if this makes any other changes, but tofu.db seems to be related to the Trust On First Use trust model
And after this I can decrypt my SOPS file.

(Update: it can also be caused by something else having the GPG Agent socket open; if you're a user of Visual Studio Code and you're using SOPS within a Remote Container ("dev containers"), then beware that VSCode will forward the GPG socket and so its Node.JS injected componentry will be listening to this and forwarding it outside the container).

@Moskovych
Copy link

Moskovych commented Jul 19, 2021

Who's from maintainers can take a look into these tests?
Looks like it block everybody to pass checks in opened PR's.

@ikedam
Copy link
Contributor

ikedam commented Jul 23, 2021

  1. The key at https://keys.openpgp.org/vks/v1/by-fingerprint/FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4 changed.

looks correct.

Actually, the key lacks identity:

$ curl -s https://keys.openpgp.org/vks/v1/by-fingerprint/FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4 | gpg --show-keys
pub   rsa2048 2019-08-29 [SCEA]
      FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4
sub   rsa2048 2019-08-29 [E]

$ 

The key with identity is here: https://github.com/mozilla/sops/blob/v3.7.1/pgp/sops_functional_tests_key.asc#L93
It behaves like this:

$ cat sops_functional_tests_key.asc | gpg --show-keys
...

pub   rsa2048 2019-08-29 [SC]
      FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4
uid                      SOPS Functional Tests Key 1 (https://github.com/mozilla/sops/) <[email protected]>
sub   rsa2048 2019-08-29 [E]

...
$

@ikedam
Copy link
Contributor

ikedam commented Jul 23, 2021

This looks caused how keys.openpgp.org handles of non-identity information and identity information:

https://keys.openpgp.org/about/faq#verify-multiple

Can I verify more than one key for some email address?

An email address can only be associated with a single key. When an address is verified for a new key, it will no longer appear in any key for which it was previously verified. Non-identity information will still be distributed for all keys.

[email protected] looks associated to 388B914AFF8BC589962CFA2D996E14AC4DB5EC62:
https://keys.openpgp.org/search?q=secops%40mozilla.com

$ curl -s https://keys.openpgp.org/vks/v1/by-fingerprint/388B914AFF8BC589962CFA2D996E14AC4DB5EC62 | gpg --show-keys
pub   rsa2048 2017-07-24 [SC]
      388B914AFF8BC589962CFA2D996E14AC4DB5EC62
uid                      Firefox Operations Security <[email protected]>
sub   rsa2048 2017-07-24 [E] [expires: 2022-05-19]

$

And [email protected] is no longer associated to FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4 , which is used in this test.
FBC7B9E2A4F9289AC0C1D4843D16CEE4A27381B4 doesn't return the identity part and results openpgp: invalid data: entity without any identities.

There looks no option for golang.org/x/crypto/openpgp to accept keys without identity (may be related: https://keys.openpgp.org/about/faq#older-gnupg).

We need an alternate key with a email address used only for unit tests of sops.

ikedam added a commit to ikedam/sops that referenced this issue Jul 23, 2021
* `golang.org/x/crypto/openpgp` requires keys contain identity information.
* A email address can have only a single key with identity information on keys.openpgp.org.
@ikedam
Copy link
Contributor

ikedam commented Jul 23, 2021

Created: #906

autrilla pushed a commit that referenced this issue Jul 24, 2021
* `golang.org/x/crypto/openpgp` requires keys contain identity information.
* A email address can have only a single key with identity information on keys.openpgp.org.
@felixfontein
Copy link
Contributor

Since #906 has been merged, CI should be running again.

@mitar
Copy link
Contributor

mitar commented Dec 18, 2021

This is fixed in develop branch.

@ajvb ajvb closed this as completed Feb 24, 2022
simcax pushed a commit to simcax/sops that referenced this issue Sep 23, 2023
…etsops#906)

* `golang.org/x/crypto/openpgp` requires keys contain identity information.
* A email address can have only a single key with identity information on keys.openpgp.org.

Signed-off-by: Carsten Skov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants