Skip to content

Commit

Permalink
Update image-scan.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rahu1ramesh authored Mar 15, 2024
1 parent 0a02301 commit 627bf29
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion script/image-scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ ORG="$1"

# Check if trivy is installed
if ! command -v trivy &> /dev/null; then
echo "Trivy is not installed. Please install it from https://aquasecurity.github.io/trivy/v0.18.3/installation/ and run this script again."
echo "Trivy is not installed."
#Install Trivy
sudo apt-get install wget apt-transport-https gnupg lsb-release
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/tr…
sudo apt-get install trivy
exit 1
else
echo "Found trivy, using trivy v$(trivy -v | cut -d ' ' -f 2)"
Expand Down

0 comments on commit 627bf29

Please sign in to comment.