While I was reading the introduction to the Rust programming language, I came across the installation method which asks to use the following command
curl -sf
Because you are giving root access to whatever script you are executing. It can do a wide variety of nasty things.
If Rust site is ever compromised and that script gets a tiny piece that installs malware silently, you wouldn't know, without inspecting the script first.
As Daniel said plus few more reasons:
How to properly mitigate risk then:
Use this approach when making changes on production server
curl -sf -L https://static.rust-lang.org/rustup.sh -o rustup.sh
less rustup.sh
chmod +x rustup.sh
sudo ./rustup.sh
You can use this approach on dev machine / test server
su -c "curl https://static.rust-lang.org/rustup.sh -o rustup.sh && chmod +x rustup.sh && ./rustup.sh"