Uh oh!
There was an error while loading. Please reload this page.
fix(macos): only treat a 64-hex string as the Docker DMG checksum (#644) - #646
Merged
Merged
Conversation
Bugbot #644 (High), recurrence of #629. The checksum fetch picked field 1 of any line mentioning "Docker.dmg". A TLS-inspecting proxy that returns an HTML error body mentioning that filename yields non-hash text, which was non-empty, so the code entered the fail-closed verify path, failed the compare, and hard-aborted an otherwise-fine install as "corrupted or tampered". Add the 64-hex structure check the PowerShell tool downloads already have: - awk now requires field 1 to be a 64-hex SHA-256 before capturing it - a belt-and-suspenders guard blanks any non-64-hex value, so garbage takes the intended warn/unreachable path instead of a fail-closed mismatch abort Real corruption/tampering still fails closed: a valid 64-hex hash that doesn't match the DMG aborts exactly as before (#556). Regenerated scripts/manifest.sha256 (setup-macos.sh is manifest-covered, R8). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
shujaatTracebloc
approved these changes
Aug 10, 2026
shujaatTracebloc
left a comment
Contributor
There was a problem hiding this comment.
LGTM — approving.
Verified the fix does what it claims: the awk structure guard ($1 ~ /^[0-9a-fA-F]{64}$/) plus the belt-and-suspenders regex check route a TLS-inspecting proxy's HTML error body (which can contain the text Docker.dmg) to the warn path instead of a false "tampered" fail-closed abort, while a genuine 64-hex SHA-256 still fails closed on mismatch (#556 preserved). scripts/manifest.sha256 regenerated for the edited file. CI all-green, Bugbot clean. Nice, tightly-scoped fix.
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 freeto 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
Bugbot #644 (High) — recurrence of #629. The Docker DMG checksum fetch treated any non-empty
awkhit for a line mentioningDocker.dmgas a real SHA-256. A TLS-inspecting proxy returning an HTML error body that mentions that filename yields non-hash text → non-empty → the code entered the fail-closed verify path, failed the compare, and hard-aborted an otherwise-fine install as "corrupted or tampered", instead of taking the intended warn/unreachable path.Fix
awknow requires field 1 to be a 64-hex SHA-256 before capturing itReal corruption/tampering still fails closed — a valid 64-hex hash that does not match the DMG aborts exactly as before (#556).
Supply chain
setup-macos.shis manifest-covered (RFC-0001 R8), soscripts/manifest.sha256is regenerated;gen-manifest.sh --checkpasses.Test plan
shellcheck -S warningclean on the changed regiongen-manifest.sh --check— manifest currentNote
Low Risk
Narrow installer hardening around checksum parsing; legitimate mismatch detection when a valid hash is available is preserved.
Overview
Hardens Docker Desktop DMG checksum parsing so TLS-inspecting proxies or HTML error pages that mention
Docker.dmgno longer get treated as a published SHA-256.The
checksums.txtawkstep now only accepts lines whose first field is a 64-character hex hash before matchingDocker.dmg. A follow-up guard clears any value that still isn’t valid hex, so the installer falls through to the unverified warn path instead of entering fail-closed verify and aborting with “corrupted or tampered.” Genuine checksum mismatches are unchanged — when a real 64-hex hash is fetched and doesn’t match the DMG, install still hard-fails.scripts/manifest.sha256is updated for the manifest-coveredsetup-macos.shchange.Reviewed by Cursor Bugbot for commit 5386f09. Bugbot is set up for automated code reviews on this repo. Configure here.