[DF-1280] Use python:3.10-slim as Docker base image #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
(copied from WebOfTrust#83)
Presently the vLEI project depends on Docker image python:3.10.4-buster, and consequently has 24 critical vulnerabilities and 127 high vulnerabilities, per the Snyk software security scanner. I seek to update the vLEI project to use a more recent image with fewer vulnerabilities: python:3.10-slim
Why use image python:3.10-slim?
-- https://hub.docker.com/layers/library/python/3.10/images/sha256-4f7ca582d310c40d430ab6a17c46a0b360aee5987e0ef5aa155eeabc9ffa8393?context=explore
-- https://hub.docker.com/layers/library/python/3.10-slim/images/sha256-9a97ede5d731252b42541a5d3ec60f6d4cd03747ca75315adc784ed864651c0e?context=repo&tab=vulnerabilities
-- The 3.10-slim variant presently depends on debian:bookworm-slim, which removes man pages and a few other niceties.
Packages
ca-certificates already present in newer Debian. git is not present, so need to install.
Testing
I built the image and ran
pytest
in the image, per project instructions.I retested the new image for vulnerabilities using Snyk CLI. After this change we now have 1 critical vulnerability introduced by compression library zlib1g. See details below.