From 341f810bd602419f966a081da3f4debedc3e5c8e Mon Sep 17 00:00:00 2001 From: rahul2393 Date: Thu, 6 May 2021 23:15:41 +0530 Subject: [PATCH] Pin docker image, and update skip dirs argument passing to trivy (#41) --- Dockerfile | 2 +- entrypoint.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 entrypoint.sh diff --git a/Dockerfile b/Dockerfile index ef61a10..6badfd8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM aquasec/trivy:latest +FROM aquasec/trivy:0.17.2 COPY entrypoint.sh / RUN apk --no-cache add bash RUN chmod +x /entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh old mode 100644 new mode 100755 index 1ad4065..84dd08b --- a/entrypoint.sh +++ b/entrypoint.sh @@ -81,7 +81,10 @@ if [ $output ];then ARGS="$ARGS --output $output" fi if [ $skipDirs ];then - ARGS="$ARGS --skip-dirs $skipDirs" + for i in $(echo $skipDirs | tr "," "\n") + do + ARGS="$ARGS --skip-dirs $i" + done fi if [ $cacheDir ];then ARGS="$ARGS --cache-dir $cacheDir"