File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Security Vulnerability Slack Notification
2+
3+ # This workflow runs whenever a Dependabot alert is created or reopened.
4+ on :
5+ dependabot_alert :
6+ types : [created, reopened]
7+
8+ jobs :
9+ notify_slack_on_alert :
10+ if : github.event.action == 'created' || github.event.action == 'reopened'
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Send Slack Notification
14+ uses : rtCamp/action-slack-notify@v2
15+ env :
16+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
17+
18+ SLACK_CHANNEL : ' #docs-devdocs-notifications'
19+ SLACK_USERNAME : Dependabot Alert
20+ SLACK_ICON_EMOJI : " :dependabot:"
21+
22+ MSG_MINIMAL : true
23+ SLACK_MESSAGE : |
24+ *🚨 Dependabot Security Alert ${{(github.event.action == 'created' && 'Created') || 'Reopened'}} 🚨*
25+
26+ *Repository:* ${{ github.repository }}
27+ *Vulnerability:* ${{ github.event.alert.security_vulnerability.package.ecosystem }}/${{ github.event.alert.security_vulnerability.package.name }}
28+ *Severity:* ${{ github.event.alert.security_vulnerability.severity }}
29+ *Summary:* ${{ github.event.alert.security_advisory.summary }}
30+
31+ *View Details:* ${{ github.event.alert.html_url }}
You can’t perform that action at this time.
0 commit comments