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
Github generated tarballs change randomly #10800
Comments
|
You mean they can be changed by the developers re-publishing them? Or something else? |
|
They can change at any point regardless of developers changing a tag. We have seen it multiple times during the 6 month release cycle of OpenBSD. It was also confirmed by GitHub staff. The tarballs are generated and cached, once the cash is invalidated, a new tarball is generated. This new tarball will have a different checksum. |
|
OK, that was something new to me, thank you! So attaching tarballs to a release as point 7 in https://help.github.com/articles/creating-releases/ would help that problem, assuming it is still a problem. |
|
There are also some more automated ways to attach them: |
|
OK, so indeed this is the case :-(
So, I guess the only way is to attach explicit tarballs, or in other words have some more structured/scripted release procedure (e.g. publish hashes, etc.) @qbit Thanks for raising that, I'll need to shout in other projects as well :-| |
|
I was under the impression that in practice github archives are generated by This is what I use to generate release tarballs for locally signing with PGP, then uploading just the signature to Github releases. It's similar to Debian's recommendation here: https://wiki.debian.org/Creating%20signed%20GitHub%20releases#Creating_GnuPG-signed_releases_on_GitHub_-_alternative_local_workflow |
|
Here is a blurb from a GitHub'er: |
|
To summarize, what you need on our end is a |
|
Yep! |
|
Yes, that would be much appreciated. (Note that I'm not explicitly attached to gzip compression, xz is pretty common too in some source distribution channels. e.g. kernel.org prefers xz in order to reduce download sizes, saving bandwidth for them and for the users. By now I think xz support is basically everywhere that wants it.) |
|
In other projects (snap for example) I just download the auto-gen'd tar.gz, sign and re-upload. |
|
So what you're saying is the signatures on your software are meaningless? No thanks! |
It's exactly the same as if I had generated the tarball locally.. the re-attached tarball (signed) never changes once it's reattached - as it's an asset at that point. |
|
The point is that you are YOLO trusting GitHub to produce a tarball, and blindly attaching your cryptographic signing certification to it. It is small comfort that -- probably -- at least only GitHub (or someone who hacked GitHub) can attack you, because https will prevent anyone who isn't a malicious SSL certificate company or abusing an incompetent one, from intercepting the tarball in transit while you download it. Given how utterly trivially easy it is to generate the tarball yourself on your local machine, I'm mind-boggled that you feel the need to offload that work to GitHub.com -- is your dev machine simply not powerful enough to run the git-archive(1) command? |
|
I don't appreciate your attitude. To begin with, I sign stuff locally with signify. That signature is in the repo and can be verified from the tarball, git clone.. or what ever. At that point, it doesn't matter who generates the tarball - it can be verified. Also, this is completely off topic. If you have issues with the way I do things you can open an issue on the tracker for any of my code. |
|
I'm perfectly content to not use your code in the first place. Please don't tell the developers of the code I do use, to make use of your lax security protocols. Especially given that keybase is supposed to be security software. To be clear, it doesn't matter if you securely add real signatures checked into git. The signatures you attach to github assets are still worthless and might as well not exist (because all they verify is that github said "here's a tarball of something, we pinky swear that it's your code"). Since keybase does not add signify signatures checked into git for every file in the repository, blindly signing a tarball that github has generated (without verifying its contents) does NOT add ANY security to the github assets that are being downloaded. It is trivially, trivially easy to run git-archive yourself in order to generate meaningful tarball+signatures. This is independent of whether you have an additional layer of files+signatures that can be separately verified after extracting the (unverified) tarball. |
Sure, I concede going this route isn't a good idea. My intent with the example was to show that it doesn't have to be a complicated workflow (given how trivial this is.. and how long this issue has been open.. I assume there is something complicating the process.) |
|
I just added a .tar.xz and .tar.xz.sig for the last release, 4.3.2. https://github.com/keybase/client/releases/tag/v4.3.2. Is this what is expected? Any changes needed? |
|
Indeed it is! No changes needed from my end! Thanks! |
|
One minor nitpick: the name of the tarball is "client-v4.3.2", which is a bit ambiguous, so I have to rename the tarball to "keybase-v4.3.2" in order to store source archives for many software packages together. (My distro tooling has a global source download cache.) But mostly, thanks! |
|
Okay, just added "keybase-v4.4.0.tar.xz" to today's release, and it'll be named like that in the future. |
GitHub tarballs can be changed at anytime, which renders GitHub auto-generated tarball invalid at sometime [1] Use keybase manual generated tarball that is verified with their code signing key [2] [1] keybase/client#10800 [2] https://keybase.io/docs/server_security/code_signing_key.asc
GitHub tarballs can be changed at anytime, which renders GitHub auto-generated tarball invalid at sometime [1] Use keybase manual generated tarball that is verified with their code signing key [2] [1] keybase/client#10800 [2] https://keybase.io/docs/server_security/code_signing_key.asc
GitHub tarballs can be changed at anytime, which renders GitHub auto-generated tarball invalid at sometime [1] Use keybase manual generated tarball that is verified with their code signing key [2] [1] keybase/client#10800 [2] https://keybase.io/docs/server_security/code_signing_key.asc void-linux/void-packages@5516bc2
GitHub tarballs can be changed at anytime, which renders GitHub auto-generated tarball invalid at sometime [1] Use keybase manual generated tarball that is verified with their code signing key [2] [1] keybase/client#10800 [2] https://keybase.io/docs/server_security/code_signing_key.asc
|
For the record; https://reproducible-builds.org/docs/archives/ has a "Full example" tar command line that should produce bit-identical results anywhere. |
|
Hello, we had the same issue with Bazel in bazel-contrib/SIG-rules-authors#11 - @fmeum reached out to GitHub and they confirmed that the SHA for certain URLs is guaranteed to remain stable: bazel-contrib/SIG-rules-authors#11 (comment)
|
|
Both:
are usually a redirect to the same place: Github introduced the refs/tags/ version "recently" (well, it's been around for a while at this point) and defaults this as the url for the autogenerated "source code" downloads in the tags / releases page. I suspect that they added this to distinguish between branches and tags which are otherwise ambiguous. Anyways it is good to have a promised confirmation of that guarantee, I guess. :) |
… instead. These triggered non-hermetic build failures due to a change in how github generates tarballs. See keybase/client#10800 (comment) for more info. PiperOrigin-RevId: 505765523
… instead. These triggered non-hermetic build failures due to a change in how github generates tarballs. See keybase/client#10800 (comment) for more info. PiperOrigin-RevId: 505765523
… instead. These triggered non-hermetic build failures due to a change in how github generates tarballs. See keybase/client#10800 (comment) for more info. PiperOrigin-RevId: 505772735
… instead. These triggered non-hermetic build failures due to a change in how github generates tarballs. See keybase/client#10800 (comment) for more info. PiperOrigin-RevId: 505765523
… instead. These triggered non-hermetic build failures due to a change in how github generates tarballs. See keybase/client#10800 (comment) for more info. PiperOrigin-RevId: 505772735
… instead. These triggered non-hermetic build failures due to a change in how github generates tarballs. See keybase/client#10800 (comment) for more info. PiperOrigin-RevId: 505765523
… instead. These triggered non-hermetic build failures due to a change in how github generates tarballs. See keybase/client#10800 (comment) for more info. PiperOrigin-RevId: 505784554
… instead. These triggered non-hermetic build failures due to a change in how github generates tarballs. See keybase/client#10800 (comment) for more info. PiperOrigin-RevId: 505772735
So much for that: https://github.blog/changelog/2023-01-30-git-archive-checksums-may-change/ "Hey, btw we're using a different gzip now. Change every checksum in the world". |
… instead. These triggered non-hermetic build failures due to a change in how github generates tarballs. See keybase/client#10800 (comment) for more info. PiperOrigin-RevId: 505772735
|
Update: for the moment, it's being reverted. :) |
… instead. These triggered non-hermetic build failures due to a change in how github generates tarballs. See keybase/client#10800 (comment) for more info. PiperOrigin-RevId: 505814382
|
Yeah this time I hope we will come away from this mess with a documented decision about stability, one way or the other... |
|
I guess it's really down to git, not GitHub, though. ;) But on that note, I have at last put some thoughts together for the git community to consider: https://public-inbox.org/git/a812a664-67ea-c0ba-599f-cb79e2d96694@gmail.com/T/ My hope is, indeed, that |
Hi,
As the title states, github generated tarballs can change at any point. This creates issues for packaging on systems like OpenBSD ports. Would it be possible to get official tarballs created / attached to releases? Maybe even signed :D?
The text was updated successfully, but these errors were encountered: