telegram vuln notification
This commit is contained in:
parent
06e7b6ec0e
commit
a904059360
@ -26,4 +26,17 @@ jobs:
|
||||
|
||||
# if some vulnerability is found, we fail
|
||||
- name: check output
|
||||
run: if [ $(jq '.Results[0].Vulnerabilities|length' trivy-results.json) -ne "0" ] ; then exit 1 ; fi
|
||||
id: vulncount
|
||||
run: |
|
||||
echo "VULNCOUNT=$(jq '.Results[0].Vulnerabilities|length' trivy-results.json)" >> ${GITHUB_OUTPUT}
|
||||
if [ $(jq '.Results[0].Vulnerabilities|length' trivy-results.json) -ne "0" ] ; then exit 1 ; fi
|
||||
|
||||
- name: send telegram notification
|
||||
if: failure()
|
||||
uses: appleboy/telegram-action@master
|
||||
with:
|
||||
to: ${{ secrets.TELEGRAM_TO }}
|
||||
token: ${{ secrets.TELEGRAM_TOKEN }}
|
||||
format: markdown
|
||||
message: |
|
||||
Found **${{ steps.vulncount.outputs.VULNCOUNT }}** vulnerabilities in `${{ github.repository }}`
|
||||
|
Loading…
Reference in New Issue
Block a user