Repository navigation
fix(ci): verify stellar-cli archive checksum before extraction (#613) - #660
Merged
JosephOladele merged 1 commit intoOct 27, 2026
Conversation
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.
PR #613 ci presets: the stellar-cli download is not checksum-verified
Description
The CI preset templates and GitHub workflows installed
stellar-cliby pipingcurl ... | tar xzfrom GitHub release archives. WhileSTELLAR_CLI_VERSIONwas pinned, the archive was not verified against a cryptographic checksum prior to extraction. A tampered or truncated archive could therefore be unpacked and executed with job secrets in scope (specificallySTELLAR_DEPLOYER_SECRETin the deploy workflow).This PR:
STELLAR_CLI_SHA256alongsideSTELLAR_CLI_VERSIONinpresets/github/testnet-deploy.ymland.github/workflows/bindings-typecheck.yml./tmp/stellar-cli.tar.gz) and verifies its SHA-256 withsha256sum -cbefore archive extraction.taris called, preventing execution of untrusted binaries.STELLAR_CLI_VERSIONalongsideSTELLAR_CLI_SHA256inpresets/README.md.deploy_preset_verifies_archive_checksum_before_extractionincrates/ci-presets/src/lib.rsto assert that generated deploy workflows includeSTELLAR_CLI_SHA256, do not pipe curl to tar, and runsha256sum -cbeforetar xz.writes_jenkins_pipeline_at_repository_rootto matchcargo +stablein the Jenkins template.Acceptance Criteria Checklist
STELLAR_CLI_VERSION.presets/README.md.Changes by File
presets/github/testnet-deploy.yml: AddedSTELLAR_CLI_SHA256env var and updatedinstall-stellar-clito download to/tmp/stellar-cli.tar.gz, verify withecho "${STELLAR_CLI_SHA256} $ARCHIVE" | sha256sum -c, extract withtar xz -f, and clean up..github/workflows/bindings-typecheck.yml: Applied the same download-and-verify pattern forstellar-cliv28.0.0 with its SHA-256 hash.presets/README.md: Added "Updating stellar-cli in presets" documenting how to download the release archive, calculate the SHA-256 hash, and update the workflow file.crates/ci-presets/src/lib.rs: Added unit testdeploy_preset_verifies_archive_checksum_before_extractionand updated Jenkinsfile test assertion.Verification
cargo test -p soroban-forge-ci-presets. All 35 tests pass includingdeploy_preset_verifies_archive_checksum_before_extraction.Closes #613