Skip to content

Commit

Permalink
feat(install): trivy
Browse files Browse the repository at this point in the history
  • Loading branch information
Ant0wan committed Mar 1, 2024
1 parent 02ca957 commit 7c970b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/trivy.install.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/bin/sh
set -o errexit
VERSION=$(curl -s "https://api.github.com/repos/aquasecurity/trivy/releases/latest" | jq -r '.tag_name')
SCRIPTNAME="$(basename "$0")"
BIN="${SCRIPTNAME%.install.sh}"
TMP="/tmp/${BIN}_${LATEST}"
OS="$(uname -s)"
TARGET="trivy_${VERSION:1}_${OS}-64bit.deb"
mkdir -p "$TMP"
wget "https://github.com/aquasecurity/trivy/releases/download/${VERSION}/${TARGET}" -O "${TMP}/${TARGET}"
sudo dpkg -i "${TARGET}"
sudo dpkg -i "${TMP}/${TARGET}"

0 comments on commit 7c970b6

Please sign in to comment.