Skip to content

Commit ece0db8

Browse files
authored
Adding support for network-share installed XCC (zephyrproject-rtos#13)
* Adding support for network-share installed XCC * CVE scan: only block CD on critical
1 parent 2236b28 commit ece0db8

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

.github/workflows/1rtos-container-image-build.yml

+21-5
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ jobs:
2525
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 .
2626
docker push 127.0.0.1:5000/sdk-docker-intel:main.stg
2727
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:
3030
runs-on: testhead
3131
needs: [ buildAndStageImage ]
3232
steps:
@@ -39,12 +39,28 @@ jobs:
3939
exit-code: '1'
4040
ignore-unfixed: true
4141
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'
4359

4460
# now run twister, using the -B option along with matrix expansion to distribute workload
4561
runTwister:
4662
runs-on: uzdo128
47-
needs: [ scanImage ]
63+
needs: [ scanImageCritical ]
4864
defaults:
4965
run:
5066
shell: bash
@@ -80,7 +96,7 @@ jobs:
8096
# For this build workflow, no actions are taken by OneRTOS-CI-Passed, just status
8197
# echo.
8298
OneRTOS-CI-Passed:
83-
needs: [ buildAndStageImage, scanImage, runTwister ]
99+
needs: [ buildAndStageImage, scanImageCritical, runTwister ]
84100
runs-on: testhead
85101
steps:
86102
- name: Post run steps

.github/workflows/1rtos-container-image-push.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
exit-code: '1'
2828
ignore-unfixed: true
2929
vuln-type: 'os,library'
30-
severity: 'CRITICAL,HIGH'
30+
severity: 'CRITICAL'
3131

3232
# now run twister, using the -B option along with matrix expansion to distribute workload
3333
runTwister:

Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ RUN apt update && apt install -y --no-install-recommends curl && \
172172
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \
173173
apt update && apt install gh
174174

175+
# Support xcc compiler installed on NFS share
176+
RUN apt update && apt install -y --no-install-recommends zlib1g:i386 libc6-i386 lib32ncurses6 lib32ncurses-dev
177+
178+
175179
RUN apt-get clean && \
176180
sudo apt-get autoremove --purge
177181

0 commit comments

Comments
 (0)