-
Notifications
You must be signed in to change notification settings - Fork 879
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
Regression: sops 3.3.1 encrypts with expired gpg subkey #511
Comments
I don't see any relevant changes on our side that would cause this. My random guess would be that because of #458, something upstream changed and it broke this. I'll see if I can figure out how to reproduce this, but it'd be great if you could bisect to get the commit that actually broke things. |
Hi, thanks! I did as you suggested, and built for each of the commits between tags 3.3.0 and 3.3.1:
I built each commit with go 1.12.5. Everything was OK until I built commit e9e1e87 (#478), then I got the wrong result. I then repeated this for all the commits in #478. I found that commit 15dfcfa (#472) is the culprit. And that PR is very large... |
Since this seems to be related to updated vendor packages, and since I noticed that the vendor subfolder has been removed the head of the develop branch, I also built c9e025f (the current develop HEAD). The problem is still there. |
Excellent, thanks! It seems like that vendoring commit updates vendor/golang.org/x/crypto/openpgp, so that's very likely the culprit. |
It looks like this problem has been fixed along the way. I verified that release 3.5.0 works. |
On my gpg master key, I have three expired 2048-bit subkeys for signing, encryption and authentication. I also have my current three 4096-bit subkeys that replaced the 2048-bit keys. Normally, when I encrypt a file with sops and specify my master key it will automatically find the correct encryption subkey to use (i.e. the 4096-bit current encryption subkey). This worked up until version 3.3.0.
However starting with 3.3.1, sops has started using the expired 2048-bit encryption subkey when it encrypts.
My setup:
Encrypting with sops 3.3.1:
Notice that it has encrypted using the expired 0x8FEC8495E06221DE subkey.
Encrypting with sops 3.3.0:
This is the expected behavior, where expired subkeys are ignored, and the current 0x86D7255D39F3B027 subkey is used.
The text was updated successfully, but these errors were encountered: