Review unnecessary Python packaging tools in PostgreSQL image
维护者通常 2 天内回复
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- docker, postgresql, python
调研方向
Start by locating the image build definitions for ghcr.io/cloudnative-pg/postgresql:17.10-system-trixie and identify how Python packages are installed. Check supported backup, restore, and operational workflows for uses of pip, setuptools, and wheel; the issue does not name specific files or tests. Done means removing tools that are not required, or documenting why they remain, while preserving those workflows and verifying the resulting image's SBOM.
由索引模型根据 Issue 内容生成。
描述
Description
Our SBOM scan identified Python packaging tools in the following PostgreSQL image:
ghcr.io/cloudnative-pg/postgresql:17.10-system-trixie
Reported Packages
Package Version(s)
pip 25.1.1
python3-pip 25.1.1+dfsg-1
setuptools 78.1.1
python3-setuptools 78.1.1-0.1
wheel 0.45.1, 0.46.1
python3-wheel 0.46.1-2
Concern
Package installation and build tools are generally unnecessary in a production runtime image once dependencies have been installed. Where unused, retaining them increases image size and the number of components requiring vulnerability monitoring.
Multiple reported wheel versions also warrant checking whether they correspond to separate installations or bundled metadata.
Expected Behavior
The runtime image should retain only Python components needed for supported PostgreSQL, backup, and operational workflows. Build-only tooling should remain outside the final image where practical.
Requested Investigation
- Confirm whether
pip,setuptools, andwheelare required by supported runtime workflows. - Remove unnecessary tooling from the final image, or document why they are retained. Removing unused packages would reduce the image’s attack surface and eliminate any vulnerabilities attributable to those packages, while reducing future vulnerability exposure and remediation effort.
- Verify that any changes preserve backup, restore, and other supported operational functionality.
To Reproduce
- Run syft sbom analysis on the
ghcr.io/cloudnative-pg/postgresql:17.10-system-trixiecontainer image
docker run --rm -v //var/run/docker.sock:/var/run/docker.sock anchore/syft:latest docker:ghcr.io/cloudnative-pg/postgresql:17.10-system-trixie --scope all-layers | Out-File -FilePath syft-sbom-postgresql-17.10-system-trixie.txt -Encoding utf8 -Force - sbom report generation may take a few minutes, be patient
- Search for the mentioned packages in the sbom report
- 主要语言
- HCL
- 星标
- 156
- 派生
- 67
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 15
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudnative-pg/postgres-containers 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 72/100
cloudnative-pg/postgres-containers#513 ·
维护者通常 2 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 48/100
cloudnative-pg/postgres-containers#484 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 20/100
cloudnative-pg/postgres-containers#147 ·
维护者通常 2 天内回复
查看 cloudnative-pg/postgres-containers 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
mariadb-operator/mariadb-operator#1962 ·
维护者通常 1 天内回复
-
bug difficulty: easy
难度 2/5 1-3 小时 新手友好度 70/100
MetroLogic/fluxapay_contract#1022 ·
维护者通常 1 天内回复
-
bug jdbc-v2
难度 2/5 1-3 小时 新手友好度 70/100
ClickHouse/clickhouse-java#3214 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
database high-priority security
难度 2/5 1-3 小时 新手友好度 72/100
bridgelet-org/bridgelet-sdk#879 · 1 条评论 ·
维护者通常 1 天内回复