File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -113,8 +113,8 @@ jobs:
113113 ' result.json >> $GITHUB_STEP_SUMMARY
114114 fi
115115
116- HIGH_COUNT=$(jq -r '.matches | map(.vulnerability.severity) | map(select(. == "High")) | length' result.json)
117- CRITICAL_COUNT=$(jq -r '.matches | map(.vulnerability.severity) | map(select(. == "Critical")) | length' result.json)
116+ HIGH_COUNT=$(jq -r '.matches | map(.vulnerability) | unique_by(.id) | map( .severity) | map(select(. == "High")) | length' result.json)
117+ CRITICAL_COUNT=$(jq -r '.matches | map(.vulnerability) | unique_by(.id) | map( .severity) | map(select(. == "Critical")) | length' result.json)
118118 TOTAL_HIGH_CRITICAL=$((HIGH_COUNT + CRITICAL_COUNT))
119119 echo "total_high_critical=$TOTAL_HIGH_CRITICAL" >> $GITHUB_OUTPUT
120120
You can’t perform that action at this time.
0 commit comments