fix(scan): setup/fetch exit 2; reject VERSION/tag_name that leaves the download path - #53
Open
sheel-PBM wants to merge 5 commits into
Open
fix(scan): setup/fetch exit 2; reject VERSION/tag_name that leaves the download path#53sheel-PBM wants to merge 5 commits into
sheel-PBM wants to merge 5 commits into
Conversation
docs/EVALUATION.md says exit 1 is a gate result and exit 2 is a scanner/I/O failure. Resolving the release, an unsupported platform, or a checksum mismatch is the latter — not a findings gate. Co-authored-by: Cursor <cursoragent@cursor.com>
Checksum mismatch is already in several fail-closed PRs. Keep this change to setup/I/O that trustabl#3 does not cover, and add an offline test. Co-authored-by: Cursor <cursoragent@cursor.com>
Author
|
@sairenchristianbuerano @trustabl Ready for review. Distinct from #3 (this remaps pre-scan setup failures; #3 remaps the native binary). Local Lint is |
Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Setup/fetch failures exit 2. That includes an unresolved
VERSION, unsupported OS/arch, and aVERSIONor/releases/latesttag_namethat is not a single path segment (it would rewrite/releases/download/${VER}/${ASSET}and the local-opath). Not #3 (native remap after a run). Not #7 (checksum stays exit 1).docs/EVALUATION.mdtreats exit 1 as a gate result and exit 2 as a scanner/I/O failure. Failing to resolveVERSIONcurrently exits 1, so a pipeline cannot tell a dead GitHub lookup from a repo that has findings.This remaps pre-scan setup failures that #3 does not cover (#3 remaps the native
trustablexit after a run):VERSIONVERSION/tag_namewith/,.., whitespace,:, or@-opath)A pin or a
/releases/latesttag_namethat is not a single path segment would change/releases/download/${VER}/${ASSET}and the local tarball filename. Checksum mismatch stays at exit 1 so this does not collide with the fail-closed / macOS checksum PRs (#7, #9, #12, #55).Test plan
bash -n scan/trustabl-scan.shshellcheck -S erroron*.shbash test/test-setup-exit.sh(stubbed curl, no network: unresolved VERSION, slash pin, and slashtag_nameall exit 2; no binary fetch)VERSION: findings still exit 0/1 as before