This repository was archived by the owner on Apr 8, 2025. It is now read-only.
File tree 1 file changed +50
-0
lines changed
1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+
6
+ name : trivy
7
+
8
+ on :
9
+ push :
10
+ branches : [ "master" ]
11
+ pull_request :
12
+ # The branches below must be a subset of the branches above
13
+ branches : [ "master" ]
14
+ schedule :
15
+ - cron : ' 40 20 * * 4'
16
+
17
+ permissions :
18
+ contents : read
19
+
20
+ jobs :
21
+ build :
22
+ permissions :
23
+ contents : read # for actions/checkout to fetch code
24
+ security-events : write # for github/codeql-action/upload-sarif to upload SARIF results
25
+ actions : read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
26
+ name : Build
27
+ runs-on : ubuntu-latest
28
+ steps :
29
+ - name : Checkout code
30
+ uses : actions/checkout@v3
31
+
32
+
33
+ - name : Build the Docker image
34
+ run : docker build . -f ./docker/userspacecni/Dockerfile -t userspacecni:latest
35
+
36
+
37
+ - name : Run Trivy vulnerability scanner
38
+ uses : aquasecurity/trivy-action@7b7aa264d83dc58691451798b4d117d53d21edfe
39
+ with :
40
+ image-ref : ' userspacecni:latest'
41
+ format : ' template'
42
+ template : ' @/contrib/sarif.tpl'
43
+ output : ' trivy-results.sarif'
44
+ severity : ' CRITICAL,HIGH'
45
+
46
+ - name : Upload Trivy scan results to GitHub Security tab
47
+ uses : github/codeql-action/upload-sarif@v2
48
+ with :
49
+ sarif_file : ' trivy-results.sarif'
50
+
You can’t perform that action at this time.
0 commit comments