mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-17 00:20:51 +00:00
chore: bump image go, uv and apt layer past fixable CVEs (#12412)
* chore: bump image go, uv and apt layer past fixable CVEs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore: bump go to 1.27.4 in the extra image too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6592005d87
commit
2ab960e2fd
@@ -28,7 +28,7 @@ ENV PATH="${PATH}:/usr/local/go/bin"
|
||||
ENV GO_PATH=/usr/local/go/bin/go
|
||||
|
||||
# UV
|
||||
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.13.6/uv-installer.sh | sh && mv /usr/local/cargo/bin/uv /usr/local/bin/uv
|
||||
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.13.8/uv-installer.sh | sh && mv /usr/local/cargo/bin/uv /usr/local/bin/uv
|
||||
|
||||
ENV TZ=Etc/UTC
|
||||
|
||||
|
||||
Executable
+50
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
# Writes the OpenVEX document for a release image from its unfiltered Trivy JSON reports.
|
||||
#
|
||||
# linux-libc-dev: every CVE found against it is not_affected. It holds only the kernel's userspace
|
||||
# API headers, which build-essential needs to compile C; a container runs on its host's kernel, so
|
||||
# a kernel CVE reported against this package never applies to the image. The product carries no
|
||||
# version or qualifiers so one statement covers every architecture and package version.
|
||||
#
|
||||
# setuptools@70.3.0: the copy of pkg_resources pip vendors (pip/_vendor/vendor.txt) in the
|
||||
# preinstalled Pythons. Only the listed CVEs are covered, each in a setuptools module pip does not
|
||||
# vendor; a new CVE against that version must be checked before it joins the list. The version is
|
||||
# pinned so the statements stop applying once pip vendors a different setuptools.
|
||||
#
|
||||
# usage: image-vex.sh <document id> <trivy.json>... > vex.openvex.json
|
||||
set -euo pipefail
|
||||
|
||||
id="$1"
|
||||
shift
|
||||
|
||||
jq -s --arg id "$id" --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" '
|
||||
([.[].Results[]? | (.Vulnerabilities // [])[] | select(.PkgName == "linux-libc-dev") | .VulnerabilityID]
|
||||
| unique
|
||||
| map({
|
||||
vulnerability: { name: . },
|
||||
products: [{ "@id": "pkg:deb/debian/linux-libc-dev" }],
|
||||
status: "not_affected",
|
||||
justification: "vulnerable_code_not_present",
|
||||
impact_statement: "linux-libc-dev contains only the Linux userspace API headers used to compile C code. The image ships no kernel: containers run on the host kernel, which this package does not affect."
|
||||
})) as $kernel
|
||||
| ([
|
||||
["CVE-2025-47273", "setuptools.package_index"],
|
||||
["CVE-2026-59890", "setuptools.command.sdist and FileList"],
|
||||
["GHSA-xmj3-9gf7-h52w", "setuptools.wheel"]
|
||||
]
|
||||
| map({
|
||||
vulnerability: { name: .[0] },
|
||||
products: [{ "@id": "pkg:pypi/setuptools@70.3.0" }],
|
||||
status: "not_affected",
|
||||
justification: "vulnerable_code_not_present",
|
||||
impact_statement: ("setuptools 70.3.0 is present only as the pkg_resources module pip vendors. The vulnerable code is in " + .[1] + ", which pip does not vendor.")
|
||||
})) as $pip_setuptools
|
||||
| {
|
||||
"@context": "https://openvex.dev/ns/v0.2.0",
|
||||
"@id": $id,
|
||||
author: "Windmill Labs",
|
||||
timestamp: $ts,
|
||||
version: 1,
|
||||
statements: ($kernel + $pip_setuptools)
|
||||
}
|
||||
' "$@"
|
||||
@@ -1,31 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Writes an OpenVEX document marking every linux-libc-dev CVE found in the given Trivy JSON
|
||||
# reports as not_affected. linux-libc-dev holds only the kernel's userspace API headers, which
|
||||
# build-essential needs to compile C; a container runs on its host's kernel, so a kernel CVE
|
||||
# reported against this package never applies to the image. The product carries no version or
|
||||
# qualifiers so one statement covers every architecture and package version.
|
||||
#
|
||||
# usage: kernel-headers-vex.sh <document id> <trivy.json>... > vex.openvex.json
|
||||
set -euo pipefail
|
||||
|
||||
id="$1"
|
||||
shift
|
||||
|
||||
jq -s --arg id "$id" --arg ts "$(date -u +%Y-%m-%dT%H:%M:%SZ)" '
|
||||
[.[].Results[]? | (.Vulnerabilities // [])[] | select(.PkgName == "linux-libc-dev") | .VulnerabilityID]
|
||||
| unique
|
||||
| {
|
||||
"@context": "https://openvex.dev/ns/v0.2.0",
|
||||
"@id": $id,
|
||||
author: "Windmill Labs",
|
||||
timestamp: $ts,
|
||||
version: 1,
|
||||
statements: map({
|
||||
vulnerability: { name: . },
|
||||
products: [{ "@id": "pkg:deb/debian/linux-libc-dev" }],
|
||||
status: "not_affected",
|
||||
justification: "vulnerable_code_not_present",
|
||||
impact_statement: "linux-libc-dev contains only the Linux userspace API headers used to compile C code. The image ships no kernel: containers run on the host kernel, which this package does not affect."
|
||||
})
|
||||
}
|
||||
' "$@"
|
||||
@@ -81,7 +81,7 @@ jobs:
|
||||
|
||||
- uses: astral-sh/setup-uv@v7.6.0
|
||||
with:
|
||||
version: "0.13.6"
|
||||
version: "0.13.8"
|
||||
|
||||
- uses: shivammathur/setup-php@2.40.0
|
||||
with:
|
||||
|
||||
@@ -64,7 +64,7 @@ jobs:
|
||||
node-version: "24"
|
||||
- uses: astral-sh/setup-uv@v7.6.0
|
||||
with:
|
||||
version: "0.13.6"
|
||||
version: "0.13.8"
|
||||
- uses: shivammathur/setup-php@2.40.0
|
||||
with:
|
||||
php-version: "8.3"
|
||||
|
||||
@@ -449,7 +449,7 @@ jobs:
|
||||
trivy() { docker run --rm -v "$RUNNER_TEMP/trivy-cache:/root/.cache/trivy" -v "$PWD/scan:/out" "$TRIVY_IMAGE" "$@"; }
|
||||
trivy image -q --platform linux/amd64 \
|
||||
--scanners vuln --format json -o /out/full.json "$IMAGE_REF"
|
||||
.github/scripts/kernel-headers-vex.sh \
|
||||
.github/scripts/image-vex.sh \
|
||||
"https://github.com/windmill-labs/windmill/releases/tag/${GITHUB_REF_NAME}#${{ matrix.image }}" \
|
||||
scan/full.json > "scan/${{ matrix.image }}.openvex.json"
|
||||
trivy image -q --platform linux/amd64 \
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
ARG DEBIAN_IMAGE=debian:trixie-slim
|
||||
ARG RUST_IMAGE=rust:1.97-slim-trixie
|
||||
# NOTE: If changing, also change go version in workspace dependencies template at WorkspaceDependenciesEditor.svelte
|
||||
ARG GO_VERSION=1.27.3
|
||||
ARG GO_VERSION=1.27.4
|
||||
|
||||
# crane is built from source rather than downloaded: its release binaries are built with whatever
|
||||
# Go was current at release time, so their stdlib lags behind the Go the image installs.
|
||||
@@ -180,7 +180,7 @@ ENV PATH /usr/local/bin:/root/.local/bin:/tmp/.local/bin:$PATH
|
||||
# The build cache keeps the apt layer while the base image digest and this line are unchanged, so
|
||||
# Debian security updates are not picked up by later builds. Bump to force a fresh apt-get upgrade;
|
||||
# bump it in docker/DockerfileSlim and docker/DockerfileSlimEe too.
|
||||
ARG APT_REFRESH=1
|
||||
ARG APT_REFRESH=2
|
||||
RUN echo "apt refresh ${APT_REFRESH}" \
|
||||
&& apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
@@ -276,7 +276,7 @@ ENV PATH="${PATH}:/usr/local/go/bin"
|
||||
ENV GO_PATH=/usr/local/go/bin/go
|
||||
|
||||
# Install UV
|
||||
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.13.6/uv-installer.sh | sh && mv /root/.local/bin/uv /usr/local/bin/uv
|
||||
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.13.8/uv-installer.sh | sh && mv /root/.local/bin/uv /usr/local/bin/uv
|
||||
|
||||
# Preinstall python runtimes to temp build location (will copy with world-writable perms later)
|
||||
# --compile-bytecode precompiles the stdlib to .pyc so jobs don't recompile it on every run
|
||||
|
||||
@@ -47,9 +47,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
RUN set -eux; \
|
||||
arch="$(dpkg --print-architecture)"; arch="${arch##*-}"; \
|
||||
case "$arch" in \
|
||||
'amd64') targz='go1.27.3.linux-amd64.tar.gz' ;; \
|
||||
'arm64') targz='go1.27.3.linux-arm64.tar.gz' ;; \
|
||||
'armhf') targz='go1.27.3.linux-armv6l.tar.gz' ;; \
|
||||
'amd64') targz='go1.27.4.linux-amd64.tar.gz' ;; \
|
||||
'arm64') targz='go1.27.4.linux-arm64.tar.gz' ;; \
|
||||
'armhf') targz='go1.27.4.linux-armv6l.tar.gz' ;; \
|
||||
*) echo >&2 "error: unsupported architecture '$arch'"; exit 1 ;; \
|
||||
esac; \
|
||||
wget "https://golang.org/dl/$targz" -nv && tar -C /usr/local -xzf "$targz" && rm "$targz"
|
||||
|
||||
@@ -47,7 +47,7 @@ ENV PATH=/usr/local/bin:/root/.local/bin:/tmp/.local/bin:$PATH
|
||||
|
||||
# Install system dependencies
|
||||
# Bump to force a fresh apt-get upgrade past the build cache; keep in step with ../Dockerfile.
|
||||
ARG APT_REFRESH=1
|
||||
ARG APT_REFRESH=2
|
||||
RUN echo "apt refresh ${APT_REFRESH}" \
|
||||
&& apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
@@ -66,7 +66,7 @@ RUN curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmo
|
||||
ENV TZ=Etc/UTC
|
||||
|
||||
# Install UV
|
||||
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.13.6/uv-installer.sh | sh && mv /root/.local/bin/uv /usr/local/bin/uv
|
||||
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.13.8/uv-installer.sh | sh && mv /root/.local/bin/uv /usr/local/bin/uv
|
||||
|
||||
# Preinstall python runtime to temp location (will copy with world-writable perms later)
|
||||
# --compile-bytecode precompiles the stdlib to .pyc so jobs don't recompile it on every run
|
||||
|
||||
@@ -47,7 +47,7 @@ ENV PATH=/usr/local/bin:/root/.local/bin:/tmp/.local/bin:$PATH
|
||||
|
||||
# Install system dependencies
|
||||
# Bump to force a fresh apt-get upgrade past the build cache; keep in step with ../Dockerfile.
|
||||
ARG APT_REFRESH=1
|
||||
ARG APT_REFRESH=2
|
||||
RUN echo "apt refresh ${APT_REFRESH}" \
|
||||
&& apt-get update \
|
||||
&& apt-get upgrade -y \
|
||||
@@ -66,7 +66,7 @@ RUN curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmo
|
||||
ENV TZ=Etc/UTC
|
||||
|
||||
# Install UV
|
||||
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.13.6/uv-installer.sh | sh && mv /root/.local/bin/uv /usr/local/bin/uv
|
||||
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.13.8/uv-installer.sh | sh && mv /root/.local/bin/uv /usr/local/bin/uv
|
||||
|
||||
# Preinstall python runtime to temp location (will copy with world-writable perms later)
|
||||
# --compile-bytecode precompiles the stdlib to .pyc so jobs don't recompile it on every run
|
||||
|
||||
Reference in New Issue
Block a user