We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec8f9d5 commit f387fdbCopy full SHA for f387fdb
1 file changed
.github/workflows/advisories-to-slack.yml
@@ -0,0 +1,23 @@
1
+name: Notify New Security Advisories
2
+
3
+on:
4
+ schedule:
5
+ - cron: '0 * * * *'
6
+ workflow_dispatch:
7
8
+jobs:
9
+ notify:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - name: Fetch advisories and send to Slack
13
+ env:
14
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_SECURITY_ADVISORIES }}
16
+ run: |
17
+ curl -s -H "Authorization: token $GH_TOKEN" \
18
+ https://api.github.com/repos/calcom/cal.com/security-advisories \
19
+ | jq -r '.[] | select(.state=="published") | "\(.summary)\n\(.url)"' \
20
+ | while read -r msg; do
21
+ [ -n "$msg" ] && curl -X POST -H 'Content-type: application/json' \
22
+ --data "{\"text\":\"$msg\"}" "$SLACK_WEBHOOK"
23
+ done
0 commit comments