Skip to content

feat: add searches and aggregation to express backend #16

feat: add searches and aggregation to express backend

feat: add searches and aggregation to express backend #16

name: Security Vulnerability Slack Notification

Check failure on line 1 in .github/workflows/Security-Notification.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/Security-Notification.yml

Invalid workflow file

(Line: 5, Col: 3): Unexpected value 'dependabot_alert'
# This workflow runs whenever a Dependabot alert is created or reopened.
on:
dependabot_alert:
types: [created, reopened]
jobs:
notify_slack_on_alert:
runs-on: ubuntu-latest
steps:
- name: Send Slack Notification via Direct Curl Payload
run: |
MESSAGE_TEXT="*🚨 Dependabot Alert: ${{ github.event.action }} 🚨*\n\n*Vulnerability:* ${{ github.event.alert.security_vulnerability.package.ecosystem }} package *${{ github.event.alert.security_vulnerability.package.name }}*\n*Severity:* ${{ github.event.alert.security_vulnerability.severity }}\n*Repository:* ${{ github.repository }}\n\n*View Details:* ${{ github.event.alert.html_url }}"
SLACK_PAYLOAD=$(jq -n \
--arg text "${MESSAGE_TEXT}" \
'{
"channel": "#docs-devdocs-notifications",
"username": "Dependabot Notifier",
"icon_emoji": ":lock:",
"text": $text
}')
# 3. Send the request directly to the webhook URL stored as a secret
curl -X POST \
-H 'Content-type: application/json' \
--data "$SLACK_PAYLOAD" \
${{ secrets.SLACK_WEBHOOK }}
env:
# jq is pre-installed on GitHub runners and is used to safely build the JSON payload.
JQ_VERSION: 1.6