14 lines
658 B
Bash
Executable File
14 lines
658 B
Bash
Executable File
#!/bin/sh
|
|
# Installs Trivy at a fixed version, checked against a fixed checksum, so a changed download fails the
|
|
# job instead of running. To update: take the version and the checksum of the Linux-64bit tarball from
|
|
# https://github.com/aquasecurity/trivy/releases (the checksums file of that release).
|
|
set -eu
|
|
|
|
VERSION=0.77.0
|
|
SHA256=c9504e6ff8184b91e8e7266c84ad8538f76347f1e5488e07cb083855883cd9a6
|
|
|
|
curl -fsSL -o /tmp/trivy.tar.gz "https://github.com/aquasecurity/trivy/releases/download/v${VERSION}/trivy_${VERSION}_Linux-64bit.tar.gz"
|
|
echo "${SHA256} /tmp/trivy.tar.gz" | sha256sum -c -
|
|
tar -xzf /tmp/trivy.tar.gz -C /usr/local/bin trivy
|
|
trivy --version
|