Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Sidecar image ships pip; its vendored libraries show up as image vulnerabilities (e.g. setuptools CVE-2025-47273)

Ouverte Adaptée aux débutants
#1,187 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
78/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
docker, python
Domaine
devops, security

Piste de recherche

Commence par containers/Dockerfile.sidecar et examine comment /venv est créé et copié dans l’image finale. Vérifie quelles dépendances d’exécution nécessitent pip ou wheel, puis construis et analyse l’image sidecar pour confirmer que les bibliothèques fournies avec pip sont absentes, tandis que le sidecar fonctionne toujours avec ses dépendances requises.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

Summary

The sidecar image (plugin-barman-cloud-sidecar) ships pip (and wheel) inside /venv. Neither is used at runtime, but scanners report the libraries pip vendors as vulnerable packages of the image. Since v0.15.0 this includes a HIGH finding that did not show up with v0.14.0.

Details

containers/Dockerfile.sidecar (same on v0.15.1 and main):

RUN python3 -m venv /venv && \
    /venv/bin/pip install --upgrade pip wheel && \
    /venv/bin/pip install --no-cache-dir -r sidecar-requirements.txt
...
COPY --from=pythonbuilder /venv /venv

So the final distroless image contains the latest pip. pip 26.2.2 vendors setuptools==70.3.0 (only pkg_resources), msgpack==1.1.2, urllib3==2.7.0 and certifi, see src/pip/_vendor/vendor.txt.

Trivy (operator v0.30.1) on plugin-barman-cloud-sidecar:v0.15.1 reports, among others:

Package Installed Finding Fixed
setuptools 70.3.0 CVE-2025-47273 (HIGH) 78.1.1
msgpack 1.1.2 GHSA-6v7p-g79w-8964 (HIGH) 1.2.1
certifi 2026.6.17 and 2026.7.22 (two copies) GHSA-6q48-6c7w-9gw2 (CRITICAL) 2026.10.19

The pip maintainers consider the setuptools and msgpack findings not exploitable through pip (pypa/pip#14224, pypa/pip#14031). That is fine for pip itself, but every user of the sidecar still has to triage or suppress these findings, and they come back with every pip release that lags its vendored libraries.

My guess at why setuptools only appears from v0.15.0 on: #983 dropped setuptools from the sidecar requirements, so the only copy left is pip's vendored one. I have not verified this.

Proposal

Keep pip out of the runtime image, since nothing at runtime installs packages. For example:

RUN python3 -m venv /venv && \
    /venv/bin/pip install --upgrade pip wheel && \
    /venv/bin/pip install --no-cache-dir -r sidecar-requirements.txt && \
    /venv/bin/pip uninstall -y pip wheel

Alternatively, create the runtime venv with --without-pip and install into it with the builder's pip (pip --python /venv/bin/python install ...).

That removes all of pip's vendored copies from the image at once. It also removes one certifi copy, so the bundled CA store is the one from sidecar-requirements.txt only.

Environment

  • plugin-barman-cloud v0.15.1 (sidecar ghcr.io/cloudnative-pg/plugin-barman-cloud-sidecar:v0.15.1)
  • CloudNativePG on Kubernetes 1.34, scanned with trivy-operator v0.30.1
Langage dominant
Go
Étoiles
204
Forks
86
Merge moyen
1 j 21 h
PR mergées (30 j)
40

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de cloudnative-pg/plugin-barman-cloud

Toutes les issues de cloudnative-pg/plugin-barman-cloud

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.