Repository navigation
fix(action): retry and verify CLI downloads - #2769
Open
joshuarubin wants to merge 2 commits into
Open
joshuarubin wants to merge 2 commits into
joshuarubin wants to merge 2 commits into
Conversation
Verify the selected release asset against GitHub SHA-256 metadata before making it executable. Run the verified file directly so PATH cannot select a different binary.
This branch has not been 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.
Problem
The prebuilt CLI path makes one download attempt and executes the result without checking its digest. Two attempts of an OpenTaco plan failed downloading the existing
v0.6.150/digger-cli-Linux-X64asset; the next attempt downloaded it successfully.Change
--retry 5 --retry-all-errors, a 10-second connection timeout, a 120-second request timeout, and a 300-second retry window.diggeronPATHcannot override it.The action now needs
jqand eithersha256sumorshasum, which are available on GitHub-hosted Linux and macOS runners. Releases whose assets have no GitHub SHA-256 digest fail closed.Validation
github.tokenoutside GitHub.com. The fixture confirms empty tokens send no Authorization header; removing the host guard or forcing an empty-token Bearer header each makes the test fail.--retry-all-errors, bypass checksum comparison, bypass the empty-file guard, bypass digest validation, and skip execution.v0.6.150/digger-cli-Linux-X64asset matches GitHub digest27759f162e57468d441006a3918b6bd230b218f09f1f55312159ec50eddc8969.🧠 Ai UsageDetails (if applicable):
Code, tests, and this description were written primarily by OpenAI Codex. PR responses may also be drafted with Codex assistance.