Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Review unnecessary Python packaging tools in PostgreSQL image

未关闭
#524 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

@benispeti 已经在做这个了。

开始于 2026年10月11日。

  • #527 来自 @benispeti —— 未关闭

评估

难度
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, and wheel are 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

  1. Run syft sbom analysis on the ghcr.io/cloudnative-pg/postgresql:17.10-system-trixie container 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
  2. sbom report generation may take a few minutes, be patient
  3. Search for the mentioned packages in the sbom report
主要语言
HCL
星标
156
派生
67
平均合并
1 天 15 小时
30 天内合并 PR
15

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cloudnative-pg/postgres-containers 的其他 Issue

查看 cloudnative-pg/postgres-containers 的全部 Issue

相似的 Issue

更多 Databases Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。