requirements.txt: fix djangorestframework and GitPython vulnerabilities
PATCH 1/3 requirements.txt: fix djangorestframework and GitPython vulnerabilities
Upgrade djangorestframework to 3.18.2 and GitPython to 3.2.1 to fix the advisories reported against 3.18.0 and 3.1.62. Pillow is left at 12.3.0:
the fixed 13.0.0 needs Python 3.11 or later.
AI-Generated: Claude Opus 5.5
--- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
requirements.txt +2 -2
@@ -20,9 +20,9 @@ django-registration==5.2.1 django-reversion==6.3.0 django-reversion-compare==0.17.0 django-simple-captcha==0.7.0 -djangorestframework==3.18.0 +djangorestframework==3.18.2 gitdb==4.0.12 -GitPython==3.1.62 +GitPython==3.2.1 kombu==5.6.2 mysqlclient==2.2.8 packaging_legacy==23.0.post0
Signature · 1 line
2.56.0
PATCH 2/3 Dockerfile: move to Ubuntu noble (24.04)
Ubuntu jammy's Python 3.10 is too old for current releases of some dependencies, e.g. Pillow 13 needs Python 3.11 or later; noble has Python 3.12.
Noble has no python2, so drop it; it was only needed for OE-Classic and branches up to krogoth, none of which have updates enabled. Allow pip to install into the system Python (PEP 668), skip upgrading the distribution's own pip and setuptools, install adduser, which the noble base image lacks, and keep /home/layers as the layers user's home, which noble's adduser --system no longer creates by default.
Python 3.12 removed asyncore, which the pyinotify bundled with BitBake for dunfell and hardknott imports; add the pyasyncore backport.
AI-Generated: Claude Opus 5.5
--- Dockerfile | 9 ++++----- requirements.txt | 1 + 2 files changed, 5 insertions(+), 5 deletions(-)
Dockerfile +4 -5
@@ -1,11 +1,12 @@ # See README.md for how to use this. -FROM ubuntu:jammy +FROM ubuntu:noble LABEL maintainer="Michael Halstead <[email protected]>" ARG APP_DIR=/opt ENV APP_DIR=${APP_DIR} ENV PYTHONUNBUFFERED=1 \ + PIP_BREAK_SYSTEM_PACKAGES=1 \ LANGUAGE=en_US \ LANG=en_US.UTF-8 \ LC_ALL=en_US.UTF-8 \
@@ -24,6 +25,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \ && locale-gen en_US.UTF-8 \ && update-locale \ && apt-get install -y --no-install-recommends \ + adduser \ autoconf \ cpio \ curl \
@@ -36,7 +38,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \ make \ netcat-openbsd \ pkg-config \ - python2 \ python3-dev \ python3-pip \ python3-wheel \
@@ -48,8 +49,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update \ && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ && locale-gen en_US.UTF-8 \ && update-locale \ - && pip3 install pip --upgrade \ - && pip3 install setuptools --upgrade \ && pip3 install gunicorn \ && pip3 install -r /requirements.txt \ && apt-get purge -y autoconf g++ make python3-dev pkg-config libjpeg-dev \
@@ -66,7 +65,7 @@ COPY docker/migrate.sh ${APP_DIR}/migrate.sh COPY docker/connectivity_check.sh ${APP_DIR}/connectivity_check.sh RUN mkdir ${APP_DIR}/workdir \ - && adduser --system --uid=500 layers \ + && adduser --system --uid=500 --home /home/layers layers \ && chown -R layers ${APP_DIR}/workdir USER layers
requirements.txt +1 -0
@@ -28,6 +28,7 @@ mysqlclient==2.2.8 packaging_legacy==23.0.post0 Pillow==12.3.0 prompt-toolkit==3.0.53 +pyasyncore==1.0.5 python-dateutil==2.9.0.post0 pytz==2026.3.post1 six==1.17.0
Signature · 1 line
2.56.0
PATCH 3/3 requirements.txt: upgrade Pillow to 13.0.0
In reply to Tim OrlingFixes the advisories reported against Pillow 12.3.0. Pillow 13 needs Python 3.11 or later, provided by the move to Ubuntu noble.
AI-Generated: Claude Opus 5.5
--- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
requirements.txt +1 -1
@@ -26,7 +26,7 @@ GitPython==3.2.1 kombu==5.6.2 mysqlclient==2.2.8 packaging_legacy==23.0.post0 -Pillow==12.3.0 +Pillow==13.0.0 prompt-toolkit==3.0.53 pyasyncore==1.0.5 python-dateutil==2.9.0.post0
Signature · 1 line
2.56.0