From c17d5ea930f060f7fe08ac2617dffed2ab35341f Mon Sep 17 00:00:00 2001 From: Jacques I Massa Date: Thu, 30 Jan 2025 12:04:46 -0500 Subject: [PATCH] fix(version-upgrade): Update go std lib from v1.23.4 -> 1.23.5 (#1289) # Description Please provide a brief description of the changes made in this pull request. Upgrade go stdlib version to fix vulnerabilities. ## Related Issue If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request. ## Checklist - [x] I have read the [contributing documentation](https://retina.sh/docs/contributing). - [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. - [x] I have updated the documentation, if necessary. - [x] I have added tests, if applicable. ## Screenshots (if applicable) or Testing Completed CVE no longer present, only from hubble. ![image](https://github.com/user-attachments/assets/74117803-5180-421d-9a7a-6ea1c215804e) 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. --- cli/Dockerfile | 4 ++-- controller/Dockerfile | 4 ++-- controller/Dockerfile.gogen | 4 ++-- controller/Dockerfile.proto | 4 ++-- controller/Dockerfile.windows-2022 | 4 ++-- controller/Dockerfile.windows-cgo | 4 ++-- controller/Dockerfile.windows-native | 4 ++-- operator/Dockerfile | 4 ++-- operator/Dockerfile.windows-2019 | 4 ++-- operator/Dockerfile.windows-2022 | 4 ++-- test/image/Dockerfile | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/cli/Dockerfile b/cli/Dockerfile index bba2d3b872..12812e608c 100644 --- a/cli/Dockerfile +++ b/cli/Dockerfile @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.23.4-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:88225e171f29fe5f1f6ffca8eb659535b19b253354e43e1f4fc8a9bc67615ca1 AS builder +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.5-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:ef39e430a97a61bec3395adb673a7c5611d2212f14abe40da21cbfd11a9d6e9d AS builder ARG VERSION diff --git a/controller/Dockerfile b/controller/Dockerfile index 6b7d78041f..03489b0216 100644 --- a/controller/Dockerfile +++ b/controller/Dockerfile @@ -2,8 +2,8 @@ ARG OS_VERSION # pinned base images -# mcr.microsoft.com/oss/go/microsoft/golang:1.23.4-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:88225e171f29fe5f1f6ffca8eb659535b19b253354e43e1f4fc8a9bc67615ca1 AS golang +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.5-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:ef39e430a97a61bec3395adb673a7c5611d2212f14abe40da21cbfd11a9d6e9d AS golang # mcr.microsoft.com/cbl-mariner/base/core:2.0 FROM --platform=$TARGETPLATFORM mcr.microsoft.com/cbl-mariner/base/core@sha256:77651116f2e83cf50fddd8a0316945499f8ce6521ff8e94e67539180d1e5975a AS mariner-core diff --git a/controller/Dockerfile.gogen b/controller/Dockerfile.gogen index 9455b7b9be..75505c95f7 100644 --- a/controller/Dockerfile.gogen +++ b/controller/Dockerfile.gogen @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.23.4-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:88225e171f29fe5f1f6ffca8eb659535b19b253354e43e1f4fc8a9bc67615ca1 +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.5-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:ef39e430a97a61bec3395adb673a7c5611d2212f14abe40da21cbfd11a9d6e9d # Default linux/architecture. diff --git a/controller/Dockerfile.proto b/controller/Dockerfile.proto index 94c2da033b..8719874a24 100644 --- a/controller/Dockerfile.proto +++ b/controller/Dockerfile.proto @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.23.4-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:88225e171f29fe5f1f6ffca8eb659535b19b253354e43e1f4fc8a9bc67615ca1 +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.5-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:ef39e430a97a61bec3395adb673a7c5611d2212f14abe40da21cbfd11a9d6e9d LABEL Name=retina-builder Version=0.0.1 diff --git a/controller/Dockerfile.windows-2022 b/controller/Dockerfile.windows-2022 index 3869abaac7..55929090bd 100644 --- a/controller/Dockerfile.windows-2022 +++ b/controller/Dockerfile.windows-2022 @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.23.4-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:88225e171f29fe5f1f6ffca8eb659535b19b253354e43e1f4fc8a9bc67615ca1 AS builder +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.5-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:ef39e430a97a61bec3395adb673a7c5611d2212f14abe40da21cbfd11a9d6e9d AS builder # Build args ARG VERSION diff --git a/controller/Dockerfile.windows-cgo b/controller/Dockerfile.windows-cgo index 08126c53fd..5d90eaab2c 100644 --- a/controller/Dockerfile.windows-cgo +++ b/controller/Dockerfile.windows-cgo @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.23.4-windowsservercore-ltsc2022 -FROM --platform=windows/amd64 mcr.microsoft.com/oss/go/microsoft/golang@sha256:e423369b45d4144324e61d6d64ce7a6d0e2bdf7f181c74d8ed25346891b8aacd AS cgo +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.5-windowsservercore-ltsc2022 +FROM --platform=windows/amd64 mcr.microsoft.com/oss/go/microsoft/golang@sha256:f88b5ef1afd628c18196e98c3d1c6081617768f4ad316433dd29b19a257a46eb AS cgo SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] diff --git a/controller/Dockerfile.windows-native b/controller/Dockerfile.windows-native index f177985908..8df903e71b 100644 --- a/controller/Dockerfile.windows-native +++ b/controller/Dockerfile.windows-native @@ -3,8 +3,8 @@ # buildx targets, and this one requires legacy build. # Maybe one day: https://github.com/moby/buildkit/issues/616 ARG BUILDER_IMAGE -# mcr.microsoft.com/oss/go/microsoft/golang:1.23.4-windowsservercore-ltsc2022 -FROM --platform=windows/amd64 mcr.microsoft.com/oss/go/microsoft/golang@sha256:e423369b45d4144324e61d6d64ce7a6d0e2bdf7f181c74d8ed25346891b8aacd AS builder +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.5-windowsservercore-ltsc2022 +FROM --platform=windows/amd64 mcr.microsoft.com/oss/go/microsoft/golang@sha256:f88b5ef1afd628c18196e98c3d1c6081617768f4ad316433dd29b19a257a46eb AS builder WORKDIR C:\\retina COPY go.mod . COPY go.sum . diff --git a/operator/Dockerfile b/operator/Dockerfile index 79a0db3575..8b4c232474 100644 --- a/operator/Dockerfile +++ b/operator/Dockerfile @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.23.4-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:88225e171f29fe5f1f6ffca8eb659535b19b253354e43e1f4fc8a9bc67615ca1 AS builder +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.5-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:ef39e430a97a61bec3395adb673a7c5611d2212f14abe40da21cbfd11a9d6e9d AS builder ARG VERSION ARG APP_INSIGHTS_ID diff --git a/operator/Dockerfile.windows-2019 b/operator/Dockerfile.windows-2019 index 9e8108e80c..b4bbe00a09 100644 --- a/operator/Dockerfile.windows-2019 +++ b/operator/Dockerfile.windows-2019 @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.23.4-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:88225e171f29fe5f1f6ffca8eb659535b19b253354e43e1f4fc8a9bc67615ca1 AS builder +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.5-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:ef39e430a97a61bec3395adb673a7c5611d2212f14abe40da21cbfd11a9d6e9d AS builder # Build args ARG VERSION diff --git a/operator/Dockerfile.windows-2022 b/operator/Dockerfile.windows-2022 index b845ae409d..bf6961c053 100644 --- a/operator/Dockerfile.windows-2022 +++ b/operator/Dockerfile.windows-2022 @@ -1,5 +1,5 @@ -# mcr.microsoft.com/oss/go/microsoft/golang:1.23.4-cbl-mariner2.0 -FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:88225e171f29fe5f1f6ffca8eb659535b19b253354e43e1f4fc8a9bc67615ca1 AS builder +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.5-cbl-mariner2.0 +FROM --platform=$BUILDPLATFORM mcr.microsoft.com/oss/go/microsoft/golang@sha256:ef39e430a97a61bec3395adb673a7c5611d2212f14abe40da21cbfd11a9d6e9d AS builder # Build args ARG VERSION diff --git a/test/image/Dockerfile b/test/image/Dockerfile index 9d5dd44627..7506ff104d 100644 --- a/test/image/Dockerfile +++ b/test/image/Dockerfile @@ -1,6 +1,6 @@ # build stage -# mcr.microsoft.com/oss/go/microsoft/golang:1.23.4-cbl-mariner2.0 -FROM mcr.microsoft.com/oss/go/microsoft/golang@sha256:88225e171f29fe5f1f6ffca8eb659535b19b253354e43e1f4fc8a9bc67615ca1 AS builder +# mcr.microsoft.com/oss/go/microsoft/golang:1.23.5-cbl-mariner2.0 +FROM mcr.microsoft.com/oss/go/microsoft/golang@sha256:ef39e430a97a61bec3395adb673a7c5611d2212f14abe40da21cbfd11a9d6e9d AS builder ENV CGO_ENABLED=0 COPY . /go/src/github.com/microsoft/retina WORKDIR /go/src/github.com/microsoft/retina