Skip to content

Commit

Permalink
feat: Build a full SARIF report even if under accepted severity level. (
Browse files Browse the repository at this point in the history
#73)

Signed-off-by: Simar <[email protected]>
  • Loading branch information
simar7 authored Oct 27, 2021
1 parent d62898d commit 1ccef26
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,14 @@ fi
echo "Running trivy with options: ${ARGS}" "${artifactRef}"
echo "Global options: " "${GLOBAL_ARGS}"
trivy $GLOBAL_ARGS ${scanType} $ARGS ${artifactRef}
returnCode=$?

# SARIF is special. We output all vulnerabilities,
# regardless of severity level specified in this report.
# This is a feature, not a bug :)
if [[ ${template} == *"sarif"* ]]; then
echo "Building SARIF report"
trivy --quiet ${scanType} --format template --template ${template} --output ${output} ${artifactRef}
fi

exit $returnCode

0 comments on commit 1ccef26

Please sign in to comment.