Skip to content

Commit

Permalink
Removes printing of scan results
Browse files Browse the repository at this point in the history
  • Loading branch information
PushkarJ committed Nov 23, 2021
1 parent e8b0948 commit 6373b8d
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@ periodics:
EXIT_CODE=0
RESULT_UNFILTERED=$(snyk test -d --json) || EXIT_CODE=$?
if [ $EXIT_CODE -gt 1 ]; then
echo "Failed to run snyk scan with exit code $EXIT_CODE . Error message: $RESULT_UNFILTERED"
echo "Failed to run snyk scan with exit code $EXIT_CODE "
exit 1
fi
RESULT=$(echo $RESULT_UNFILTERED | jq \
'{vulnerabilities: .vulnerabilities | map(select((.type != "license") and (.version != "0.0.0"))) | select(length > 0) }')
if [[ ${RESULT} ]]; then
echo "Vulnerability filtering failed"
echo "Snyk tool output:\n $RESULT_UNFILTERED"
exit 1
else
echo "Scan completed"
Expand All @@ -66,8 +65,7 @@ periodics:
'{vulnerabilities: .vulnerabilities | map(select(.isUpgradable == true or .isPatchable == true)) | select(length > 0) }')
if [[ ${RESULT} ]]; then
echo "Vulnerability filtering failed"
echo "Snyk tool output:\n $RESULT_UNFILTERED"
#exit 1
exit 1
else
echo "Scan completed image $image"
fi
Expand Down

0 comments on commit 6373b8d

Please sign in to comment.