Skip to content

x/vuln: Publish binaries & checksums #65206

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

Closed
mel1nn opened this issue Jan 22, 2024 · 8 comments
Closed

x/vuln: Publish binaries & checksums #65206

mel1nn opened this issue Jan 22, 2024 · 8 comments
Assignees
Labels
FrozenDueToAge vulncheck or vulndb Issues for the x/vuln or x/vulndb repo WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@mel1nn
Copy link

mel1nn commented Jan 22, 2024

Hi, is it possible to publish the binaries & checksums for each version of govulncheck ?

@gopherbot gopherbot added the vulncheck or vulndb Issues for the x/vuln or x/vulndb repo label Jan 22, 2024
@gopherbot gopherbot modified the milestones: Unreleased, vuln/unplanned Jan 22, 2024
@zpavlinovic zpavlinovic self-assigned this Jan 22, 2024
@zpavlinovic
Copy link
Contributor

What security properties you would get with this that go install golang.org/x/vuln/cmd/govulncheck@<version-of-choice> does not provide already?

@mel1nn
Copy link
Author

mel1nn commented Jan 26, 2024

We would like to have the binaries and its checksums to use them in the environment without internet.
When we get them in our environment, we would like to check the integrity of them to be sure that they have not been corrupted.
Thanks :)

@zpavlinovic
Copy link
Contributor

Just to make sure I understand. You would clearly get the binaries with the internet anyhow, but once you put them in your environment that has no internet connection, you'd like to check that they have not been malformed during the life span of the environment?

@mel1nn
Copy link
Author

mel1nn commented Jan 26, 2024

Yes that's right. Right now, we must compile govulncheck from the code source, make our own checksum of the binary, store it and check it after in our environment.

@zpavlinovic
Copy link
Contributor

Since Go supports verifiable builds as of 1.21.0, you can in principle compare the binaries without storing the checksum on disk.

Either way, it seems that you have something working?

@zpavlinovic
Copy link
Contributor

To further add, it seems to me that what you are doing is basically go install golang.org/x/vuln/cmd/govulncheck@<version> and then computing a hash of the binary. Given that Go supports verifiable builds, that is basically what we would end up doing. So the only benefit is that one can copy-paste the hashes instead of computing them, which is anyhow easy. Unless I am missing something, this is not worth doing for us.

I will leave the discussion open for a bit.

@zpavlinovic zpavlinovic added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Feb 6, 2024
@mel1nn
Copy link
Author

mel1nn commented Feb 7, 2024

Rather than have a checksum, is it possible to have a cryptographic signature of the binaries (for example, gosec already does that: https://github.com/securego/gosec/releases/tag/v2.18.2) ?
With that, we can ensure that the code of govulncheck is the one published by google. We prefer to trust a Google signature than a human doing commands (go install ...) on his computer.

@zpavlinovic
Copy link
Contributor

It is still not clear why not trust go install here, perhaps because you don't trust the go command or, say, GOMODPROXY?

Either way, we don't distribute binaries. Tools in golang repos also don't provide checksums/crypto signatures except for the go command. Given all of this and the fact that you already have a working solution, I am closing this issue.

@golang golang locked and limited conversation to collaborators Feb 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge vulncheck or vulndb Issues for the x/vuln or x/vulndb repo WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

3 participants