-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (47 loc) · 1.42 KB
/
scheduled-scan.yaml
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: scheduled-scan
on:
schedule:
- cron: "0 5 * * *"
workflow_dispatch: {}
jobs:
scan:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run Trivy filesystem vulnerability scanner
id: scan
uses: aquasecurity/[email protected]
with:
scan-type: 'fs'
format: 'sarif'
output: 'trivy-filesystem-results.sarif'
exit-code: '1'
ignore-unfixed: true
severity: 'CRITICAL,HIGH'
- name: Upload Trivy filesystem scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: 'trivy-filesystem-results.sarif'
scan-image:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build image
run: make docker-image DOCKER_IMAGE=ekco:nightly
- name: Run Trivy image vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: 'ekco:nightly'
format: 'sarif'
exit-code: '1'
ignore-unfixed: true
severity: 'CRITICAL,HIGH'
output: 'trivy-image-results.sarif'
- name: Upload Trivy image scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: 'trivy-image-results.sarif'