Repository navigation
Verify checksum in official CLI install scripts - #3704
Merged
Merged
Conversation
vitaliil-jfrog
approved these changes
Sep 8, 2026
The five official install scripts (build/getcli/jf.sh, build/getcli/jfrog.sh, build/installcli/jf.sh, build/installcli/jfrog.sh, build/setupcli/jf.sh) now verify the downloaded jf/jfrog binary's SHA256 before ever chmod +x'ing or installing it onto PATH, and no longer skip TLS verification (curl -k removed). The checksum is fetched from the per-binary .sha256 sidecar JGC-542 publishes at the exact same path as the binary (e.g. jfrog-cli-linux-amd64/jf.sha256), matching the live production format: a bare 64-character hex digest, verified end-to-end against the real, published releases.jfrog.io endpoint. The install aborts - deleting the partial binary - on a checksum mismatch, an unreachable/missing sidecar, or an empty/malformed one, with failure messages naming both the binary and checksum URLs and both hashes where relevant. Adds a dependency-free test driver (build/scripts_test/run_tests.sh, 17 cases) that builds fixtures on the fly matching whatever OS/arch the machine actually is - real subprocess execution against file:// URLs, no mocks, no network dependency - and wires it into CI alongside a new smoke test for build/setupcli/jf.sh, which previously had no coverage at all.
…l scripts The env var let anyone set BASE_URL for both the binary download and its checksum sidecar to the same attacker-controlled server, trivially defeating checksum verification. Hardcode BASE_URL in all 5 scripts and have the test harness redirect fixtures by sed-patching a throwaway script copy instead.
ehl-jf
force-pushed
the
feature/JGC-543
branch
from
September 8, 2026 09:06
d01f593 to
ec745d0
Compare
Contributor
This branch was previously deployed
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.

The five official install scripts (
build/getcli/jf.sh,build/getcli/jfrog.sh,build/installcli/jf.sh,build/installcli/jfrog.sh,build/setupcli/jf.sh) now verify the downloadedjf/jfrogbinary's SHA256 before everchmod +x-ing or installing it onto PATH, and no longer skip TLS verification (curl -kremoved).The checksum is fetched from the per-binary
.sha256sidecar JGC-542 publishes at the exact same path as the binary (e.g.jfrog-cli-linux-amd64/jf.sha256) — verified end-to-end against the real, publishedreleases.jfrog.ioendpoint. The install aborts (deleting the partial binary) on a checksum mismatch, an unreachable/missing sidecar, or an empty/malformed one, with failure messages naming both the binary and checksum URLs and both hashes where relevant.Adds a dependency-free test driver (
build/scripts_test/run_tests.sh, 17 cases) that builds fixtures on the fly matching whatever OS/arch the machine actually is — real subprocess execution againstfile://URLs, no mocks, no network dependency — and wires it into CI alongside a new smoke test forbuild/setupcli/jf.sh, which previously had no coverage at all.masterbranch.go vet ./....go fmt ./....