From dedfa5953191a6f23bf9bd73d79614638914dd5e Mon Sep 17 00:00:00 2001 From: abriko <2601077+abriko@users.noreply.github.com> Date: Tue, 6 Jun 2023 01:12:39 +0800 Subject: [PATCH] Enhance GitHub Dependency Snapshot upload (#233) --- entrypoint.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index d08cde3..6796754 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -169,6 +169,8 @@ if [ "$skipFiles" ];then fi trivyConfig=$(echo $trivyConfig | tr -d '\r') +# To make sure that uploda GitHub Dependency Snapshot succeeds, disable the script that fails first. +set +e if [ "${format}" == "sarif" ] && [ "${limitSeveritiesForSARIF}" != "true" ]; then # SARIF is special. We output all vulnerabilities, # regardless of severity level specified in this report. @@ -186,6 +188,7 @@ else returnCode=$? fi +set -e if [[ "${format}" == "github" ]]; then if [[ "$(echo $githubPAT | xargs)" != "" ]]; then printf "\n Uploading GitHub Dependency Snapshot"