-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (51 loc) · 1.73 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
52
53
54
55
name: 'Trivy Security Scan'
on: # use pull request so this workflow does not fail when triggered by dependabot PR's
pull_request:
schedule:
- cron: "17 23 * * MON"
workflow_dispatch:
workflow_run:
workflows:
- 'Visualise docker-compose files'
types:
- completed
jobs:
build:
name: 'Trivy Scan'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
lfs: false
- name: 'Trivy Cache'
uses: yogeshlonkar/[email protected]
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
- name: 'Run Trivy vulnerability scanner in repo mode'
uses: aquasecurity/[email protected]
if: always()
# docker run --rm -v trivy_cache:/root/.cache/ aquasec/trivy fs --debug --format table --exit-code 1 --ignore-unfixed --vuln-type os,library --scanners vuln,secret --severity CRITICAL,HIGH .
with:
scan-type: 'fs'
hide-progress: false
ignore-unfixed: true # Ignore unpatched/unfixed vulnerabilities
severity: 'CRITICAL,HIGH'
scanners: 'vuln,secret'
exit-code: '1'
format: 'table'
cache-dir: .trivy
- name: 'Run Trivy vulnerability scanner in IaC mode'
uses: aquasecurity/[email protected]
if: always()
# docker run --rm -v trivy_cache:/root/.cache/ aquasec/trivy config --debug --format table --exit-code 1 --severity CRITICAL,HIGH .
with:
scan-type: 'config'
hide-progress: false
ignore-unfixed: true
severity: 'CRITICAL,HIGH'
skip-files: ''
exit-code: '1'
format: 'table'
cache-dir: .trivy