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

Release tarball for v0.6.4 has changed recently #143

Closed
0mp opened this issue Oct 6, 2021 · 3 comments
Closed

Release tarball for v0.6.4 has changed recently #143

0mp opened this issue Oct 6, 2021 · 3 comments

Comments

@0mp
Copy link
Contributor

0mp commented Oct 6, 2021

Hi there! I'm the maintainer of the scli package in FreeBSD. Yesterday I got a report from the FreeBSD community that the source tarball (https://codeload.github.com/isamert/scli/tar.gz/v0.6.4?dummy=/isamert-scli-v0.6.4_GH0.tar.gz) has changed its hash:

Old hash (https://cgit.freebsd.org/ports/tree/net-im/scli/distinfo):

TIMESTAMP = 1625735833
SHA256 (isamert-scli-v0.6.4_GH0.tar.gz) = 867e45b10cd9ae0acff99c14c3570d95f54a5c9ca770d786e1e5689c8158ff3f
SIZE (isamert-scli-v0.6.4_GH0.tar.gz) = 139743

New hash:

TIMESTAMP = 1633504159
SHA256 (isamert-scli-v0.6.4_GH0.tar.gz) = 350f2cd34e4b4fcd1a0f0968dc31e35736910fa07488b2faff8da286eeab3e8a
SIZE (isamert-scli-v0.6.4_GH0.tar.gz) = 139732

I wonder if that's the result of some actions performed by the scli developers (like rewriting the commit history or tagging a different commit with tag v0.6.4) or is that some GitHub infrastructure issue.

Thanks!

Details:

@exquo
Copy link
Collaborator

exquo commented Oct 7, 2021

Thanks for letting us know!

There have been no modifications to the source code of the latest release, or to the git history.
(This can be verified if you had a git clone of the repo: a forced push would have been seen on the next pull. Otherwise - not sure.. Maybe an archived copy of scli can be found somewhere..)

The "Source code" files in GitHub's release assets are generated dynamically. The resulting files may differ slightly depending on the version of git, tar and gzip used by the GitHub servers at the time of download.
Apparently, this issue has bitten many projects before: see this answer on Security SE.

Verifying the authenticity of the files is important, so let us know if we can help mitigate this in the future. According to the answer linked above:

The best way to get verifiable source dumps from GitHub is to clone the repository and check out the commit hash associated with the tag.

Maybe FreshPorts could fetch the source with git rather than download the release .tar.gz assets?

@0mp
Copy link
Contributor Author

0mp commented Oct 7, 2021

There have been no modifications to the source code of the latest release, or to the git history. (This can be verified if you had a git clone of the repo: a forced push would have been seen on the next pull. Otherwise - not sure.. Maybe an archived copy of scli can be found somewhere..)

Thanks! I've compared the tagged commit from the repo with the tarball and they are the same (modulo the VERSION file).

The "Source code" files in GitHub's release assets are generated dynamically. The resulting files may differ slightly depending on the version of git, tar and gzip used by the GitHub servers at the time of download. Apparently, this issue has bitten many projects before: see this answer on Security SE.

Verifying the authenticity of the files is important, so let us know if we can help mitigate this in the future. According to the answer linked above:

The best way to get verifiable source dumps from GitHub is to clone the repository and check out the commit hash associated with the tag.

Maybe FreshPorts could fetch the source with git rather than download the release .tar.gz assets?

The tarballs are the easiest to work with. Tarball rerolls happen from time to time in the wild. I guess there is no need to modify this workflow :)

Note: FreshPorts is just a web UI to view the FreeBSD Ports Collection. The relationship between the two can be a bit confusing at times.

In the meantime, I've updated the hashes in the FreeBSD port so FreeBSD users are going to be able to see scli package in the repos soon.

Thanks again for your help!

@0mp 0mp closed this as completed Oct 7, 2021
@exquo
Copy link
Collaborator

exquo commented Oct 7, 2021

Sure thing!

The tarballs are the easiest to work with. Tarball rerolls happen from time to time in the wild. I guess there is no need to modify this workflow :)

Makes sense. The changes to GitHub's internal tools (that affect the tarballs) probably happen rarely enough to make the manual hashes updates the simplest option.

Note: FreshPorts is just a web UI to view the FreeBSD Ports Collection. The relationship between the two can be a bit confusing at times.

Gotcha! I guess I meant "BSD ports".

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

2 participants