Feature: Validate downloaded binaries by file hash #4869
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to #4861
A malicious actor or maintainer not following best-practices for Release versioning, could swap out a binary file on a GitHub Release without the Heroic team knowing. It could be downloaded and bundled into a Heroic Release without their knowledge. This could break functionality or worse expose Heroic users to attack vectors.
This feature ensures that downloaded binaries from other projects, match the expected file hashes in this project. If the hash changes, assume the file has changed and the file needs to be checked for Viruses again. This feature could be used in conjunction with VirusTotal checking #4868 to validate binaries are safe for Heroic users.
When a Release version number is updated, the corresponding hash should also be updated in
meta/downloadHelperBinaries.ts
to prevent the script from throwing an Error and blocking builds.Steps:
pnpm download-helper-binaries
Example error thrown:
Use the following Checklist if you have changed something on the Backend or Frontend: