Originally published at tothenoc.substack.com
Our image was clean. The package that failed came from the cloud's own repository.
Before a hardened image goes public on Google Cloud, Google runs its own validation on it. Part of that is a vulnerability scan of every package, including the Go standard library compiled inside binaries.
Two of our images failed it: AlmaLinux 10 and Rocky Linux 10.
The finding was not in anything we added. It was google_osconfig_agent, Google's own management agent, installed from Google's own repository. It was built with Go 1.25.5. The scanner wanted at least 1.25.13 (CVE-2026-39821).
First idea: wait for a new package. I checked the repositories. Stable still had the same build. Unstable and the next upstream tag were built with Go 1.26.3, still under the line (the fix there is 1.26.6). Waiting would not fix it, not in days.
Second idea: remove the agent. No. Without it, patch management and inventory from the console stop working for the customer. A hardened image with half of the cloud features missing is not what somebody pays for.
What we did: the agent is open source. In our build, after hardening, we compile it from the upstream tag with a current Go (1.27.4, checksum pinned), with the same flags as Google's own packaging, and replace only that one binary. Toolchain and source are removed after. A note in /usr/share/doc on the image says what was replaced and from which commit.
Then a gate. Before an image is accepted, every Go binary on it is checked for the Go version it was built with. Under the line, the build fails. It did not stay a one-off: the same gate later stopped builds on AWS, on agents from the base image.
The boot test also checks that the agent runs and reports our rebuilt version. Both images passed validation and are public now.
The point is not who wrote the binary. Anything you install from a vendor repository is still your image, and the scanner does not care where the package came from.
If you run Go binaries you did not build, on a machine with Go installed one command tells you what compiled them:
go version /usr/bin/<binary> The images, per distribution:
- AlmaLinux 9: AWS | Google Cloud
- AlmaLinux 10: AWS | Google Cloud
- Rocky Linux 9: AWS | Google Cloud
- Rocky Linux 10: AWS | Google Cloud
- Debian 13: AWS | Google Cloud
-- Alexandru
