Skip to content

Commit

Permalink
Minor change for log
Browse files Browse the repository at this point in the history
  • Loading branch information
sagar-qa007 committed Nov 12, 2024
1 parent 5af1bbe commit 56bd00f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/test-vulnerabilities-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,20 @@ jobs:
- name: Check for new vulnerabilities in Scout and Trivy files
if: always()
run: |
# Check if Scout vulnerabilities file is not empty
if [ -s "scout_new_vulnerabilities.csv" ]; then
# Check if Scout vulnerabilities file has data after the header
if [ $(tail -n +2 scout_new_vulnerabilities.csv | wc -l) -gt 0 ]; then
echo "Scout vulnerabilities detected."
cat scout_new_vulnerabilities.csv
exit 1 # Fail the job if data exists
else
echo "No new Scout vulnerabilities detected."
fi
# Check if Trivy vulnerabilities file is not empty
if [ -s "trivy_new_vulnerabilities.csv" ]; then
# Check if Trivy vulnerabilities file has data after the header
if [ $(tail -n +2 trivy_new_vulnerabilities.csv | wc -l) -gt 0 ]; then
echo "Trivy vulnerabilities detected."
cat trivy_new_vulnerabilities.csv
exit 1 # Fail the job if data exists
else
echo "No new Trivy vulnerabilities detected."
fi

0 comments on commit 56bd00f

Please sign in to comment.