Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
iCloudBot authored May 7, 2024
1 parent d5e87d4 commit 2dfd902
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,19 @@ jobs:
else
echo "File does not contain"
fi
critical_count=$(grep 'CRITICAL' trivy-results.txt | wc -l)
high_count=$(grep 'HIGH' trivy-results.txt | wc -l)
total_count=$(($critical_count + $high_count))
echo "total=$total_count" >> "$GITHUB_OUTPUT"
echo $total_count
SECRET_HANDLE=$(echo 123456)
echo "total=$SECRET_HANDLE" >> "$GITHUB_OUTPUT"
# critical_count=$(grep 'CRITICAL' trivy-results.txt | wc -l)
# high_count=$(grep 'HIGH' trivy-results.txt | wc -l)
# total_count=$(($critical_count + $high_count))
# echo "total=$total_count" >> "$GITHUB_OUTPUT"
# 3.If any vulnerabilities are found in the code base,
# send a message to the provided Slack channel.
# Upload the report produced in step 2 to the Slack channel.
send-message:
needs: [security-scan]
if: ${{ needs.security-scan.outputs.total == '20' }}
if: ${{ needs.security-scan.outputs.total == '123456' }}
runs-on: ubuntu-latest
steps:
- name: test
Expand Down

0 comments on commit 2dfd902

Please sign in to comment.