Follow-up to #236 (thanks @jelloee for the original report — tagging you in case you want to take this one; zero pressure).
Context
#237 documented why the curl-pipe-sh rustup install is acceptable for the default path: rust-toolchain.toml pins the compiler forkd actually builds with, so the rustup binary itself is low-stakes. But the comment also promised a future opt-in hardened path.
Proposal
scripts/setup-host.sh --paranoid:
- Download the
rustup-init binary for the host triple from https://static.rust-lang.org/rustup/archive/<version>/<triple>/rustup-init (versioned URL, not latest)
- Verify against a sha256 pinned in the script for the pinned rustup version
- Run
./rustup-init -y instead of curl-pipe-sh
- Same treatment for the Firecracker tarball download a few lines below (it already pins
FC_VERSION but doesn't verify a checksum — FC publishes SHASUMS per release)
Default behavior unchanged — --paranoid is opt-in, so the sha256-staleness tradeoff discussed in #236 only bites people who asked for it.
Acceptance
setup-host.sh --paranoid works on a clean Ubuntu 22.04/24.04 host
- Wrong sha256 → hard fail with a clear message
- README one-liner under the install section mentioning the flag
Follow-up to #236 (thanks @jelloee for the original report — tagging you in case you want to take this one; zero pressure).
Context
#237 documented why the curl-pipe-sh rustup install is acceptable for the default path:
rust-toolchain.tomlpins the compiler forkd actually builds with, so the rustup binary itself is low-stakes. But the comment also promised a future opt-in hardened path.Proposal
scripts/setup-host.sh --paranoid:rustup-initbinary for the host triple fromhttps://static.rust-lang.org/rustup/archive/<version>/<triple>/rustup-init(versioned URL, notlatest)./rustup-init -yinstead of curl-pipe-shFC_VERSIONbut doesn't verify a checksum — FC publishes SHASUMS per release)Default behavior unchanged —
--paranoidis opt-in, so the sha256-staleness tradeoff discussed in #236 only bites people who asked for it.Acceptance
setup-host.sh --paranoidworks on a clean Ubuntu 22.04/24.04 host