Skip to content

Commit 2fabb5c

Browse files
committed
Add CVE_UPDATES to resolve vuln in libarchive
Signed-off-by: Christopher Desiniotis <[email protected]>
1 parent 00b814c commit 2fabb5c

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

.github/workflows/image.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
env:
6262
IMAGE_NAME: ghcr.io/${LOWERCASE_REPO_OWNER}/k8s-device-plugin
6363
VERSION: ${COMMIT_SHORT_SHA}
64+
CVE_UPDATES: "libarchive"
6465
run: |
6566
echo "${VERSION}"
6667
make -f deployments/container/Makefile build

deployments/container/Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ RUN rpm -qa | sort -u > /tmp/package-list.minimal
5353
# We define the following image as a base image and remove unneeded packages.
5454
FROM nvcr.io/nvidia/cuda:13.0.0-base-ubi9 AS base
5555

56+
# Upgrade packages here that are required to resolve CVEs
57+
ARG CVE_UPDATES
58+
RUN if [ -n "${CVE_UPDATES}" ]; then \
59+
yum update -y ${CVE_UPDATES} && \
60+
rm -rf /var/cache/yum/*; \
61+
fi
62+
5663
WORKDIR /cleanup
5764

5865
COPY --from=minimal /tmp/package-names.minimal package-names.minimal

deployments/container/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ $(IMAGE_TARGETS): image-%:
8282
--build-arg GOLANG_VERSION="$(GOLANG_VERSION)" \
8383
--build-arg VERSION="$(VERSION)" \
8484
--build-arg GIT_COMMIT="$(GIT_COMMIT)" \
85+
--build-arg CVE_UPDATES="$(CVE_UPDATES)" \
8586
$(if $(LABEL_IMAGE_SOURCE),--label "org.opencontainers.image.source=$(LABEL_IMAGE_SOURCE)",) \
8687
-f $(DOCKERFILE) \
8788
$(CURDIR)

0 commit comments

Comments
 (0)