Skip to content

Commit

Permalink
Use tar gz
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed Sep 26, 2024
1 parent 8ddafe8 commit c042a55
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions ext/scripts/security_scan/run_trivy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@ fi

TRIVY_CACHE_LOCATION="https://dli4ip9yror05.cloudfront.net"

mkdir -p "$HOME/.cache/trivy/db" "$HOME/.cache/trivy/java-db"
curl -o "$HOME/.cache/trivy/db/metadata.json" "${TRIVY_CACHE_LOCATION}/db/metadata.json"
curl -o "$HOME/.cache/trivy/db/trivy.db" "${TRIVY_CACHE_LOCATION}/db/trivy.db"
curl -o "$HOME/.cache/trivy/java-db/metadata.json" "${TRIVY_CACHE_LOCATION}/java-db/metadata.json"
curl -o "$HOME/.cache/trivy/java-db/trivy-java.db" "${TRIVY_CACHE_LOCATION}/java-db/trivy-java.db"

mkdir -p "$HOME/.cache/"
pushd "$HOME/.cache/"

curl -s -o trivy_cache.tar.gz "${TRIVY_CACHE_LOCATION}/trivy_cache.tar.gz"
tar xf trivy_cache.tar.gz

popd

output_path=$1

Expand Down

0 comments on commit c042a55

Please sign in to comment.