Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/grype/ignore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ignore:
type: python

# golang.org/x/net < 0.62.0 compiled into the runpodctl release binary
# (GO-2026-6860). The latest release, v3.0.1, is built with x/net 0.60.0
# (GO-2026-6860). The latest release, v3.1.1, is built with x/net 0.60.0
# and runpodctl main is still on 0.60.0, so there is no release to upgrade
# to. Scoped to the runpodctl path so x/net in any other Go binary still
# fails the build. Remove once a runpodctl release ships x/net >= 0.62.0.
Expand Down
4 changes: 2 additions & 2 deletions official-templates/autoresearch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ FROM ${BASE_IMAGE}
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Install runpodctl for pod management (scaling up GPUs)
ARG RUNPODCTL_VERSION=v3.0.1
ARG RUNPODCTL_SHA256=8529411a10a06a80f88216f4f89a1f22e6943eada01d2d634cc6324dd62542e3
ARG RUNPODCTL_VERSION=v3.1.1
ARG RUNPODCTL_SHA256=0d70f2d2317c9687aeb491d1f58c0e013b4ae8ff643b9e4794857ee2f5934a9a
RUN wget -q --https-only --secure-protocol=TLSv1_2 --max-redirect=3 \
-O /tmp/runpodctl.tar.gz \
"https://github.com/runpod/runpodctl/releases/download/${RUNPODCTL_VERSION}/runpodctl-linux-amd64.tar.gz" && \
Expand Down
65 changes: 52 additions & 13 deletions official-templates/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,11 @@ RUN . /etc/os-release && \

# CON-1869: CUDA bases pin apt to a snapshot that lags the emSign removal
# (CVE-2026-111943), and plain `apt-get upgrade` there only reaches the stale
# version. Pull the patched ca-certificates from the archive over https,
# checksum it, and install only when newer so we never downgrade a fresher one.
# version. Pull the patched ca-certificates over https, checksum it, and install
# only when newer so we never downgrade a fresher one. Pinned .debs come from
# Launchpad, which keeps superseded builds; the archive pool keeps only the
# newest, so a pin there 404s as soon as Ubuntu ships the next update. Launchpad
# answers 503 in bursts, hence --retry.
RUN . /etc/os-release && \
ver="20260816ubuntu0.${VERSION_ID}.1" && \
deb="ca-certificates_${ver}_all.deb" && \
Expand All @@ -107,16 +110,16 @@ RUN . /etc/os-release && \
esac && \
cur="$(dpkg-query -W -f='${Version}' ca-certificates 2>/dev/null || echo 0)" && \
if dpkg --compare-versions "$cur" lt "$ver"; then \
curl -fsSL --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \
"https://security.ubuntu.com/ubuntu/pool/main/c/ca-certificates/${deb}" && \
curl -fsSL --retry 5 --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \
"https://launchpad.net/ubuntu/+archive/primary/+files/${deb}" && \
echo "${sha} /tmp/${deb}" | sha256sum -c - && \
dpkg -i "/tmp/${deb}" && rm "/tmp/${deb}"; \
fi && \
update-ca-certificates

# Same stale-snapshot problem for brotli (CVE-2026-111497, KEV): `apt-get
# upgrade` can't reach the patched libbrotli1. Pull it from the security
# archive over https, checksum, and install only when newer.
# upgrade` can't reach the patched libbrotli1. Pull it from Launchpad over
# https, checksum, and install only when newer.
RUN . /etc/os-release && \
case "${VERSION_ID}" in \
24.04) ver="1.1.0-2ubuntu0.1"; sha=70b188a86d81f30d7510aab30e25d638ed5037dded6691af1533952b71ac61de ;; \
Expand All @@ -126,8 +129,8 @@ RUN . /etc/os-release && \
deb="libbrotli1_${ver}_amd64.deb" && \
cur="$(dpkg-query -W -f='${Version}' libbrotli1 2>/dev/null || echo 0)" && \
if dpkg --compare-versions "$cur" lt "$ver"; then \
curl -fsSL --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \
"https://security.ubuntu.com/ubuntu/pool/main/b/brotli/${deb}" && \
curl -fsSL --retry 5 --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \
"https://launchpad.net/ubuntu/+archive/primary/+files/${deb}" && \
echo "${sha} /tmp/${deb}" | sha256sum -c - && \
dpkg -i "/tmp/${deb}" && rm "/tmp/${deb}"; \
fi
Expand Down Expand Up @@ -159,15 +162,45 @@ RUN . /etc/os-release && \
debs="" && \
for p in ${pkgs}; do \
deb="${p%%:*}_${ver}_amd64.deb" && \
curl -fsSL --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \
"https://security.ubuntu.com/ubuntu/pool/main/a/apt/${deb}" && \
curl -fsSL --retry 5 --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \
"https://launchpad.net/ubuntu/+archive/primary/+files/${deb}" && \
echo "${p#*:} /tmp/${deb}" | sha256sum -c - && \
debs="${debs} /tmp/${deb}"; \
debs="${debs} /tmp/${deb}" || exit 1; \
done && \
dpkg -i ${debs} && rm -f ${debs}; \
fi && \
dpkg-query -W -f='${Package} ${Version}\n' apt "${lib}"

# Same stale-snapshot problem for nginx (CVE-2026-113425, CVE-2026-123007,
# CVE-2026-123633, CVE-2026-123634, HIGH; fixed in 1.24.0-2ubuntu7.20 on 24.04).
# nginx pins nginx-common to its exact version, so both go in together.
# Checksummed, and only when newer.
# debs is split on purpose: it is a list of file paths.
# hadolint ignore=SC2086
RUN . /etc/os-release && \
case "${VERSION_ID}" in \
24.04) ver="1.24.0-2ubuntu7.21"; \
sha_nginx=c125a2ad6bfd25b6fdf92e3534a3facbf35180e05a054dcb84f68b63fc38227e; \
sha_common=4176112bca331776560304ced6f6e6ca36fee2818a834d6ccdf79c6c58ed5e28 ;; \
26.04) ver="1.28.3-2ubuntu1.14"; \
sha_nginx=05a780d312e408d09482a8d735383a29b40514606f2855db94cd81da15f406d1; \
sha_common=e9e6f64696bd5d0c74f06c3a5d95ac22746ee1a4ab1de62b616393a94db9b8ab ;; \
*) echo "no pinned nginx for ${VERSION_ID}" && exit 1 ;; \
esac && \
cur="$(dpkg-query -W -f='${Version}' nginx 2>/dev/null || echo 0)" && \
if dpkg --compare-versions "$cur" lt "$ver"; then \
debs="" && \
for p in "nginx_${ver}_amd64.deb:${sha_nginx}" "nginx-common_${ver}_all.deb:${sha_common}"; do \
deb="${p%%:*}" && \
curl -fsSL --retry 5 --proto '=https' --tlsv1.2 -o "/tmp/${deb}" \
"https://launchpad.net/ubuntu/+archive/primary/+files/${deb}" && \
echo "${p#*:} /tmp/${deb}" | sha256sum -c - && \
debs="${debs} /tmp/${deb}" || exit 1; \
done && \
Comment on lines +197 to +199

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[minor] If the first deb fails to download or fails its checksum, the build keeps going. The loop runs curl && sha256sum -c && debs=...; done, so a failure in the first iteration (nginx_*.deb) only stops that && chain. The loop's exit status comes from the last iteration, so done && still goes on to dpkg -i, now with just nginx-common. Here is the shell behaviour on its own:

$ bash -c 'for p in a b; do [ $p = b ] && echo ok $p; done && echo LOOP_OK'
ok b
LOOP_OK

What happens next depends on how dpkg treats an upgraded nginx-common while the installed nginx needs nginx-common (= old). If dpkg exits 0, the image ships the vulnerable nginx binary and the build passes. The dpkg-query line only prints versions and does not check them. The pinned hashes match what is published today (I checked all four), so this only matters when the mirror misbehaves or a deb is tampered with. Still, a failed checksum should always fail the build. The apt block above has the same pattern.

Suggested change
echo "${p#*:} /tmp/${deb}" | sha256sum -c - && \
debs="${debs} /tmp/${deb}"; \
done && \
echo "${p#*:} /tmp/${deb}" | sha256sum -c - && \
debs="${debs} /tmp/${deb}" || exit 1; \
done && \

dpkg -i ${debs} && rm -f ${debs}; \
fi && \
dpkg-query -W -f='${Package} ${Version}\n' nginx nginx-common

# Install SchedMD Slurm from the .deb packages built in the slurm-builder stage
# (replaces Ubuntu's stock slurm-wlm). We install via apt (not raw dpkg) so the
# runtime dependencies (libmunge2, libmariadb, ...) resolve automatically, as
Expand Down Expand Up @@ -196,6 +229,12 @@ RUN apt-get update --yes && \
RUN find /opt/nvidia /usr/local/cuda* -type d -name 'efa_metrics' \
-print -exec rm -rf {} + 2>/dev/null || true

# Canonical's service manager, dropped into the 26.04 image outside dpkg, so
# there is no package to purge or upgrade. start.sh is the CMD and nothing
# invokes it, but its Go stdlib carries HIGH findings with no fixed build in
# 26.04. Same removal as sandbox-ubuntu; a no-op on 24.04.
RUN rm -rf /usr/bin/pebble /var/lib/pebble

# Install Python 3.11-3.13. Whichever of them is the release's own system
# python3 comes from the Ubuntu archive (3.12 on 24.04; 26.04's system python3
# is 3.14, which is not in this list), the rest from deadsnakes. The PPA is
Expand All @@ -213,8 +252,8 @@ RUN [[ -n "$RP_SKIP_PYTHON" ]] && exit 0; \
rm -rf "${GNUPGHOME}" && \
echo "deb [signed-by=/usr/share/keyrings/deadsnakes.gpg] https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu ${VERSION_CODENAME} main" \
> /etc/apt/sources.list.d/deadsnakes.list && \
apt-get update --yes && \
apt-get install --yes --no-install-recommends \
apt-get -o Acquire::Retries=10 update --yes --error-on=any && \
apt-get -o Acquire::Retries=10 install --yes --no-install-recommends \
python3.11-dev python3.11-venv python3.11-distutils \
python3.12-dev python3.12-venv \
python3.13-dev python3.13-venv && \
Expand Down
2 changes: 1 addition & 1 deletion official-templates/nvidia-pytorch/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ fsspec==2026.6.0
jaraco.context==6.1.0
jupyter_server==2.21.0
jupyterlab==4.6.4
mistune==3.3.3
mistune==3.3.4
msgpack==1.2.3
nbconvert==7.17.2
notebook==7.6.3
Expand Down
Loading