-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (41 loc) · 1.09 KB
/
scanner.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
name: Scanner
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "0 0 * * *" # 9:00 JST every day
jobs:
scan:
name: Vulnerability scanner
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v3
with:
go-version: "~1.16"
- name: Build
run: make build/server
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@master
with:
scan-type: fs
scan-ref: ./build
severity: CRITICAL,HIGH
ignore-unfixed: true
format: template
template: "@/contrib/sarif.tpl"
output: trivy-results.sarif
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: trivy-results.sarif