Use isolated rustup on Windows#29
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d5f6451d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| download(_windows_rustup_init_url(), rustup_init) | ||
| run(setenv(`$rustup_init --default-toolchain none --no-modify-path -y`, env)) |
There was a problem hiding this comment.
Add integrity check for downloaded rustup-init
The Windows bootstrap path downloads rustup-init.exe and executes it immediately, but there is no checksum or signature verification before run(...). This removes the artifact-level hash pinning the package otherwise relies on and allows a compromised endpoint/proxy/CA path to run arbitrary code during installation. Please verify the installer against a pinned digest (or fetch it through a hashed artifact) before execution.
Useful? React with 👍 / 👎.
| end | ||
|
|
||
| function _windows_rustup_init_url() | ||
| arch = Sys.ARCH === :aarch64 ? "aarch64" : "x86_64" |
There was a problem hiding this comment.
Map i686 Windows to the correct rustup architecture
This architecture mapping falls back to "x86_64" for every non-aarch64 target, so Sys.ARCH == :i686 will incorrectly download/use x86_64 tooling. On 32-bit Windows hosts this breaks toolchain installation even though Artifacts.toml includes an i686 Windows target. Add an explicit i686 mapping (and a hard error for unsupported arches) instead of defaulting to x86_64.
Useful? React with 👍 / 👎.
Summary
Artifacts.tomlvia isolatedrustupon WindowsRUSTUP_HOMEandCARGO_HOMEunder a package scratchspace without modifying PATHVerification
julia --project -e "using Pkg; Pkg.test()"