Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trivy : add arch environment download and install #217

Merged
merged 1 commit into from
Oct 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions hack/trivy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,20 @@ set -o pipefail
# checkout command exist
trivy -v
if [[ $? != 0 ]];then
wget https://github.com/aquasecurity/trivy/releases/download/v0.29.0/trivy_0.29.0_Linux-64bit.tar.gz
tar xf trivy_0.29.0_Linux-64bit.tar.gz
mv trivy /usr/local/bin/trivy
arch=$(arch)
case $(arch) in
"x86_64")
wget https://github.com/aquasecurity/trivy/releases/download/v0.29.0/trivy_0.29.0_Linux-64bit.tar.gz
tar xf trivy_0.29.0_Linux-64bit.tar.gz
;;
"aarch64")
wget https://github.com/aquasecurity/trivy/releases/download/v0.29.0/trivy_0.29.0_Linux-ARM64.tar.gz
tar xf trivy_0.29.0_Linux-ARM64.tar.gz
;;
esac
fi

mv trivy /usr/local/bin/trivy
trivy -v
for i in $*
do
trivy image --ignore-unfixed --exit-code 0 --severity MEDIUM,HIGH,CRITICAL ${i}
Expand Down