Repository navigation
fix: harden what the security scan flagged (https-only downloads, no strtok, SHA-1 marked not for security) - #1470
Merged
Merged
Conversation
…k in setup, SHA-1 cache keys marked not for security - builder/linux/linux_update.py: every urlopen goes through _https(), which refuses anything but an https link (the release API's asset link included); the AppRun chmod notes why it is 0o755. - scripts/release_parts.py: get() refuses non-https links, so the CI token is never sent over plain http. - builder/setup/setup.c: the setup list is split with next_line(), strtok's work without its hidden state. - nx2/*.py: hashlib.sha1(..., usedforsecurity=False) for the build-cache and fingerprint keys (same digests, so every cache stays valid; also lets the scripts run on FIPS-mode Pythons). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
Follows up the security-scan triage (the real finding, the Dependabot cooldown, landed in #1464). The rest were false positives; where a small change makes the code actually safer, this makes it:
builder/linux/linux_update.pysends everyurlopenthrough_https(), which refuses anything else (the release API's asset link included).scripts/release_parts.py'sget()does the same, so the CI token is never sent over plain http.strtokin setup.builder/setup/setup.csplits the setup list withnext_line(): strtok's work without its hidden state. Checked on CRLF, blank lines, an empty list, and a list with no last newline.usedforsecurity=False. The digests are the same, so every build cache stays valid. It also lets the scripts run on FIPS-mode Pythons.chmod 0o755now has a note on why: the launcher has to run.The "generic API key" hits are 64-bit shader IDs and test constants, so nothing to change there.
Tested: setup.c compiles with llvm-mingw clang (no new warnings), and the Python files parse.
test_linux_update/test_make_game_*give the same results as main on Windows; the Linux-only cases run in CI.🤖 Generated with Claude Code