Repository navigation
fix(install): verify the download against the published sha256 - #3733
Conversation
A mismatch stops the install; a missing checksum only warns. SALAM_SKIP_CHECKSUM=1 skips the check.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
sha=4469d9789df910d927e191acc347c7c72e5f3d94
🤖 Salam AI reviewVerdict: ✅ Good to merge commit SummaryThis pull request adds SHA-256 verification to both installers. Each installer fetches the published .sha256 file after the zip check, compares it with the downloaded archive, and stops before extraction on a mismatch; missing checksums, missing hash tools, and SALAM_SKIP_CHECKSUM only produce warnings. The implementation follows the existing installer structure and is consistent across the shell and PowerShell versions. What changedBoth Review
TestsNo automated tests were added. The PR describes manual shell testing against v0.6.18, including the skip path and a fake RisksThe change is low-risk because verification happens after download and before extraction, and all failure cases either stop installation or warn. The main residual risk is the untested PowerShell path and the small CRLF edge case in the shell parser.
|
Neither installer checked what it downloaded, so a corrupt or swapped archive was unpacked and run. Every release asset already has a
.sha256file next to it.<asset>.sha256after the zip check, compares it with the archive (sha256sum, shasum, sha256 or openssl, whichever exists) and stops with both hashes on a mismatch. Nothing is installed in that case.SALAM_SKIP_CHECKSUM=1skips the check.Tried install.sh against v0.6.18: a normal install prints "sha256 verified", a fake
sha256sumthat returns zeros stops the install with the expected and actual hashes, and the skip variable installs with a warning. There is no PowerShell on the machine I used, so install.ps1 is not run, only reviewed.