-
-
Notifications
You must be signed in to change notification settings - Fork 96
68 lines (55 loc) · 1.62 KB
/
scanners.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
name: Scanners
on:
push:
branches: [ master ]
paths-ignore:
- '**.md'
pull_request:
branches: [ master ]
paths-ignore:
- '**.md'
workflow_dispatch:
schedule:
- cron: '0 5 * * Sun'
jobs:
trivy-scan:
name: Trivy scan
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Build
run: dotnet build -c Release ./src/HappyCode.NetCoreBoilerplate.Api/HappyCode.NetCoreBoilerplate.Api.csproj
- name: Run Trivy scanner (table)
uses: aquasecurity/[email protected]
with:
scan-type: fs
severity: CRITICAL,HIGH
ignore-unfixed: true
scanners: vuln,secret,misconfig
skip-dirs: test
- name: Run Trivy scanner (sarif)
uses: aquasecurity/[email protected]
continue-on-error: ${{ github.ref == 'refs/heads/master' }}
with:
scan-type: fs
severity: CRITICAL,HIGH
ignore-unfixed: true
scanners: vuln,secret,misconfig
skip-dirs: test
format: sarif
output: trivy-results.sarif
exit-code: 1
skip-setup-trivy: true
- name: Upload Trivy scan results to GitHub Security
uses: github/codeql-action/upload-sarif@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
sarif_file: trivy-results.sarif
category: trivy-results