Skip to content

Commit 532ccf6

Browse files
authored
chore(cve): remove hubble cli binary bundled in image (#2641)
# Description Remove the bundled Hubble CLI from the Linux Retina agent image. Retina's `hubble-control-plane` command uses linked Cilium packages and does not execute the CLI, so the production Hubble API, Relay integration, metrics, and Unix socket behavior are unchanged. This change also removes the CLI-only download tools, Hubble build argument, `HUBBLE_SERVER` default, Make target, and scheduled Hubble update workflow. The agent image is approximately 71 MiB smaller. ## Vulnerability report Both images were built from commit `8f7374d6` for `linux/amd64` and scanned with Trivy 0.69.3 using: ```text trivy image --ignore-unfixed <image> ``` | Result | Before | After | Delta | | --- | ---: | ---: | ---: | | Fixable findings | 16 | 2 | -14 | | Unique advisories | 15 | 1 | -14 | | High findings | 6 | 0 | -6 | | Medium findings | 8 | 2 | -6 | | Unknown-severity findings | 2 | 0 | -2 | All 14 findings removed by this PR belonged to `usr/bin/hubble`: | Advisory | Severity | Package | Bundled version | Fixed version | | --- | --- | --- | --- | --- | | GHSA-gcjh-h69q-9w9g | Medium | `github.com/google/cel-go` | v0.26.1 | 0.29.0 | | CVE-2026-2303 | Medium | `go.mongodb.org/mongo-driver` | v1.17.6 | 1.17.7 | | CVE-2026-25681 | High | `golang.org/x/net` | v0.53.0 | 0.55.0 | | CVE-2026-27136 | High | `golang.org/x/net` | v0.53.0 | 0.55.0 | | CVE-2026-39821 | High | `golang.org/x/net` | v0.53.0 | 0.55.0 | | CVE-2026-25680 | Medium | `golang.org/x/net` | v0.53.0 | 0.55.0 | | CVE-2026-42502 | Medium | `golang.org/x/net` | v0.53.0 | 0.55.0 | | CVE-2026-42506 | Medium | `golang.org/x/net` | v0.53.0 | 0.55.0 | | CVE-2026-46600 | Unknown | `golang.org/x/net` | v0.53.0 | 0.56.0 | | CVE-2026-39824 | Unknown | `golang.org/x/sys` | v0.43.0 | 0.44.0 | | CVE-2026-56852 | High | `golang.org/x/text` | v0.36.0 | 0.39.0 | | GHSA-hrxh-6v49-42gf | High | `google.golang.org/grpc` | v1.79.3 | 1.82.1 | | CVE-2026-39822 | High | Go standard library | v1.26.4 | 1.25.12 / 1.26.5 | | CVE-2026-42505 | Medium | Go standard library | v1.26.4 | 1.25.12 / 1.26.5 | The remaining unique advisory is the pre-existing Medium `CVE-2026-53935` in `github.com/cilium/cilium` v1.19.3. Trivy reports it once for `retina/controller` and once for `retina/captureworkload`; it is unrelated to the removed Hubble CLI. ## Checklist - [ ] I have read the [contributing documentation](https://retina.sh/docs/Contributing/overview). - [ ] I signed and signed-off the commits (`git commit -S -s ...`). - [ ] I have correctly attributed the author(s) of the code. - [x] I have tested the changes locally. - [x] I have followed the project's style guidelines. - [x] I have updated the documentation, if necessary. - [x] I have added tests, if applicable. ## Testing completed - Ran the targeted controller, command, Hubble, monitor agent, and plugin manager Go tests. - Rendered the Hubble Helm chart and confirmed the agent still runs `/retina/controller hubble-control-plane`. - Built and loaded the Linux amd64 agent image. - Confirmed `/bin/hubble` is absent and `/retina/controller` still exposes the `hubble-control-plane` command. - Confirmed no stale bundled-CLI build references remain. - Ran Trivy before and after the change and recorded the results above. ## Additional notes This removes an undocumented in-pod troubleshooting executable. Operators who manually invoked `/bin/hubble` with `kubectl exec` should use a separately installed Hubble CLI through the documented Relay port-forward workflow. ## Checklist - [ ] I have read the [contributing documentation](https://retina.sh/docs/Contributing/overview). - [ ] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [ ] I have correctly attributed the author(s) of the code. - [ ] I have tested the changes locally. - [ ] I have followed the project's style guidelines. - [ ] I have updated the documentation, if necessary. - [ ] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed Please add any relevant screenshots or GIFs to showcase the changes made. ## Additional Notes Add any additional notes or context about the pull request here. --- Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more information on how to contribute to this project. Signed-off-by: Alex Castilio dos Santos <alexsantos@microsoft.com>
1 parent 392f306 commit 532ccf6

3 files changed

Lines changed: 1 addition & 111 deletions

File tree

.github/workflows/update-hubble.yaml

Lines changed: 0 additions & 65 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ PLATFORM ?= $(OS)/$(ARCH)
4141
PLATFORMS ?= linux/amd64 linux/arm64 windows/amd64
4242
OS_VERSION ?= ltsc2022
4343

44-
HUBBLE_VERSION ?= v1.19.4
45-
4644
CONTAINER_BUILDER ?= docker
4745
CONTAINER_RUNTIME ?= docker
4846
YEAR ?= 2022
@@ -233,7 +231,6 @@ container-docker: buildx # util target to build container images using docker bu
233231
--build-arg GOARCH=$$arch \
234232
--build-arg GOOS=$$os \
235233
--build-arg OS_VERSION=$(OS_VERSION) \
236-
--build-arg HUBBLE_VERSION=$(HUBBLE_VERSION) \
237234
--build-arg VERSION=$(VERSION) $(EXTRA_BUILD_ARGS) \
238235
--target=$(TARGET) \
239236
-t $(IMAGE_REGISTRY)/$(IMAGE):$(TAG) \
@@ -254,7 +251,6 @@ container-docker-windows: # util target to build Windows container images withou
254251
--build-arg GOARCH=$$arch \
255252
--build-arg GOOS=$$os \
256253
--build-arg OS_VERSION=$(OS_VERSION) \
257-
--build-arg HUBBLE_VERSION=$(HUBBLE_VERSION) \
258254
--build-arg VERSION=$(VERSION) \
259255
--build-arg REPO_PATH=$(REPO_PATH) \
260256
--build-arg BINARIES_PATH=$(BINARIES_PATH) \
@@ -646,25 +642,3 @@ run-perf-test:
646642

647643
run-e2e-test:
648644
go test -v ./test/e2e/ -timeout 1h -tags=e2e -count=1 -args -image-tag=${TAG} -image-registry=${IMAGE_REGISTRY} -image-namespace=${IMAGE_NAMESPACE}
649-
650-
.PHONY: update-hubble
651-
update-hubble:
652-
@echo "Checking for Hubble updates..."
653-
@latest_version=$$(curl -s https://api.github.com/repos/cilium/hubble/releases/latest | jq -r .tag_name); \
654-
echo "Latest Hubble version: $$latest_version"; \
655-
current_version=$$(grep -oP '(?<=ARG HUBBLE_VERSION=).*' controller/Dockerfile); \
656-
echo "Current Hubble version: $$current_version"; \
657-
if [ "$$latest_version" = "$$current_version" ]; then \
658-
echo "Hubble version is up to date. No update needed."; \
659-
else \
660-
echo "Updating Hubble version from $$current_version to $$latest_version"; \
661-
sed -i "s/^ARG HUBBLE_VERSION=.*/ARG HUBBLE_VERSION=$$latest_version/" controller/Dockerfile; \
662-
sed -i "s/^HUBBLE_VERSION ?=.*/HUBBLE_VERSION ?= $$latest_version/" Makefile; \
663-
echo ""; \
664-
echo "Updated Hubble version in controller/Dockerfile and Makefile."; \
665-
echo "Please create a branch and commit these changes:"; \
666-
echo " git checkout -b deps/update-hubble-to-$$latest_version"; \
667-
echo " git commit -am \"deps: bump Hubble version from $$current_version to $$latest_version\""; \
668-
echo " git push origin deps/update-hubble-to-$$latest_version"; \
669-
echo "Then create a pull request on GitHub."; \
670-
fi

controller/Dockerfile

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -101,29 +101,14 @@ RUN tdnf install -y \
101101
iptables \
102102
tcpdump \
103103
which \
104-
wget \
105-
gnupg2 \
106-
ca-certificates \
107-
tar
104+
ca-certificates
108105
RUN mkdir -p /tmp/bin
109106
RUN arr="clang tcpdump ip ss iptables-legacy iptables-legacy-save iptables-nft iptables-nft-save cp uname" ;\
110107
for i in $arr; do \
111108
cp $(which $i) /tmp/bin; \
112109
done
113110
RUN mkdir -p /tmp/init-bin
114111
RUN cp $(which bpftool) /tmp/init-bin
115-
# Download Hubble
116-
ARG GOARCH=amd64
117-
ENV HUBBLE_ARCH=${GOARCH}
118-
# ARG HUBBLE_VERSION may be modified via the update-hubble GitHub Action
119-
ARG HUBBLE_VERSION=v1.19.4
120-
ENV HUBBLE_VERSION=${HUBBLE_VERSION}
121-
RUN echo "Hubble version: $HUBBLE_VERSION" && \
122-
wget --no-check-certificate https://github.com/cilium/hubble/releases/download/$HUBBLE_VERSION/hubble-linux-${HUBBLE_ARCH}.tar.gz && \
123-
wget --no-check-certificate https://github.com/cilium/hubble/releases/download/$HUBBLE_VERSION/hubble-linux-${HUBBLE_ARCH}.tar.gz.sha256sum && \
124-
sha256sum --check hubble-linux-${HUBBLE_ARCH}.tar.gz.sha256sum && \
125-
tar xzvfC hubble-linux-${HUBBLE_ARCH}.tar.gz /usr/local && \
126-
rm hubble-linux-${HUBBLE_ARCH}.tar.gz && rm hubble-linux-${HUBBLE_ARCH}.tar.gz.sha256sum
127112

128113
# init final image
129114
FROM azurelinux-distroless AS init
@@ -145,8 +130,4 @@ COPY --from=tools /tmp/bin/ /bin
145130
COPY --from=controller-bin /go/bin/retina/controller /retina/controller
146131
COPY --from=controller-bin /go/src/github.com/microsoft/retina/pkg/plugin /go/src/github.com/microsoft/retina/pkg/plugin
147132
COPY --from=capture-bin /go/bin/retina/captureworkload /retina/captureworkload
148-
# Copy Hubble.
149-
COPY --from=tools /usr/local/hubble /bin/hubble
150-
# Set Hubble server.
151-
ENV HUBBLE_SERVER=unix:///var/run/cilium/hubble.sock
152133
ENTRYPOINT ["./retina/controller"]

0 commit comments

Comments
 (0)