25
25
docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) --build-arg HTTPPROXY=$http_proxy --build-arg HTTPSPROXY=$https_proxy --build-arg NOPROXY=$no_proxy -t 127.0.0.1:5000/sdk-docker-intel:main.stg .
26
26
docker push 127.0.0.1:5000/sdk-docker-intel:main.stg
27
27
shell: bash
28
- # Run aquasecurity/trivy-action for CRITICAL & HIGH CVS
29
- scanImage :
28
+ # Run aquasecurity/trivy-action for CRITICAL CVEs, will block CI
29
+ scanImageCritical :
30
30
runs-on : testhead
31
31
needs : [ buildAndStageImage ]
32
32
steps :
@@ -39,12 +39,28 @@ jobs:
39
39
exit-code : ' 1'
40
40
ignore-unfixed : true
41
41
vuln-type : ' os,library'
42
- severity : ' CRITICAL,HIGH'
42
+ severity : ' CRITICAL'
43
+
44
+ # Run aquasecurity/trivy-action for HIGH CVEs, does not gate CI
45
+ scanImageHigh :
46
+ runs-on : testhead
47
+ needs : [ buildAndStageImage ]
48
+ steps :
49
+ - uses : actions/checkout@v2
50
+ - name : Run Trivy vulnerability scanner
51
+ uses : aquasecurity/trivy-action@master
52
+ with :
53
+ image-ref : ' 127.0.0.1:5000/sdk-docker-intel:main.stg'
54
+ format : ' table'
55
+ exit-code : ' 1'
56
+ ignore-unfixed : true
57
+ vuln-type : ' os,library'
58
+ severity : ' HIGH'
43
59
44
60
# now run twister, using the -B option along with matrix expansion to distribute workload
45
61
runTwister :
46
62
runs-on : uzdo128
47
- needs : [ scanImage ]
63
+ needs : [ scanImageCritical ]
48
64
defaults :
49
65
run :
50
66
shell : bash
80
96
# For this build workflow, no actions are taken by OneRTOS-CI-Passed, just status
81
97
# echo.
82
98
OneRTOS-CI-Passed :
83
- needs : [ buildAndStageImage, scanImage , runTwister ]
99
+ needs : [ buildAndStageImage, scanImageCritical , runTwister ]
84
100
runs-on : testhead
85
101
steps :
86
102
- name : Post run steps
0 commit comments