-
Notifications
You must be signed in to change notification settings - Fork 0
[Snyk] Security upgrade python from 3.10-slim to 3.13.5-slim #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| # syntax=docker/dockerfile:1.4 | ||
|
|
||
| # ---- Build stage ---- | ||
| FROM python:3.10-slim AS builder | ||
| FROM python:3.13.5-slim AS builder | ||
| WORKDIR /app | ||
|
|
||
| # System deps for building wheels, psycopg2, etc. | ||
|
|
@@ -12,7 +12,7 @@ COPY requirements-dev.txt ./ | |
| RUN pip install --upgrade pip && pip install -r requirements.txt | ||
|
|
||
| # ---- Production image ---- | ||
| FROM python:3.10-slim | ||
| FROM python:3.13.5-slim | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As with the builder stage, using a pre-release Python version for the final production image poses a critical risk to the application's stability and reliability. Production environments should always use stable, officially released versions of language runtimes. Upgrading to Please change this to a stable Python release. |
||
|
|
||
| ENV PYTHONUNBUFFERED=1 | ||
| WORKDIR /app | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upgrading the base image from Python 3.10 to 3.13.5 introduces a significant stability risk. Python 3.13 is a pre-release version and not recommended for production workloads. Using a non-stable base image can lead to unexpected build failures, dependency incompatibilities, and subtle bugs due to breaking changes in the language or standard library.
While fixing security vulnerabilities is important, it's crucial to balance it with application stability. A more prudent approach is to upgrade to the latest stable Python version, which is currently Python 3.12. This will likely resolve many vulnerabilities while providing a stable foundation.
I strongly recommend using a stable Python version. Please consider testing with
python:3.12-sliminstead.