Skip to content

Commit 0d1efb1

Browse files
authored
Update packages for CVEs (#3603)
1 parent c78631b commit 0d1efb1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

build/Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ FROM nginx:1.23.3 AS debian
1515
RUN --mount=type=bind,from=opentracing-lib,target=/tmp/ot/ \
1616
apt-get update \
1717
&& apt-get install --no-install-recommends --no-install-suggests -y libcap2-bin \
18-
# temp fix for CVE-2023-0361
19-
&& apt-get install -y libgnutls30 \
18+
# temp fix for CVE-2023-0361, CVE-2023-0795 and CVE-2023-23916
19+
&& apt-get install -y libgnutls30 libtiff5 curl \
2020
&& rm -rf /var/lib/apt/lists/* \
2121
&& cp -av /tmp/ot/usr/local/lib/libopentracing.so* /tmp/ot/usr/local/lib/libjaegertracing*so* /tmp/ot/usr/local/lib/libzipkin*so* /tmp/ot/usr/local/lib/libdd*so* /tmp/ot/usr/local/lib/libyaml*so* /usr/local/lib/ \
2222
&& cp -av /tmp/ot/usr/lib/nginx/modules/ngx_http_opentracing_module.so /usr/lib/nginx/modules/ \
@@ -92,6 +92,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
9292
"deb https://pkgs.nginx.com/app-protect-security-updates/debian ${DEBIAN_VERSION} nginx-plus" > /etc/apt/sources.list.d/nginx-app-protect.list \
9393
&& apt-get update \
9494
&& apt-get install --no-install-recommends --no-install-suggests -y app-protect app-protect-attack-signatures app-protect-threat-campaigns \
95+
# NAP DoS depends on curl so we can't remove it a the end
9596
&& apt-get purge --auto-remove -y curl; \
9697
fi \
9798
&& if [ -z "${NAP_MODULES##*dos*}" ]; then \
@@ -153,8 +154,6 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
153154
source /tmp/rhel_license \
154155
## the code below is duplicated from the ubi-plus image because NAP doesn't support UBI versions newer than 8.6
155156
dnf --nodocs install -y shadow-utils ca-certificates \
156-
# temp fix for CVE-2022-1304 CVE-2016-3709, CVE-2022-42898, CVE-2022-42010, CVE-2022-43680, CVE-2022-3821, CVE-2021-46848, CVE-2022-35737 and CVE-2022-47629
157-
&& dnf --nodocs upgrade -y libcom_err libxml2 krb5-libs dbus expat systemd libtasn1 sqlite-libs libksba \
158157
&& groupadd --system --gid 101 nginx \
159158
&& useradd --system --gid nginx --no-create-home --home-dir /nonexistent --comment "nginx user" --shell /bin/false --uid 101 nginx \
160159
&& rpm --import https://cs.nginx.com/static/keys/nginx_signing.key \
@@ -176,6 +175,8 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/ssl/nginx/nginx-repo.crt,mode
176175
sed -i "0,/centos/s;;${NGINX_PLUS_VERSION}/centos;" /etc/yum.repos.d/app-protect-dos-8.repo; \
177176
dnf --nodocs install -y app-protect-dos; \
178177
fi \
178+
# fix for CVEs
179+
&& dnf --nodocs upgrade -y libcom_err libxml2 krb5-libs dbus expat systemd libtasn1 sqlite-libs libksba platform-python platform-python-setuptools python3-setuptools-wheel tar \
179180
&& rm /etc/yum.repos.d/app-protect*.repo \
180181
&& subscription-manager unregister \
181182
&& dnf clean all && rm -rf /var/cache/dnf

0 commit comments

Comments
 (0)