Skip to content

Commit

Permalink
[NVSHAS-8797] Add variable to the GITHUB_OUTPUT for future reference
Browse files Browse the repository at this point in the history
  • Loading branch information
pohanhuangtw committed Mar 19, 2024
1 parent 71cc996 commit 48e8198
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions run-scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ FOUND_MEDIUM=$(cat scan_result.json | jq '.report.vulnerabilities[] | select(.se
VUL_LIST=$(printf '["%s"]' "${VUL_NAMES_TO_FAIL//,/\",\"}")
VUL_LIST_FOUND=$(cat scan_result.json | jq --arg arr "$VUL_LIST" '.report.vulnerabilities[] | select(.name as $n | $arr | index($n)) |.name')

echo "vulnerability_count=$VUL_NUM" >> $env:GITHUB_OUTPUT
echo "high_vulnerability_count=$FOUND_HIGH" >> $env:GITHUB_OUTPUT
echo "medium_vulnerability_count=$FOUND_MEDIUM" >> $env:GITHUB_OUTPUT
echo "vulnerability_count=$VUL_NUM" >> ${env:GITHUB_OUTPUT}
echo "high_vulnerability_count=$FOUND_HIGH" >> ${env:GITHUB_OUTPUT}
echo "medium_vulnerability_count=$FOUND_MEDIUM" >> ${env:GITHUB_OUTPUT}

# we must count the high and med before we put.
if [[ -n $VUL_LIST_FOUND ]]; then
Expand Down

0 comments on commit 48e8198

Please sign in to comment.