Switch base image to distroless python3-debian13 to eliminate CVE surface#2
Merged
Merged
Conversation
…face Replaces the python:3.12-slim runtime base with gcr.io/distroless/python3-debian13. The previous base shipped openssl/glibc userland binaries flagged by DSA-6113-1 (11 CVEs incl. CVSS 8.1 stack buffer overflow in CMS AuthEnvelopedData parsing) and glibc 2.41-12 fixes pending in 2.41-12+deb13u2. Distroless ships only the shared libs Python needs, no shell, no package manager. Builder stage bumped to python:3.13-slim to match the runtime Python; pydantic bumped to >=2.11.7 for Python 3.13 wheel availability. Final image's CMD relies on the distroless ENTRYPOINT being python3. Adds config/test-definitions.yaml as a runnable example and .gitignore covering *.env for local credential files. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
moshemorad
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
python:3.12-slimruntime base withgcr.io/distroless/python3-debian13to eliminate the openssl + glibc CVE surface flagged by image scanners (DSA-6113-1: 11 openssl CVEs including a CVSS 8.1 stack buffer overflow in CMS AuthEnvelopedData parsing; pending glibc2.41-12+deb13u2fixes).python:3.13-slimto match the distroless Python 3.13 runtime;pydanticbumped to>=2.11.7for Python 3.13 wheel availability.config/test-definitions.yamlas a runnable example RBAC config and a.gitignorecovering*.envso local credential files don't get committed.Why distroless
openssluserland binary, no package manager → far smaller scanner-tracked package set.zstandard22 MB,cryptography15 MB,pygments/pyiceberg13 MB transitive fromsupabase).Notable behavior changes
CMDis now["-u", "/app/builder/main.py"]— the distroless ENTRYPOINT ispython3, so this composes topython3 -u /app/builder/main.py.PYTHONPATH=/app:/venv/lib/python3.13/site-packagesbecause the runtime image has nopipand novenv/bin/pythonactivator pointing at a valid interpreter.kubectl exec ... shinto the running pod — distroless has no shell. Usegcr.io/distroless/python3-debian13:debugas a temporary swap when debugging, or use ephemeral debug containers.Test plan
End-to-end smoke test executed against
https://test.remediate.dev/db:Output:
python:3.13-slimbuilder stagepydantic,supabase,httpx[http2],regex,PyYAML) import on Python 3.13 in the distroless runtimelogging.basicConfig()output is captured by container stdio (Kubernetes-compatible)STORE_USER/STORE_PASSWORDsucceedsPermissionScopes+PermissionGroupssucceeds (delete-then-upsert flow)6c2cbf41-c7b5-48ab-9777-76d320b985d4matchconfig/test-definitions.yamlbuild_on_apple_m1.shto confirm multi-arch (linux/arm64,linux/amd64) build still succeedsNotes for reviewers
gcr.io/distroless/python3-debian13@sha256:...) before merge for reproducibility — left on the floating tag for now to keep absorbing security rebuilds.🤖 Generated with Claude Code