Review unnecessary Python packaging tools in PostgreSQL image
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- docker, postgresql, python
- Ambito
- databases, infrastructure
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- HCL
- Stelle
- 156
- Fork
- 67
- Merge medio
- 1g 15h
- PR unite (30g)
- 16
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudnative-pg/postgres-containers
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
cloudnative-pg/postgres-containers#513 ·
I maintainer di solito rispondono entro 2 giorni
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
cloudnative-pg/postgres-containers#484 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Dependency DashboardAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 20/100
cloudnative-pg/postgres-containers#147 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di cloudnative-pg/postgres-containers
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ClickHouse/clickhouse-go#2066 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
peasant-labs/village#293 ·
I maintainer di solito rispondono entro 1 giorno
-
RBatch fails with IllegalArgumentException: Self-suppression not permitted when all commands fail with the same exceptionForse già presa @yngyu l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 4 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
crate/sqlalchemy-cratedb#325 ·
I maintainer di solito rispondono entro 6 giorni