Skip to content

Commit 26d331f

Browse files
Create Security-Notification.yml
Initial commit of the Dependabot notification for Security Vulnerabilities.
1 parent 788d96a commit 26d331f

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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 }}

0 commit comments

Comments
 (0)