Skip to content

Commit b3c810f

Browse files
authored
Upgrade postgres to latest minor release to address vulnerabilities (#2235)
Summary: Upgrade postgres to latest minor release to address vulnerabilities This PR replaces the upstream `postgres:14-alpine` image with a custom build from the official Docker Library PostgreSQL repository. The upstream hasn't published updated images for ~1 month, during which a high vulnerability was discovered in the latest `postgres:14-alpine` image. We've temporarily pushed a patched version to our ghcr.io repository (ghcr.io/pixie-io/postgres:14-alpine-pl1) until the official upstream images are updated. Relevant Issues: N/A Type of change: /kind dependencies Test Plan: Verified `trivy image` scan is clean for this rebuild unlike the latest `postgres:14-alpine` image ``` $ trivy image ghcr.io/pixie-io/postgres:14-alpine-pl1@sha256:237c5fcf79b230979e12fe02f46e0ad29565b4ecb7cb15047197cbb9a6549e8d ghcr.io/pixie-io/postgres:14-alpine-pl1@sha256:237c5fcf79b230979e12fe02f46e0ad29565b4ecb7cb15047197cbb9a6549e8d (alpine 3.22.0) Total: 0 (UNKNOWN: 0, LOW: 0, MEDIUM: 0, HIGH: 0, CRITICAL: 0) $ trivy image postgres:14-alpine@sha256:5a8881bdd1afaaa4c95198dfb0a726340edca70b9f4893006bfa69d4bac30e22 postgres:14-alpine@sha256:5a8881bdd1afaaa4c95198dfb0a726340edca70b9f4893006bfa69d4bac30e22 (alpine 3.22.0) Total: 4 (UNKNOWN: 2, LOW: 0, MEDIUM: 0, HIGH: 2, CRITICAL: 0) ``` Signed-off-by: Dom Del Nano <[email protected]>
1 parent 6dc9a72 commit b3c810f

File tree

7 files changed

+28
-7
lines changed

7 files changed

+28
-7
lines changed

k8s/cloud/dev/plugin_db_updater_job.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ spec:
1515
spec:
1616
initContainers:
1717
- name: postgres-wait
18-
image: postgres:14-alpine@sha256:446abaf8831c54f57212c0ae52f5df84e69eeb2767e2376d07bed9c9742b1243
18+
# TODO(ddelnano): This image was rebuilt from https://github.com/docker-library/postgres 14-alpine
19+
# to remediate a critical vulnerability. Switch back to upstream once fixed.
20+
# yamllint disable-line rule:line-length
21+
image: ghcr.io/pixie-io/postgres:14-alpine-pl1@sha256:237c5fcf79b230979e12fe02f46e0ad29565b4ecb7cb15047197cbb9a6549e8d
1922
command: ['sh', '-c',
2023
'until pg_isready -h ${PL_POSTGRES_HOSTNAME} -p ${PL_POSTGRES_PORT}; do
2124
echo "waiting for postgres";

k8s/cloud/public/base/plugin_db_updater_job.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ spec:
1515
spec:
1616
initContainers:
1717
- name: postgres-wait
18-
image: postgres:14-alpine@sha256:446abaf8831c54f57212c0ae52f5df84e69eeb2767e2376d07bed9c9742b1243
18+
# TODO(ddelnano): This image was rebuilt from https://github.com/docker-library/postgres 14-alpine
19+
# to remediate a critical vulnerability. Switch back to upstream once fixed.
20+
# yamllint disable-line rule:line-length
21+
image: ghcr.io/pixie-io/postgres:14-alpine-pl1@sha256:237c5fcf79b230979e12fe02f46e0ad29565b4ecb7cb15047197cbb9a6549e8d
1922
command: ['sh', '-c',
2023
'until pg_isready -h ${PL_POSTGRES_HOSTNAME} -p ${PL_POSTGRES_PORT}; do
2124
echo "waiting for postgres";

k8s/cloud_deps/dev/postgres/postgres_deployment.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ spec:
1414
spec:
1515
containers:
1616
- name: postgres
17-
image: postgres:14-alpine@sha256:446abaf8831c54f57212c0ae52f5df84e69eeb2767e2376d07bed9c9742b1243
17+
# TODO(ddelnano): This image was rebuilt from https://github.com/docker-library/postgres 14-alpine
18+
# to remediate a critical vulnerability. Switch back to upstream once fixed.
19+
# yamllint disable-line rule:line-length
20+
image: ghcr.io/pixie-io/postgres:14-alpine-pl1@sha256:237c5fcf79b230979e12fe02f46e0ad29565b4ecb7cb15047197cbb9a6549e8d
1821
ports:
1922
- containerPort: 5432
2023
env:

k8s/cloud_deps/public/postgres/postgres_deployment.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ spec:
1414
spec:
1515
containers:
1616
- name: postgres
17-
image: postgres:14-alpine@sha256:446abaf8831c54f57212c0ae52f5df84e69eeb2767e2376d07bed9c9742b1243
17+
# TODO(ddelnano): This image was rebuilt from https://github.com/docker-library/postgres 14-alpine
18+
# to remediate a critical vulnerability. Switch back to upstream once fixed.
19+
# yamllint disable-line rule:line-length
20+
image: ghcr.io/pixie-io/postgres:14-alpine-pl1@sha256:237c5fcf79b230979e12fe02f46e0ad29565b4ecb7cb15047197cbb9a6549e8d
1821
ports:
1922
- containerPort: 5432
2023
env:

k8s/clusters/prod/db_reader.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ spec:
1414
name: db-reader
1515
spec:
1616
containers:
17-
- image: postgres:14-alpine@sha256:446abaf8831c54f57212c0ae52f5df84e69eeb2767e2376d07bed9c9742b1243
17+
# TODO(ddelnano): This image was rebuilt from https://github.com/docker-library/postgres 14-alpine
18+
# to remediate a critical vulnerability. Switch back to upstream once fixed.
19+
# yamllint disable-line rule:line-length
20+
- image: ghcr.io/pixie-io/postgres:14-alpine-pl1@sha256:237c5fcf79b230979e12fe02f46e0ad29565b4ecb7cb15047197cbb9a6549e8d
1821
imagePullPolicy: IfNotPresent
1922
name: psql
2023
command: ["bash"]

k8s/clusters/staging/db_reader.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ spec:
1414
name: db-reader
1515
spec:
1616
containers:
17-
- image: postgres:14-alpine@sha256:446abaf8831c54f57212c0ae52f5df84e69eeb2767e2376d07bed9c9742b1243
17+
# TODO(ddelnano): This image was rebuilt from https://github.com/docker-library/postgres 14-alpine
18+
# to remediate a critical vulnerability. Switch back to upstream once fixed.
19+
# yamllint disable-line rule:line-length
20+
- image: ghcr.io/pixie-io/postgres:14-alpine-pl1@sha256:237c5fcf79b230979e12fe02f46e0ad29565b4ecb7cb15047197cbb9a6549e8d
1821
imagePullPolicy: IfNotPresent
1922
name: psql
2023
command: ["bash"]

k8s/clusters/testing/db_reader.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ spec:
1414
name: db-reader
1515
spec:
1616
containers:
17-
- image: postgres:14-alpine@sha256:446abaf8831c54f57212c0ae52f5df84e69eeb2767e2376d07bed9c9742b1243
17+
# TODO(ddelnano): This image was rebuilt from https://github.com/docker-library/postgres 14-alpine
18+
# to remediate a critical vulnerability. Switch back to upstream once fixed.
19+
# yamllint disable-line rule:line-length
20+
- image: ghcr.io/pixie-io/postgres:14-alpine-pl1@sha256:237c5fcf79b230979e12fe02f46e0ad29565b4ecb7cb15047197cbb9a6549e8d
1821
imagePullPolicy: IfNotPresent
1922
name: psql
2023
command: ["bash"]

0 commit comments

Comments
 (0)