forked from dydxprotocol/v4-infrastructure
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.39 KB
/
trivy.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
name: Run Trivy IaC and Secret scans
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Clone repo
uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner in IaC mode
uses: aquasecurity/[email protected]
with:
scan-type: 'config'
hide-progress: false
format: 'sarif'
output: 'trivy-results.sarif'
exit-code: '0' # Using '0' for a soft-fail approach. Change to 1 for action to fail.
ignore-unfixed: true
severity: 'CRITICAL,HIGH,MEDIUM'
skip-dirs: '.github'
- name: Run Trivy vulnerability scanner for secrets
uses: aquasecurity/[email protected]
with:
scan-type: 'repo'
scan-ref: '.'
hide-progress: false
format: 'sarif'
output: 'trivy-results-secret.sarif'
exit-code: '0' # Using '0' for a soft-fail approach. Change to 1 for action to fail.
ignore-unfixed: true
severity: 'CRITICAL,HIGH,MEDIUM'
skip-dirs: '.github'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: 'trivy-results.sarif'