Skip to content

Commit

Permalink
Print the vulnerabilities when there are some
Browse files Browse the repository at this point in the history
  • Loading branch information
asein-sinch committed Apr 15, 2024
1 parent 52b1de3 commit 8b077db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/scripts/validate-audit-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ jq '.vulnerabilities |= map(select(.data.resolution.path | type == "string" and

# Fail the build if filtered JSON array contains audit advisories
if jq '.vulnerabilities[] | select(.type == "auditAdvisory") | .type' audit-report-filtered.json > /dev/null; then
echo "Audit advisories found. Failing the build."
exit 1
echo "Audit advisories found. Printing details:"
jq '.vulnerabilities[] | select(.type == "auditAdvisory")' audit-report-filtered.json
echo "Failing the build."
exit 1
else
echo "No audit advisories found."
fi

0 comments on commit 8b077db

Please sign in to comment.