Skip to content

chore: Distroless Debian 13 docker image (89 -> 10 CVEs)#93

Merged
OzBenSimhonTraceloop merged 8 commits into
mainfrom
obs/TLP-1672-trivy-cves
Jan 28, 2026
Merged

chore: Distroless Debian 13 docker image (89 -> 10 CVEs)#93
OzBenSimhonTraceloop merged 8 commits into
mainfrom
obs/TLP-1672-trivy-cves

Conversation

@OzBenSimhonTraceloop

@OzBenSimhonTraceloop OzBenSimhonTraceloop commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores

    • Updated container base images for a smaller, more secure runtime and streamlined build image.
    • Removed unnecessary runtime package installation and simplified runtime setup; explicit non-root startup entry retained and port/env behavior unchanged.
  • CI / Chores

    • CI display name updated to "Build Images and Deploy".
    • Expanded security scanning to run separate checks for the main app and migration image.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions

github-actions Bot commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

🔒 Container Vulnerability Scan (amd64)

Click to expand results

Report Summary

┌──────────────────────────────────────────────────────────────────┬────────┬─────────────────┬─────────┐
│                              Target                              │  Type  │ Vulnerabilities │ Secrets │
├──────────────────────────────────────────────────────────────────┼────────┼─────────────────┼─────────┤
│ hub:9e2f99772fb986fd5366ebe39ef17df21b7911cf-amd64 (debian 13.3) │ debian │       10        │    -    │
└──────────────────────────────────────────────────────────────────┴────────┴─────────────────┴─────────┘
Legend:
- '-': Not scanned
- '0': Clean (no security findings detected)


For OSS Maintainers: VEX Notice
--------------------------------
If you're an OSS maintainer and Trivy has detected vulnerabilities in your project that you believe are not actually exploitable, consider issuing a VEX (Vulnerability Exploitability eXchange) statement.
VEX allows you to communicate the actual status of vulnerabilities in your project, improving security transparency and reducing false positives for your users.
Learn more and start using VEX: https://trivy.dev/v0.65/docs/supply-chain/vex/repo#publishing-vex-documents

To disable this notice, set the TRIVY_DISABLE_VEX_NOTICE environment variable.


hub:9e2f99772fb986fd5366ebe39ef17df21b7911cf-amd64 (debian 13.3)
================================================================
Total: 10 (LOW: 7, MEDIUM: 2, HIGH: 1, CRITICAL: 0)

┌─────────┬──────────────────┬──────────┬──────────┬───────────────────┬───────────────┬──────────────────────────────────────────────────────────────┐
│ Library │  Vulnerability   │ Severity │  Status  │ Installed Version │ Fixed Version │                            Title                             │
├─────────┼──────────────────┼──────────┼──────────┼───────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libc6   │ CVE-2026-0861    │ HIGH     │ affected │ 2.41-12+deb13u1   │               │ glibc: Integer overflow in memalign leads to heap corruption │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2026-0861                    │
│         ├──────────────────┼──────────┤          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2025-15281   │ MEDIUM   │          │                   │               │ glibc: wordexp with WRDE_REUSE and WRDE_APPEND may return    │
│         │                  │          │          │                   │               │ uninitialized memory                                         │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2025-15281                   │
│         ├──────────────────┤          │          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2026-0915    │          │          │                   │               │ glibc: glibc: Information disclosure via zero-valued network │
│         │                  │          │          │                   │               │ query                                                        │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2026-0915                    │
│         ├──────────────────┼──────────┤          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2010-4756    │ LOW      │          │                   │               │ glibc: glob implementation can cause excessive CPU and       │
│         │                  │          │          │                   │               │ memory consumption due to...                                 │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2010-4756                    │
│         ├──────────────────┤          │          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2018-20796   │          │          │                   │               │ glibc: uncontrolled recursion in function                    │
│         │                  │          │          │                   │               │ check_dst_limits_calc_pos_1 in posix/regexec.c               │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2018-20796                   │
│         ├──────────────────┤          │          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2019-1010022 │          │          │                   │               │ glibc: stack guard protection bypass                         │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2019-1010022                 │
│         ├──────────────────┤          │          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2019-1010023 │          │          │                   │               │ glibc: running ldd on malicious ELF leads to code execution  │
│         │                  │          │          │                   │               │ because of...                                                │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2019-1010023                 │
│         ├──────────────────┤          │          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2019-1010024 │          │          │                   │               │ glibc: ASLR bypass using cache of thread stack and heap      │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2019-1010024                 │
│         ├──────────────────┤          │          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2019-1010025 │          │          │                   │               │ glibc: information disclosure of heap addresses of           │
│         │                  │          │          │                   │               │ pthread_created thread                                       │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2019-1010025                 │
│         ├──────────────────┤          │          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2019-9192    │          │          │                   │               │ glibc: uncontrolled recursion in function                    │
│         │                  │          │          │                   │               │ check_dst_limits_calc_pos_1 in posix/regexec.c               │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2019-9192                    │
└─────────┴──────────────────┴──────────┴──────────┴───────────────────┴───────────────┴──────────────────────────────────────────────────────────────┘

@github-actions

github-actions Bot commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

🔒 Container Vulnerability Scan (arm64)

Click to expand results

Report Summary

┌──────────────────────────────────────────────────────────────────┬────────┬─────────────────┬─────────┐
│                              Target                              │  Type  │ Vulnerabilities │ Secrets │
├──────────────────────────────────────────────────────────────────┼────────┼─────────────────┼─────────┤
│ hub:9e2f99772fb986fd5366ebe39ef17df21b7911cf-arm64 (debian 13.3) │ debian │       10        │    -    │
└──────────────────────────────────────────────────────────────────┴────────┴─────────────────┴─────────┘
Legend:
- '-': Not scanned
- '0': Clean (no security findings detected)


For OSS Maintainers: VEX Notice
--------------------------------
If you're an OSS maintainer and Trivy has detected vulnerabilities in your project that you believe are not actually exploitable, consider issuing a VEX (Vulnerability Exploitability eXchange) statement.
VEX allows you to communicate the actual status of vulnerabilities in your project, improving security transparency and reducing false positives for your users.
Learn more and start using VEX: https://trivy.dev/v0.65/docs/supply-chain/vex/repo#publishing-vex-documents

To disable this notice, set the TRIVY_DISABLE_VEX_NOTICE environment variable.


hub:9e2f99772fb986fd5366ebe39ef17df21b7911cf-arm64 (debian 13.3)
================================================================
Total: 10 (LOW: 7, MEDIUM: 2, HIGH: 1, CRITICAL: 0)

┌─────────┬──────────────────┬──────────┬──────────┬───────────────────┬───────────────┬──────────────────────────────────────────────────────────────┐
│ Library │  Vulnerability   │ Severity │  Status  │ Installed Version │ Fixed Version │                            Title                             │
├─────────┼──────────────────┼──────────┼──────────┼───────────────────┼───────────────┼──────────────────────────────────────────────────────────────┤
│ libc6   │ CVE-2026-0861    │ HIGH     │ affected │ 2.41-12+deb13u1   │               │ glibc: Integer overflow in memalign leads to heap corruption │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2026-0861                    │
│         ├──────────────────┼──────────┤          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2025-15281   │ MEDIUM   │          │                   │               │ glibc: wordexp with WRDE_REUSE and WRDE_APPEND may return    │
│         │                  │          │          │                   │               │ uninitialized memory                                         │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2025-15281                   │
│         ├──────────────────┤          │          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2026-0915    │          │          │                   │               │ glibc: glibc: Information disclosure via zero-valued network │
│         │                  │          │          │                   │               │ query                                                        │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2026-0915                    │
│         ├──────────────────┼──────────┤          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2010-4756    │ LOW      │          │                   │               │ glibc: glob implementation can cause excessive CPU and       │
│         │                  │          │          │                   │               │ memory consumption due to...                                 │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2010-4756                    │
│         ├──────────────────┤          │          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2018-20796   │          │          │                   │               │ glibc: uncontrolled recursion in function                    │
│         │                  │          │          │                   │               │ check_dst_limits_calc_pos_1 in posix/regexec.c               │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2018-20796                   │
│         ├──────────────────┤          │          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2019-1010022 │          │          │                   │               │ glibc: stack guard protection bypass                         │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2019-1010022                 │
│         ├──────────────────┤          │          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2019-1010023 │          │          │                   │               │ glibc: running ldd on malicious ELF leads to code execution  │
│         │                  │          │          │                   │               │ because of...                                                │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2019-1010023                 │
│         ├──────────────────┤          │          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2019-1010024 │          │          │                   │               │ glibc: ASLR bypass using cache of thread stack and heap      │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2019-1010024                 │
│         ├──────────────────┤          │          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2019-1010025 │          │          │                   │               │ glibc: information disclosure of heap addresses of           │
│         │                  │          │          │                   │               │ pthread_created thread                                       │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2019-1010025                 │
│         ├──────────────────┤          │          │                   ├───────────────┼──────────────────────────────────────────────────────────────┤
│         │ CVE-2019-9192    │          │          │                   │               │ glibc: uncontrolled recursion in function                    │
│         │                  │          │          │                   │               │ check_dst_limits_calc_pos_1 in posix/regexec.c               │
│         │                  │          │          │                   │               │ https://avd.aquasec.com/nvd/cve-2019-9192                    │
└─────────┴──────────────────┴──────────┴──────────┴───────────────────┴───────────────┴──────────────────────────────────────────────────────────────┘

@coderabbitai

coderabbitai Bot commented Jan 27, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Builder images switched from rust:1.88-bookworm to rust:1.88-trixie; runtime images switched to distroless gcr.io/distroless/cc-debian13:debug-nonroot and runtime apt installs/WORKDIR /etc removed; built binaries still copied into /usr/local/bin; ENTRYPOINT added. CI workflow display name updated and the security workflow now runs two Trivy jobs (hub and hub-migrations) using a reusable workflow.

Changes

Cohort / File(s) Summary
Main Dockerfile
Dockerfile
Builder base updated to rust:1.88-trixie; runtime base changed to gcr.io/distroless/cc-debian13:debug-nonroot; removed runtime apt-get of openssl/ca-certificates and WORKDIR /etc; copy of built binary to /usr/local/bin/hub retained; ENTRYPOINT ["/usr/local/bin/hub"], ENV PORT, and EXPOSE retained.
Migrations Dockerfile
Dockerfile.db-based-migrations
Builder base updated to rust:1.88-trixie; runtime switched to distroless gcr.io/distroless/cc-debian13:debug-nonroot; removed runtime apt installs; retains copying sqlx-cli from builder; copies migrations into image, sets working dir to /, and sets default command to run sqlx migrate run.
CI: Docker workflow
.github/workflows/docker.yml
Workflow display name changed from "Publish Docker Images" to "Build Images and Deploy"; no other logic or steps changed.
CI: Security workflow
.github/workflows/security.yml
Renames job trivytrivy-hub; adds new job trivy-migrations invoking the same reusable workflow with image_name: hub-migrations and dockerfile: Dockerfile.db-based-migrations; trivy-hub now passes dockerfile, docker_context, and platforms inputs; overall two Trivy jobs run in parallel.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hop through layers, light and spry,
Trixie builds beneath the sky.
Distroless dreams where apt once trod,
Binaries rest in /usr/local/bin—odd!
Migrations march, then off we fly.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: migrating to Distroless Debian 13 docker images with the security benefit of reducing CVEs from 89 to 10.
Linked Issues check ✅ Passed The pull request addresses the security concern from TLP-1672 by reducing CVEs through Distroless Debian 13 migration across multiple Dockerfiles.
Out of Scope Changes check ✅ Passed All changes (Dockerfile updates, workflow name change, and security job additions for migrations) are directly related to the CVE reduction objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@OzBenSimhonTraceloop OzBenSimhonTraceloop changed the title chore: debian Trixy over Bookworm chore: leaner and newer docker image Jan 27, 2026
@OzBenSimhonTraceloop OzBenSimhonTraceloop changed the title chore: leaner and newer docker image chore: leaner and newer docker image (from 89 to 10 CVEs) Jan 27, 2026
@OzBenSimhonTraceloop OzBenSimhonTraceloop changed the title chore: leaner and newer docker image (from 89 to 10 CVEs) chore: leaner debian 13 docker image (from 89 to 10 CVEs) Jan 27, 2026
@OzBenSimhonTraceloop OzBenSimhonTraceloop changed the title chore: leaner debian 13 docker image (from 89 to 10 CVEs) chore: Distroless Debian 13 docker image (89 -> 10 CVEs) Jan 27, 2026

@OzBenSimhonTraceloop OzBenSimhonTraceloop left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What We're missing using leaner image
Category Debian Trixie nonroot debug-nonroot
Shell ✅ bash, sh ❌ None ✅ /busybox/sh
Package Manager ✅ apt ❌ None ❌ None
Core Utils ✅ ls, cat, grep, find, cp, mv, rm ❌ None ✅ busybox versions
Network Tools ✅ curl, wget, ping, nslookup, nc ❌ None ✅ wget, ping, nslookup, nc
Process Tools ✅ ps, top, kill, htop ❌ None ✅ ps, kill (basic)
Text Editors ✅ vi, nano ❌ None ✅ vi (busybox)
Debugging ✅ strace, gdb ❌ None ❌ None
CA Certificates
Timezone Data ✅ Full ⚠️ UTC only ⚠️ UTC only
Locale Data ✅ Full ⚠️ Minimal ⚠️ Minimal
DNS Resolution
User/Group ✅ Many ✅ nonroot ✅ nonroot
env command ✅ /busybox/env
Image Size ~150MB ~25MB ~30MB
CVE Count ~66 ~10 ~10-12

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@Dockerfile`:
- Line 7: Change the base image used in the Dockerfile from the debug variant to
the nonroot production variant by replacing the FROM image reference
"gcr.io/distroless/cc-debian13:debug-nonroot" with the nonroot tag
"gcr.io/distroless/cc-debian13:nonroot" so the image no longer includes the
BusyBox debugging shell; update the single Dockerfile FROM instruction
accordingly and ensure any CI/build docs that reference the debug image are
updated to the nonroot variant.

Comment thread Dockerfile

@doronkopit5 doronkopit5 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have 2 docker files in this repo - also the db migrations one

@OzBenSimhonTraceloop
OzBenSimhonTraceloop merged commit 0efe7d7 into main Jan 28, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants