Skip to content

fix(docker): distroless runtime for wifi-densepose:latest (#1140)#1145

Open
proffesor-for-testing wants to merge 1 commit into
ruvnet:mainfrom
proffesor-for-testing:fix/docker-distroless-runtime
Open

fix(docker): distroless runtime for wifi-densepose:latest (#1140)#1145
proffesor-for-testing wants to merge 1 commit into
ruvnet:mainfrom
proffesor-for-testing:fix/docker-distroless-runtime

Conversation

@proffesor-for-testing

Copy link
Copy Markdown
Contributor

Summary

Moves the ruvnet/wifi-densepose:latest runtime stage (docker/Dockerfile.rust) from debian:bookworm-slim to distroless gcr.io/distroless/cc-debian12:debug, shrinking the OS attack surface flagged by Docker Scout in #1140.

Closes #1140.

Background (analysis of #1140)

The report listed 37 base-image CVEs (1 Critical / 2 High / 4 Medium / 28 Low / 2 unspecified). All are real, but none is reachable in this image:

  • The runtime executes a single Rust binary — no Perl, Python, or compiler runs in the container.
  • The 1 Critical + 2 High are all perl, and 6 of the 8 perl CVEs (including both Highs — IO::Compress/IO::Uncompress/HTTP::Tiny) reference modules that aren't even installed in the slim base.
  • The Critical (CVE-2026-12087, Socket out-of-bounds read, AV:N) needs a running Perl program calling the affected function — there is none.
  • None has a fix in Debian 12, so re-pulling debian:12-slim would clear nothing.

The fix removes the packages at the source by switching to distroless, which ships only glibc + libgcc/libstdc++ + libssl + the CA bundle.

Changes

Verification (MEASURED — linux/arm64, Docker 29.5.3)

Check Result
docker build -f docker/Dockerfile.rust clean, 80.3 MB
Builder-stage UI/binary asset check passed
Busybox entrypoint runs #864 fail-closed logic default 0.0.0.0 + no token → exit 64
Rust binary boots in distroless (glibc + libssl3 resolve) no missing-shared-library errors
GET /ui/index.html, GET / 200
GET /api/v1/sensing/latest (CSI_SOURCE=simulated) live JSON

Package surface: runtime tracked dpkg set drops to 10 packagesbase-files, gcc-12-base, libc6, libgcc-s1, libgomp1, libssl3, libstdc++6, media-types, netbase, tzdata. perl/apt/tar/gnupg/pam/shadow/systemd/util-linux/coreutils are all absent.

Net against the reported 37: the 1 Critical + 2 High + all 4 Medium are eliminated, plus ~21 of the 28 Lows. Remaining residuals are the irreducible glibc/openssl/gcc-base baseline Lows present in any glibc-based image.

The base-image swap does not touch CSI ingestion, so on-hardware (ESP32) sensing behaviour is unchanged from the prior image.

🤖 Generated with claude-flow

Move the Dockerfile.rust runtime stage from debian:bookworm-slim to
distroless gcr.io/distroless/cc-debian12:debug to shrink the OS attack
surface flagged by Docker Scout (37 base-image CVEs in ruvnet#1140).

All 37 CVEs are real but unreachable — the container runs a single Rust
binary with no Perl/Python/compiler, the 1 Critical + 2 High are all in
perl modules not installed in the slim base, and none have a Debian 12
fix (so re-pulling slim clears nothing). Distroless cc-debian12 ships
only glibc + libgcc/libstdc++ + libssl + the CA bundle and drops perl,
apt, tar, gnupg, pam, shadow, systemd libs at the source.

- Use :debug variant: entrypoint is a /bin/sh script with real security
  logic (ruvnet#864 fail-closed auth + routing); invoke it via /busybox/sh.
- Move the ruvnet#520/ruvnet#514 UI-asset + binary regression check into the builder
  stage (the distroless runtime has no shell to RUN it in).

Not yet built/verified in this env — needs a real docker build of
docker/Dockerfile.rust + on-hardware (COM7) verification per the release
process before publishing.

Co-Authored-By: claude-flow <ruv@ruv.net>
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.

Found Security Issues

1 participant