Sidecar image ships pip; its vendored libraries show up as image vulnerabilities (e.g. setuptools CVE-2025-47273)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
調査の方向性
containers/Dockerfile.sidecarから始めて、/venvがどのように構築され、最終イメージにコピーされるかを調べてください。実行時要件のうちpipまたはwheelが必要なものを確認し、sidecarイメージをビルドしてスキャンし、pipに同梱されたライブラリが含まれていない一方で、sidecarが必要な依存関係とともに引き続き動作することを確認してください。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Go
- スター
- 204
- フォーク
- 86
- 平均マージ
- 1日 21時間
- マージ済み PR(30日)
- 40
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudnative-pg/plugin-barman-cloud のほかの issue
-
docs: troubleshooting does not cover "cannot proceed with the backup as the cluster has no backup section"対応中かも @fjvbn2003 が 10 日前に担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
cloudnative-pg/plugin-barman-cloud#1165 ·
メンテナーはふだん 1 日以内に返信
-
Wrong `ObjectStore` key logged when the backup object store can't be retrieved in the instance sidecar対応中かも @BoxBoxJason が 14 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cloudnative-pg/plugin-barman-cloud#1142 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cloudnative-pg/plugin-barman-cloud#1117 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
data.compression rejects zstd although barman-cloud-backup supports it対応中かも @dgsardina が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
cloudnative-pg/plugin-barman-cloud#1104 · リアクション 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Add RBAC aggregation labels to ObjectStore editor/viewer ClusterRoles対応中かも @stefanpeknik が 40 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
cloudnative-pg/plugin-barman-cloud#1102 ·
メンテナーはふだん 1 日以内に返信
cloudnative-pg/plugin-barman-cloud の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area/frontend/library-panels automated-triage type/bug type/ux
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug raised-by:verifier
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
medici-finance/assay#4554 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
microsoft/azure-linux-image-tools#954 ·
メンテナーはふだん 1 日以内に返信
-
help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信