File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
images/win/scripts/Installers Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 11# ###############################################################################
22# # File: Install-AWS.ps1
33# # Desc: Install AWS tools(AWS CLI, Session Manager Plugin for the AWS CLI, AWS SAM CLI)
4+ # # Supply chain security: AWS CLI - managed by package manager, Session Manager Plugin for the AWS CLI - missing, AWS SAM CLI - checksum validation
45# ###############################################################################
56
67# Install AWS CLI
@@ -13,6 +14,16 @@ Install-Binary -Url $sessionManagerUrl -Name $sessionManagerName -ArgumentList (
1314$env: Path = $env: Path + " ;$env: ProgramFiles \Amazon\SessionManagerPlugin\bin"
1415
1516# Install AWS SAM CLI
16- Install-Binary - Url " https://github.com/awslabs/aws-sam-cli/releases/latest/download/AWS_SAM_CLI_64_PY3.msi" - Name " AWS_SAM_CLI_64_PY3.msi"
17+ $packageName = " AWS_SAM_CLI_64_PY3.msi"
18+ $packageUrl = " https://github.com/awslabs/aws-sam-cli/releases/latest/download/$packageName "
19+ $packagePath = Start-DownloadWithRetry - Url $packageUrl - Name $packageName
1720
18- Invoke-PesterTests - TestFile " CLI.Tools" - TestName " AWS"
21+ # region Supply chain security - AWS SAM CLI
22+ $fileHash = (Get-FileHash - Path $packagePath - Algorithm SHA256).Hash
23+ $externalHash = Get-HashFromGitHubReleaseBody - RepoOwner " awslabs" - RepoName " aws-sam-cli" - FileName $packageName
24+ Use-ChecksumComparison $fileHash $externalHash
25+ # endregion
26+
27+ Install-Binary - FilePath $packagePath
28+
29+ Invoke-PesterTests - TestFile " CLI.Tools" - TestName " AWS"
You can’t perform that action at this time.
0 commit comments