fix(docker): distroless runtime for wifi-densepose:latest (#1140)#1145
Open
proffesor-for-testing wants to merge 1 commit into
Open
fix(docker): distroless runtime for wifi-densepose:latest (#1140)#1145proffesor-for-testing wants to merge 1 commit into
proffesor-for-testing wants to merge 1 commit into
Conversation
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>
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
Moves the
ruvnet/wifi-densepose:latestruntime stage (docker/Dockerfile.rust) fromdebian:bookworm-slimto distrolessgcr.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:
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.CVE-2026-12087, Socket out-of-bounds read, AV:N) needs a running Perl program calling the affected function — there is none.debian:12-slimwould 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
docker/Dockerfile.rust: runtime base →gcr.io/distroless/cc-debian12:debug.:debugvariant chosen because the entrypoint is a/bin/shscript carrying real security logic (Docker default exposes unauthenticated sensing API and /ws/sensing stream #864 fail-closed auth +cog-ha-matter/homecorerouting); it bundles a static busybox shell at/busybox/sh, through which the entrypoint is now invoked explicitly.RUNit in).CHANGELOG.md: entry under[Unreleased] > Security.Verification (MEASURED — linux/arm64, Docker 29.5.3)
docker build -f docker/Dockerfile.rust0.0.0.0+ no token →exit 64GET /ui/index.html,GET /GET /api/v1/sensing/latest(CSI_SOURCE=simulated)Package surface: runtime tracked dpkg set drops to 10 packages —
base-files, gcc-12-base, libc6, libgcc-s1, libgomp1, libssl3, libstdc++6, media-types, netbase, tzdata.perl/apt/tar/gnupg/pam/shadow/systemd/util-linux/coreutilsare 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