Review unnecessary Python packaging tools in PostgreSQL image
Maintainer antworten meist innerhalb von 2 Tagen
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- docker, postgresql, python
- Bereich
- databases, infrastructure
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- HCL
- Sterne
- 156
- Forks
- 67
- Ø Merge
- 1 T. 15 Std.
- Gemergte PRs (30 T.)
- 15
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus cloudnative-pg/postgres-containers
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
cloudnative-pg/postgres-containers#513 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
cloudnative-pg/postgres-containers#484 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Dependency DashboardOffen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 20/100
cloudnative-pg/postgres-containers#147 ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in cloudnative-pg/postgres-containers
Ähnliche Issues
-
Deduplicate normalized_f64_bits (hash_table.rs and bloom_filter.rs)Evtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
tursodatabase/turso#10002 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
mariadb-operator/mariadb-operator#1962 ·
Maintainer antworten meist innerhalb von 1 Tag
-
status: waiting-for-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100