-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (44 loc) · 1.33 KB
/
security-scan.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Security Scan
on:
schedule:
- cron: "0 12 * * 1" # 12pm UTC every Monday
workflow_dispatch:
jobs:
scan:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Snyk code scan
uses: snyk/actions/gradle@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_API_KEY }}
with:
command: code test
- name: Snyk dependency scan
uses: snyk/actions/gradle@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_API_KEY }}
with:
args: --all-sub-projects --severity-threshold=high
- name: Android Dependency Security Scan
if: failure()
id: slack
uses: slackapi/[email protected]
with:
channel-id: ${{ vars.SLACK_DUCKBOT_SECURITY_SCAN_ALERT_CHANNEL_ID}}
payload: |
{
"text": "Security Scan Failed"
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action build result: ${{ job.status }}\nhttps://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_DUCKBOT_API_KEY }}