microsoft/hve-core
Publicmirrored fromhttps://github.com/microsoft/hve-coreAvailable
scripts/tests/Fixtures/Security/secure-download.sh
15lines · modecode
| 1 | #!/usr/bin/env bash |
| 2 | # Copyright (c) Microsoft Corporation. |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
| 5 | # Test fixture: Shell script with secure downloads (checksum verified) |
| 6 | |
| 7 | echo "Downloading tool with sha256sum verification..." |
| 8 | curl -o /tmp/tool.tar.gz https://example.com/tool.tar.gz |
| 9 | sha256sum -c /tmp/tool.tar.gz.sha256 |
| 10 | |
| 11 | echo "Downloading tool with shasum verification..." |
| 12 | wget https://example.com/other-tool.zip -O /tmp/other-tool.zip |
| 13 | shasum -a 256 /tmp/other-tool.zip |
| 14 | |
| 15 | echo "Done" |
| 16 | |