Skip to content

Commit

Permalink
fix: pass --db-repository option to scanner (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
DnPlas authored Oct 4, 2024
1 parent 4a03052 commit 223cb1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/images/scan-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ for IMAGE in "${IMAGE_LIST[@]}"; do
fi
echo "Scan image $IMAGE report in $TRIVY_REPORT"
docker pull $IMAGE
docker run -v /var/run/docker.sock:/var/run/docker.sock -v `pwd`:`pwd` -w `pwd` --name=scanner aquasec/trivy image --timeout 30m -f $TRIVY_REPORT_TYPE -o $TRIVY_REPORT --ignore-unfixed $IMAGE
# Adding --db-repository public.ecr.aws/aquasecurity/trivy-db:2 option
# as a workaround for https://github.com/aquasecurity/trivy-action/issues/389
docker run -v /var/run/docker.sock:/var/run/docker.sock -v `pwd`:`pwd` -w `pwd` --name=scanner aquasec/trivy image --timeout 30m -f $TRIVY_REPORT_TYPE -o $TRIVY_REPORT --ignore-unfixed $IMAGE --db-repository public.ecr.aws/aquasecurity/trivy-db:2
docker rmi $IMAGE
docker rm -f $(docker ps -a -q)
df . -h
Expand Down

0 comments on commit 223cb1c

Please sign in to comment.