Skip to content

[Snyk] Security upgrade python from 3.11-slim to 3.13.5-slim #9

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-slim AS base
FROM python:3.13.5-slim AS base

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For improved reproducibility and to protect against potential tag mutability (where the python:3.13.5-slim tag might be updated to point to a different image layer in the future), consider pinning the base image to its specific SHA256 digest. This aligns with general Docker best practices for ensuring reproducibility and mitigating risks associated with mutable tags, especially for production or agent images.

You can typically find the digest by running:

  1. docker pull python:3.13.5-slim
  2. docker inspect python:3.13.5-slim --format='{{index .RepoDigests 0}}' or docker images --digests python | grep 3.13.5-slim

Then update the FROM line to use the digest, for example:

FROM python:3.13.5-slim@sha256:actual_digest_value_here AS base

This ensures you are always using the exact same base image layer that Snyk has recommended and you've tested against.


# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1 \
Expand Down