fix(install): make checksum verification mandatory and validate redirect origin#724
Merged
fix(install): make checksum verification mandatory and validate redirect origin#724
Conversation
…ect origin Checksum verification in install.sh previously had multiple silent bypass paths: missing sha256sum/shasum binary, missing checksums file download, and missing checksum entry. All three now produce hard errors instead of warnings. Additionally, validate the redirect URL from GitHub releases/latest against the expected github.com/NVIDIA/OpenShell origin to prevent MITM/DNS hijack attacks where an attacker could serve both a malicious binary and a matching checksums file. Closes #590 Closes #638
Use grep -F for checksum lookup to prevent regex metacharacters in filenames (e.g. dots) from matching unintended lines. Limit redirect hops to 5 in download() as defense-in-depth against redirect loops or redirect-based attacks.
pimlock
approved these changes
Apr 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Make all checksum verification paths in
install.shhard failures instead of silent warnings, and validate the redirect URL origin when resolving the latest release.Related Issue
Closes #590
Closes #638
Changes
shasumnorsha256sumis available, the script aborts instead of silently skipping verificationreleases/latestredirect, the resolved URL is validated againsthttps://github.com/NVIDIA/OpenShell/releases/*to prevent MITM/DNS hijack attacks where an attacker could serve both a malicious binary and a matching checksums fileTesting
mise run pre-commitpassesChecklist