You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
deps: pin go base image to the 1.26 minor tag (#2671)
# Description
A patch tag gives dependabot two ways to update the golang image: move
the tag to a newer patch, or refresh the digest of the current tag. When
the newer patch sits inside the cooldown window, dependabot takes the
second path. #2668 did that. It refreshed the `1.26.5-2` digest and left
the build on Go 1.26.5, which 8 stdlib advisories affect.
The `1.26` tag removes the second path. The tag never changes, so a
digest refresh is the patch upgrade, and dependabot cannot report
progress without delivering the fix. The digest still pins the exact
image, so builds stay reproducible.
This covers 13 `FROM` lines in 11 Dockerfiles, across all three tag
variants: `-azurelinux3.0`, bare, and `-windowsservercore-ltsc2022`.
`Azure/azure-container-networking` pins the same way.
**Workflow.** The govulncheck job read the patch version out of the tag,
which a minor tag does not carry. It now reads `GOLANG_VERSION` from the
image config, so the scan still matches the toolchain the images build
with. It also fails when that value is empty, rather than letting
`setup-go` install a default.
**Comments.** The `skopeo inspect` line above each `FROM` named
`1.26.3`, and the comment on the agent stage named a distroless digest
that an earlier bump replaced. Both now match the pins they document.
The golang comments name the floating tag, so they cannot drift again.
## Related Issue
N/A.
## Checklist
- [x] I have read the [contributing
documentation](https://retina.sh/docs/Contributing/overview).
- [x] 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.
- [x] 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.
- [ ] I have updated the documentation, if necessary.
- [ ] I have added tests, if applicable.
## Screenshots (if applicable) or Testing Completed
The pinned digest provides Go 1.26.7. govulncheck run inside that image
reports no standard library findings, against 8 on Go 1.26.5:
```
$ go version
go version go1.26.7 linux/amd64
$ govulncheck ./...
Vulnerability #1: GO-2026-6238
Integer overflow in BTF parsing in github.com/cilium/ebpf
Found in: github.com/cilium/ebpf@v0.21.0
Fixed in: github.com/cilium/ebpf@v0.22.0
Your code is affected by 1 vulnerability from 1 module.
```
The reworked workflow step, run against `controller/Dockerfile`,
reports:
```
builder image mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0@sha256:3960d75b... provides Go 1.26.7
version=1.26.7
```
The remaining reachable finding is `github.com/cilium/ebpf`, which #2493
fixes. The govulncheck job stays red until that lands.
## Additional Notes
N/A.
Signed-off-by: Quang Nguyen <28567936+nddq@users.noreply.github.com>
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.26.5-2-azurelinux3.0@sha256:aa11e321bcccb838417de6cb321513616f334a92f9299195060175f1486a85ea AS builder
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0@sha256:3960d75b1ddd28b4e5cffaa13f3ec0c95df95a3be84f67994ace5dc18110f563 AS builder
3
3
4
4
# systemcrypto without cgo — required for arm64 cross-compile from amd64 host.
5
5
# Becomes redundant with Go 1.27+ (auto-selected when CGO_ENABLED=0).
# Pinned to $BUILDPLATFORM so the Go builds cross-compile natively from the
5
5
# host arch (fast). The eBPF .o files, which cannot be cleanly cross-compiled
6
6
# by bpf2go, are produced in the separate `bpf-gen` stage below (which runs
7
7
# at $TARGETPLATFORM — native on same-arch, emulated under QEMU otherwise).
8
-
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.26.5-2-azurelinux3.0@sha256:aa11e321bcccb838417de6cb321513616f334a92f9299195060175f1486a85ea AS golang
8
+
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0@sha256:3960d75b1ddd28b4e5cffaa13f3ec0c95df95a3be84f67994ace5dc18110f563 AS golang
FROM mcr.microsoft.com/azurelinux/base/core:3.0.20260809@sha256:8bb51342bd5eba915990ab608f91060d502bb7891a2d3d909e0419b932533029 AS azurelinux-core
@@ -20,7 +20,7 @@ FROM mcr.microsoft.com/azurelinux/distroless/minimal:3.0.20260809@sha256:4435f90
20
20
# .o files via bpf2go/clang — those require native target-arch execution and
21
21
# cannot be cross-compiled from an amd64 host cleanly. Isolating this work in a
22
22
# small dedicated stage keeps the rest of the build fast at $BUILDPLATFORM.
23
-
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.26.5-2-azurelinux3.0@sha256:aa11e321bcccb838417de6cb321513616f334a92f9299195060175f1486a85ea AS bpf-gen
23
+
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0@sha256:3960d75b1ddd28b4e5cffaa13f3ec0c95df95a3be84f67994ace5dc18110f563 AS bpf-gen
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.26.5-2-azurelinux3.0@sha256:aa11e321bcccb838417de6cb321513616f334a92f9299195060175f1486a85ea
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0@sha256:3960d75b1ddd28b4e5cffaa13f3ec0c95df95a3be84f67994ace5dc18110f563
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.26.5-2-azurelinux3.0@sha256:aa11e321bcccb838417de6cb321513616f334a92f9299195060175f1486a85ea
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0@sha256:3960d75b1ddd28b4e5cffaa13f3ec0c95df95a3be84f67994ace5dc18110f563
Copy file name to clipboardExpand all lines: controller/Dockerfile.windows-cgo
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
-
# skopeo inspect docker://mcr.microsoft.com/oss/go/microsoft/golang:1.26.3-windowsservercore-ltsc2022 --override-os windows --format "{{.Name}}@{{.Digest}}"
2
-
FROM --platform=windows/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.26.5-2-windowsservercore-ltsc2022@sha256:80b2da10627c33be071bd3e73a870ce528e47e6c7ffe20aa46303352d91f723c AS cgo
1
+
# skopeo inspect docker://mcr.microsoft.com/oss/go/microsoft/golang:1.26-windowsservercore-ltsc2022 --override-os windows --format "{{.Name}}@{{.Digest}}"
2
+
FROM --platform=windows/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.26-windowsservercore-ltsc2022@sha256:6b24db624331e4783ba81a171868de076be1fc537fd5e29b5d9499850647caa3 AS cgo
Copy file name to clipboardExpand all lines: controller/Dockerfile.windows-native
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,8 @@
3
3
# buildx targets, and this one requires legacy build.
4
4
# Maybe one day: https://github.com/moby/buildkit/issues/616
5
5
ARG BUILDER_IMAGE
6
-
# skopeo inspect docker://mcr.microsoft.com/oss/go/microsoft/golang:1.26.3-windowsservercore-ltsc2022 --override-os windows --format "{{.Name}}@{{.Digest}}"
7
-
FROM --platform=windows/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.26.5-2-windowsservercore-ltsc2022@sha256:80b2da10627c33be071bd3e73a870ce528e47e6c7ffe20aa46303352d91f723c AS builder
6
+
# skopeo inspect docker://mcr.microsoft.com/oss/go/microsoft/golang:1.26-windowsservercore-ltsc2022 --override-os windows --format "{{.Name}}@{{.Digest}}"
7
+
FROM --platform=windows/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.26-windowsservercore-ltsc2022@sha256:6b24db624331e4783ba81a171868de076be1fc537fd5e29b5d9499850647caa3 AS builder
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.26.5-2@sha256:ea712a1aaf80306c19ff842ba0bfcb9ad360afd8143e70044e0d0bd6d6899887 AS windows-builder
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.26@sha256:e72f02c6b8e974e3506e2cb50059a19ad5a7e564523ccda2747d31aabdcdd6e7 AS windows-builder
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.26.5-2-azurelinux3.0@sha256:aa11e321bcccb838417de6cb321513616f334a92f9299195060175f1486a85ea AS builder
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang:1.26-azurelinux3.0@sha256:3960d75b1ddd28b4e5cffaa13f3ec0c95df95a3be84f67994ace5dc18110f563 AS builder
3
3
4
4
# systemcrypto without cgo — required for arm64 cross-compile from amd64 host.
5
5
# Becomes redundant with Go 1.27+ (auto-selected when CGO_ENABLED=0).
0 commit comments