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

external_deps: check hash of downloaded files #1014

Open
slipher opened this issue Jan 5, 2024 · 2 comments
Open

external_deps: check hash of downloaded files #1014

slipher opened this issue Jan 5, 2024 · 2 comments

Comments

@slipher
Copy link
Member

slipher commented Jan 5, 2024

When downloading a file for the build we should have the expected cryptographic hash (hardcoded) and check that it matches. This goes for the external_deps bundles provided by us as well as the per-dependency source or binary archives used when running external_deps/build.sh. Especially the latter since we can now have various mirrors and want to make sure they are all providing the same thing.

@illwieckz
Copy link
Member

Should we hardcorde the checksums in a file in the repository, or can we download a separate checksum file?

Basically: can we trust https or not? or: can we assume all our users assume https is safe on their side?

I guess maximum check would be to hardcode the checksums in a file in the repository, but that would be annoying to do.

@illwieckz illwieckz changed the title exteral_deps: check hash of downloaded files external_deps: check hash of downloaded files Jan 5, 2024
@slipher
Copy link
Member Author

slipher commented Jan 5, 2024

For the third-party packages downloaded by the build.sh script, the checksums should definitely be part of the Daemon repository. Otherwise it would be too annoying to update a package as someone would have to change it on the server as well. I was thinking to have the checksum as an extra argument to the download function, so that all the changes are in one place.

For the packages released by us, it would be ideal from a security standpoint to hardcode them, but maybe it's too annoying. Having a checksum list on the server would be OK I guess, although it would only protect against accidentally corrupted files, not maliciously changed ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants