Skip to content

Commit

Permalink
IRC notifications for nancy (vuln scan) step
Browse files Browse the repository at this point in the history
  • Loading branch information
cfindlayisme committed Jun 1, 2024
1 parent 76ffa5d commit c22830c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ jobs:
- name: Check for Go vulnerabilities
run: |
go list -json -m all | docker run --rm -i sonatypecommunity/nancy:latest sleuth
- name: Notify IRC Success
run: |
export COMMIT_MSG=$(git log -1 --pretty=%B)
export MESSAGE="Vulnerability scan for https://github.com/${{ github.repository }} completed successfully with commit message: $COMMIT_MSG. See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
curl -X POST -H "Content-Type: application/json" -d "{\"message\": \"$MESSAGE\", \"password\": \"${{ secrets.WMB_PASSWORD }}\", \"colourcode\": 3}" https://convos.findlayis.me/wmb/message
if: success()
- name: Notify IRC Failure
run: |
export COMMIT_MSG=$(git log -1 --pretty=%B)
export MESSAGE="Vulnerability scan for https://github.com/${{ github.repository }} failed with commit message: $COMMIT_MSG. See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
curl -X POST -H "Content-Type: application/json" -d "{\"message\": \"$MESSAGE\", \"password\": \"${{ secrets.WMB_PASSWORD }}\", \"colourcode\": 4}" https://convos.findlayis.me/wmb/message
if: failure()

build-and-scan:
needs: [sonar, nancy, unit-test]
Expand Down

0 comments on commit c22830c

Please sign in to comment.