File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
images/win/scripts/Installers Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 11# ###############################################################################
22# # File: Install-Rust.ps1
33# # Desc: Install Rust for Windows
4+ # # Supply chain security: checksum validation for bootstrap, managed by rustup for workloads
45# ###############################################################################
56
67# Rust Env
@@ -11,6 +12,13 @@ $env:CARGO_HOME = "C:\Users\Default\.cargo"
1112# See https://rustup.rs/#
1213$rustupPath = Start-DownloadWithRetry - Url " https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe" - Name " rustup-init.exe"
1314
15+ # region Supply chain security
16+ $localFileHash = (Get-FileHash - Path (Join-Path ${env: TEMP} ' rustup-init.exe' ) - Algorithm SHA256).Hash
17+ $distributorFileHash = (Invoke-RestMethod - Uri ' https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe.sha256' ).Trim()
18+
19+ Use-ChecksumComparison - LocalFileHash $localFileHash - DistributorFileHash $distributorFileHash
20+ # endregion
21+
1422# Install Rust by running rustup-init.exe (disabling the confirmation prompt with -y)
1523& $rustupPath - y -- default- toolchain= stable -- profile= minimal
1624
You can’t perform that action at this time.
0 commit comments