fix(security): declare the printed install-script URL on the allow-list - #1333
Merged
Conversation
The `update` handoff prints a curl one-liner when install.sh is not beside the binary, and the security audit blocked the release on it: BLOCKED: src/cli/cli.c: URL not on allow-list: https://raw.githubusercontent.com/DeusData/ Two things were wrong. The URL was not declared, and it was split across string literal continuations, so the audit extracted only the first fragment -- an allow-list entry for the real URL could never have matched it. Hoisted to a single CBM_INSTALL_SH_URL token so the declaration means what it says. It is the same URL as the documented one-liner install, and it is printed for the user to paste: the binary no longer downloads anything. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.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.
Release run 30435312575 was blocked by
security-static:Two problems, both fixed:
updatehandoff prints a curl one-liner wheninstall.shisn't beside the binary. It's the same URL as our documented one-liner install, and it's printed for the user to paste — the binary no longer downloads anything.https://raw.githubusercontent.com/DeusData/. An allow-list entry for the real URL could never have matched. Hoisted to a singleCBM_INSTALL_SH_URLtoken so the declaration means what it says.Note the counter-intuitive detail in that job: it also reports
mcp.c has 16 file read operations (expected max 15). That is pre-existing — the same tree at560ad40reports 17 and passed CI, because that check is advisory. This change reduced it by removing the update-checkfread.Verification
scripts/security-audit.shOK: All URLs are on the allow-list.cli+mcpsuiteslint-cireleases/latest/downloadFollow-up queued: have
install.shcopy itself next to the binary soupdatealways references a local file and the URL can be dropped entirely.