Skip to content

docs(setup-host): explain why curl-pipe-sh rustup install is safe here — closes #236#237

Merged
WaylandYang merged 1 commit into
mainfrom
fix/setup-host-rustup-comment
Jun 11, 2026
Merged

docs(setup-host): explain why curl-pipe-sh rustup install is safe here — closes #236#237
WaylandYang merged 1 commit into
mainfrom
fix/setup-host-rustup-comment

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

Summary

@jelloee opened #236 noting that scripts/setup-host.sh:40 does the textbook curl-pipe-sh rustup install with no checksum and no version pin. Accurate read — but the supply-chain risk is bounded by rust-toolchain.toml at the repo root: rustup-init only installs the rustup binary; the compiler forkd actually builds with is fetched from rust-lang.org per the toml, regardless of what sh.rustup.rs returns.

This PR adds a comment block above the install line explaining that, so future readers don't re-raise the same concern. Also notes a deferred future option (--paranoid mode that downloads rustup-init + verifies sha256) and why I'm not doing it now (sha256 needs refreshing on every rustup-init release).

Diff

One file, comment only, no behavior change.

Test plan

  • CI green (touches no Rust code, fmt/clippy/test all pass trivially)

Closes #236.

Thanks again to @jelloee for the thoughtful first report — exactly the kind of low-severity-but-clearly-reasoned issue that's worth replying to with reasoning, not just closing.

🤖 Generated with Claude Code

…e — #236

@jelloee filed #236 noting that scripts/setup-host.sh's curl-pipe-sh
rustup install lacks a checksum or version pin. Accurate observation,
but the supply-chain risk is bounded by `rust-toolchain.toml` at the
repo root — rustup-init only installs the rustup binary; the toolchain
forkd actually compiles with is fetched from rust-lang.org and pinned
by the toml. So even a sh.rustup.rs compromise wouldn't pick the
project's compiler.

Adding a comment explaining this so future readers don't re-raise the
same concern. Also notes a possible future `--paranoid` mode that
downloads rustup-init + verifies sha256 — deferred because the sha256
needs refreshing on every rustup-init release, which trades supply-
chain hygiene for maintenance staleness.

Closes #236.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@WaylandYang WaylandYang merged commit de5d3c7 into main Jun 11, 2026
2 checks passed
@WaylandYang WaylandYang deleted the fix/setup-host-rustup-comment branch June 11, 2026 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

setup-host.sh: pipes Rust install script directly to sh — no checksum, no version pin

1 participant