News for hackers. Stuff that matters.
Re:Git archive checksums may change by Denvercoder9 on Monday January 30, 2023 @06:04PM (#34587930)
I wouldn't check the hash of the compressed archive, but of the actual files themselves. It's a bit more metadata, but it's also a lot more robust, and allows you to detect changes after unpacking as well.
Re:Git archive checksums may change by bentley on Monday January 30, 2023 @06:30PM (#34588245)
It’s generally a bad idea to process (extract) a tarball of unknown provenance. Verifying the tarball is from a known source beforehand mitigates the risk of, say, a malicious tarball that exploits a tar or gzip 0‐day.
Re:Git archive checksums may change by shakow on Monday January 30, 2023 @06:37PM (#34588329)
But then that's the role of the httpS query with which you will fetch your data.

And if you don't trust your http layer and/or Github's certificate, then you should not trust their archive anyway.

Re:Git archive checksums may change by bentley on Monday January 30, 2023 @06:51PM (#34588500)
> And if you don't trust your http layer and/or Github's certificate, then you should not trust their archive anyway.

The nice thing about checksumming the tarball is that once you’ve done so, it doesn’t matter whether you trust GitHub or the HTTPS layer or not.

GitHub and its HTTPS cert provide no protection against a compromised project re‐tagging a repo with malicious source, or even deleting and re‐uploading a stable release tarball with something malicious.

Re:Git archive checksums may change by viraptor on Monday January 30, 2023 @09:59PM (#34590301)
The certificate guarantees the source of the file, not the trust you should put in its contents. I can upload malware as a github project release file and https doesn't change that you shouldn't download/run it.

For software distribution this actually sometimes goes the other way - debian/ubuntu uses http (no s) for their packages, because the content itself is signed by the distribution and this way you can easily cache it at multiple levels.

Re:Git archive checksums may change by shakow on Tuesday January 31, 2023 @03:45AM (#34592804)
> I can upload malware as a github project release file and https doesn't change that you shouldn't download/run it.

If you can't trust the archive published by the owner themselves, you are already screwed; a stable hash will just make sure that you trust harder that you are, indeed, downloading contaminated code.

I'm not sure most people here understand how checksums/hashs work, what they protect you against, and what they don't.

Re:Git archive checksums may change by ilyt on Monday January 30, 2023 @10:41PM (#34590614)
Or just contains 100TB of zeroes