Skip to content

Commit 0ba9194

Browse files
author
Shaul Kremer
committed
Pulled the libpcre2-8-0 package from Debian Testing to resolve CVE-2022-1586.
1 parent 155ecf7 commit 0ba9194

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,17 @@ RUN pip install --upgrade pip && pip install --user -r requirements.txt
2121
# most of the time only this image should be built
2222
# ---------------------------------------------------
2323
FROM python:3.8-slim-bullseye
24+
# setup optional testing repo for newer packages
25+
COPY docker-files/testing.list /etc/apt/sources.list.d/
26+
COPY docker-files/testing.prefs /etc/apt/preferences.d/
2427
# update apt
2528
RUN apt-get update
2629
# bash is needed for ./start/sh script
2730
RUN apt-get -y install curl
2831
# needed for rookout
2932
RUN apt-get -y install --fix-missing gcc g++ python3-dev
33+
# install newer pcre2 to resolve CVE-2022-1586
34+
RUN apt-get -y install -t testing libpcre2-8-0
3035
# copy opa from official image (main binary and lib for web assembly)
3136
RUN curl -L -o /opa https://openpolicyagent.org/downloads/latest/opa_linux_amd64_static && chmod 755 /opa
3237
# copy libraries from build stage
@@ -75,4 +80,4 @@ EXPOSE 7000
7580
# expose opa directly
7681
EXPOSE 8181
7782
# run gunicorn
78-
CMD ["/start.sh"]
83+
CMD ["/start.sh"]

docker-files/testing.list

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
deb http://deb.debian.org/debian bookworm main

docker-files/testing.prefs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# 100 <= P < 500: causes a version to be installed unless there is a
2+
# version available belonging to some other distribution or the installed
3+
# version is more recent
4+
5+
Package: *
6+
Pin: release a=testing
7+
Pin-Priority: 400

0 commit comments

Comments
 (0)