Commit 052b801 1 parent 2d15a37 commit 052b801 Copy full SHA for 052b801
File tree 1 file changed +54
-0
lines changed
1 file changed +54
-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 : [ "main", "dev" ]
11
+ pull_request :
12
+ # The branches below must be a subset of the branches above
13
+ branches : [ "main", "dev" ]
14
+ schedule :
15
+ - cron : ' 31 19 * * 1'
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
+
27
+ name : Build
28
+ runs-on : " ubuntu-22.04"
29
+
30
+ steps :
31
+ - name : Checkout code
32
+ uses : actions/checkout@v3
33
+
34
+ - name : Build AzCopy
35
+ run : |
36
+ go build -o azcopy
37
+ ls -l
38
+ - name : Run Trivy vulnerability scanner
39
+ uses : aquasecurity/trivy-action@master
40
+ with :
41
+ scan-type : fs
42
+ scan-ref : ' ./azcopy'
43
+ ignore-unfixed : true
44
+ format : ' sarif'
45
+ output : ' trivy-results-binary.sarif'
46
+ severity : ' CRITICAL,HIGH,MEDIUM,LOW'
47
+
48
+ - name : List Issues
49
+ run : |
50
+ cat trivy-results-binary.sarif
51
+ - name : Upload Trivy scan results to GitHub Security tab
52
+ uses : github/codeql-action/upload-sarif@v2
53
+ with :
54
+ sarif_file : ' trivy-results-binary.sarif'
You can’t perform that action at this time.
0 commit comments