diff --git a/.github/workflows/Security Vulnerability Check on Release Tags.yml b/.github/workflows/Security Vulnerability Check on Release Tags.yml index 29ce1545ff..4511300826 100644 --- a/.github/workflows/Security Vulnerability Check on Release Tags.yml +++ b/.github/workflows/Security Vulnerability Check on Release Tags.yml @@ -38,6 +38,12 @@ jobs: $url = "https://aka.ms/vs/2019/release/vs_buildtools.exe" $output = "vs_buildtools.exe" Invoke-WebRequest -Uri $url -OutFile $output + $expectedSize = (Invoke-WebRequest -Uri $url -Method Head).Headers.'Content-Length' + $actualSize = (Get-Item $output).length + if ($actualSize -ne $expectedSize) { + Write-Host "Download incomplete. Expected size: $expectedSize bytes, Actual size: $actualSize bytes" + exit 1 + } $installArgs = "--quiet --wait --norestart" Start-Process -FilePath $output -ArgumentList $installArgs -Wait