From 1c357d5eb8c6a0f1b7ed42dbd07570cb1dc47ea4 Mon Sep 17 00:00:00 2001 From: Derek Hsu Date: Tue, 24 Nov 2026 15:24:28 +0800 Subject: [PATCH 1/3] fix(images): pin the current Debian security releases in image builds Debian removed several pinned package versions from the trixie archive, so the base and tools image builds fail without the Docker cache. - Base images: pin ca-certificates 20250419+deb13u1, zlib1g-dev +deb13u1, xz-utils 5.8.1-1+deb13u2, and glibc 2.41-12+deb13u5. - Security package inventory: expect glibc deb13u5. The inventory for the digest-pinned Hermes sandbox base keeps deb13u4. - Tools images: the perl-modules stage installs libc6-dev and libc-dev-bin 2.41-12+deb13u4 from snapshot.debian.org, matching the libc6 in the published base images. - Tools images: pin chromium-common, which apt 3.0 no longer selects for chromium while the controlled packages are held. Closes #85 Signed-off-by: Derek Hsu Co-Authored-By: Claude Opus 5.5 --- Dockerfile.base | 12 +++--- Dockerfile.tools | 19 ++++++++- agents/hermes-01x/Dockerfile.base | 10 ++--- agents/hermes-01x/Dockerfile.tools | 19 ++++++++- agents/hermes/Dockerfile.base | 10 ++--- .../langchain-deepagents-code/Dockerfile.base | 12 +++--- .../2026-10-31-openclaw-tools-image.md | 9 ++++- .../standalone-security-package-inventory.mts | 15 ++++--- .../security-package-specs.ts | 16 +++++--- test/helpers/base-apt-security-functions.ts | 4 +- test/helpers/onboard-script-mocks.cjs | 2 +- .../sandbox-base-security-packages.test.ts | 40 ++++++++++--------- .../apt-packages-browser.txt | 3 ++ 13 files changed, 110 insertions(+), 61 deletions(-) diff --git a/Dockerfile.base b/Dockerfile.base index e384efdf8d0..039e3ecf137 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -64,14 +64,14 @@ FROM node:24.22.1-trixie-slim@sha256:43b9ba1142b8dcf33fa8f922ca1be85714adc444e05 RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential=12.12 \ - ca-certificates=20250419 \ + ca-certificates=20250419+deb13u1 \ curl=8.14.1-2+deb13u7 \ git=1:2.47.3-0+deb13u1 \ libssl-dev=3.5.7-1~deb13u3 \ libssl3t64=3.5.7-1~deb13u3 \ openssh-server=1:10.0p1-7+deb13u4 \ - xz-utils=5.8.1-1+deb13u1 \ - zlib1g-dev=1:1.3.dfsg+really1.3.1-1+b1 \ + xz-utils=5.8.1-1+deb13u2 \ + zlib1g-dev=1:1.3.dfsg+really1.3.1-1+deb13u1 \ && rm -rf /var/lib/apt/lists/* COPY scripts/security/build-native-security-packages.sh /scripts/security/build-native-security-packages.sh @@ -134,14 +134,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ curl=8.14.1-2+deb13u7 \ git=1:2.47.3-0+deb13u1 \ gnupg=2.4.7-21+deb13u1 \ - ca-certificates=20250419 \ + ca-certificates=20250419+deb13u1 \ iproute2=6.15.0-1 \ iptables=1.8.11-2 \ nftables=1.1.3-1 \ libcap2-bin=1:2.75-10+deb13u1+b3 \ libssl3t64=3.5.7-1~deb13u3 \ - libc6=2.41-12+deb13u4 \ - libc-bin=2.41-12+deb13u4 \ + libc6=2.41-12+deb13u5 \ + libc-bin=2.41-12+deb13u5 \ bsdutils=1:2.41.5-0+deb13u1 \ login=1:4.16.0-2+really2.41.5-0+deb13u1 \ mount=2.41.5-0+deb13u1 \ diff --git a/Dockerfile.tools b/Dockerfile.tools index b5b20fc3f2a..8aa3b063eff 100644 --- a/Dockerfile.tools +++ b/Dockerfile.tools @@ -35,6 +35,18 @@ ADD --checksum=sha256:5c5ba2724c162f82d0a0c71b6c03224ed44f8bef7b14ace5da0635d3af ADD --checksum=sha256:1dc21c3dd6d948929e22e5cae49b9d0b3b30ff88fafd4493fd4460c6252e9d90 \ https://github.com/pimalaya/himalaya/releases/download/v2.2.1/himalaya.aarch64-linux.tgz /himalaya-arm64.tgz +# libc6-dev must match the base image's libc6 exactly. Debian has replaced +# 2.41-12+deb13u4 in the archive, so fetch it from the snapshot archive for the +# perl-modules stage. Update these with the base image's libc6 version. +ADD --checksum=sha256:1fda734dabcd80b77266a09ab62b0f1e3e16d8091db62899890b2200745632a2 \ + https://snapshot.debian.org/archive/debian/20260711T202405Z/pool/main/g/glibc/libc6-dev_2.41-12%2Bdeb13u4_amd64.deb /libc6-dev-amd64.deb +ADD --checksum=sha256:71e373cb5e9da975b02fb4af555929cb1977560e2dd8245de4eb8a7b03677a08 \ + https://snapshot.debian.org/archive/debian/20260711T202405Z/pool/main/g/glibc/libc6-dev_2.41-12%2Bdeb13u4_arm64.deb /libc6-dev-arm64.deb +ADD --checksum=sha256:2c21175d6a8283ed566d154c0c0bc06f60836e53b0b9e1f74c14eac586b68c24 \ + https://snapshot.debian.org/archive/debian/20260711T202405Z/pool/main/g/glibc/libc-dev-bin_2.41-12%2Bdeb13u4_amd64.deb /libc-dev-bin-amd64.deb +ADD --checksum=sha256:cd4b3bdf404a01792003f4ca400bc602252ab24e0a8c53e45d474d1818dc02e3 \ + https://snapshot.debian.org/archive/debian/20260711T202405Z/pool/main/g/glibc/libc-dev-bin_2.41-12%2Bdeb13u4_arm64.deb /libc-dev-bin-arm64.deb + # The yq 4.54.1 release binaries use Go 1.27.1 and golang.org/x/net 0.59.0, # which have HIGH vulnerabilities with available fixes. Build the same yq version with a # patched Go toolchain and x/net. Go verifies module hashes with sumdb. @@ -57,12 +69,15 @@ USER root ADD --checksum=sha256:abded5f4fdd9338e89fd2f1d8271c44989dae5bf50aece41b6179d8e230704f8 \ https://cpan.metacpan.org/authors/id/K/KU/KUBOTA/Text-CharWidth-0.04.tar.gz /tmp/Text-CharWidth-0.04.tar.gz # hadolint ignore=DL3003,DL3008 -RUN set -eu; \ +RUN --mount=type=bind,from=downloads,target=/downloads \ + set -eu; \ while IFS='=' read -r pkg _; do \ [ "$pkg" = architecture ] || apt-mark hold "$pkg" >/dev/null; \ done /dev/null; \ done /usr/local/share/nemoclaw/corporate-ca.pem 2>/dev/null \ @@ -98,14 +98,14 @@ RUN --mount=type=bind,source=scripts/security/security-package-inventory.mts,tar python3-venv=3.13.5-1 \ curl=8.14.1-2+deb13u7 \ git=1:2.47.3-0+deb13u1 \ - ca-certificates=20250419 \ + ca-certificates=20250419+deb13u1 \ iproute2=6.15.0-1 \ iptables=1.8.11-2 \ nftables=1.1.3-1 \ libcap2-bin=1:2.75-10+deb13u1+b3 \ libssl3t64=3.5.7-1~deb13u3 \ - libc6=2.41-12+deb13u4 \ - libc-bin=2.41-12+deb13u4 \ + libc6=2.41-12+deb13u5 \ + libc-bin=2.41-12+deb13u5 \ bsdutils=1:2.41.5-0+deb13u1 \ login=1:4.16.0-2+really2.41.5-0+deb13u1 \ mount=2.41.5-0+deb13u1 \ diff --git a/docs/modification/2026-10-31-openclaw-tools-image.md b/docs/modification/2026-10-31-openclaw-tools-image.md index 9a07278fb01..095860f977f 100644 --- a/docs/modification/2026-10-31-openclaw-tools-image.md +++ b/docs/modification/2026-10-31-openclaw-tools-image.md @@ -67,7 +67,7 @@ Debian 套件在 amd64 與 arm64 上的版本相同。 | PDF 與轉檔 | `pandoc 3.1.11.1+ds-2`、`poppler-utils 25.03.0-5+deb13u4`、`qpdf 12.2.0-1`、`ghostscript 10.05.1~dfsg-1+deb13u3` | | OCR | `tesseract-ocr 5.5.0-1+b1`;語言資料 `eng`、`chi-tra`、`chi-sim` `1:4.1.0-2` | | 圖片與影音 | `imagemagick 8:7.1.1.43+dfsg1-1+deb13u14`(提供 `magick`)、`ffmpeg 7:7.1.5-0+deb13u1`(含 `ffprobe`)、`libimage-exiftool-perl 13.25+dfsg-1` | -| 瀏覽器 | `chromium 156.0.8078.79-1~deb13u1`,固定在 `apt-packages-browser.txt` | +| 瀏覽器 | `chromium`、`chromium-common` `156.0.8078.79-1~deb13u1`,固定在 `apt-packages-browser.txt` | | 字型 | `fontconfig 2.15.0-2.3`、`fonts-noto-cjk 1:20240730+repack1-1`、`fonts-liberation 1:2.1.5-3`、`fonts-dejavu-core 2.37-8` | | Workspace | `zip 3.0-15+deb13u1`、`unzip 6.0-29+deb13u1`、`ripgrep 14.1.1-1+b4`、`sqlite3 3.46.1-7+deb13u2` | | 執行期函式庫 | `libicu76 76.1-4`(officecli 需要) | @@ -83,6 +83,7 @@ Debian 套件在 amd64 與 arm64 上的版本相同。 | yq(Mike Farah) | 4.54.1 | amd64、arm64;以 Go 1.27.4 與 `golang.org/x/net` 0.62.0 從原始碼建置 | | p5.js(`p5.min.js`) | 1.7.0 | 不分架構 | | Text-CharWidth 原始碼 | 0.04 | 建置階段重新編譯,見 6.3 節 | +| `libc6-dev`、`libc-dev-bin` | `2.41-12+deb13u4` | amd64、arm64;只用於編譯 Text::CharWidth,見 6.3 節 | | pnpm | 12.16.1 | 不分架構 | | Chrome Headless Shell | 156.0.8078.4(Playwright revision 1248) | amd64、arm64 | | shadcn 元件 | `anthropics/skills` 固定 revision 的 `web-artifacts-builder` | 不分架構;Apache-2.0,授權檔在模板內 | @@ -282,7 +283,11 @@ Debian `0.04-11` 沒有原始碼修補,只多了 hardening 旗標、`dh_perl -d` 重新編譯使用 `dpkg-buildflags` 的 hardening 設定。 最終映像只複製編譯好的套件,不含編譯器。 -更新 base 的 Perl 版本時,必須重新檢查這個步驟。 +編譯需要 `libc6-dev`,版本必須與 base 映像的 `libc6` 完全相同。 +Debian 套件庫現在只提供 `2.41-12+deb13u5`,而 tools 映像使用的已發布 base 映像,`libc6` 仍是 `2.41-12+deb13u4`。 +因此這個 stage 從 `snapshot.debian.org` 下載 `2.41-12+deb13u4` 的 `libc6-dev` 與 `libc-dev-bin`,並以 SHA-256 校驗(#85)。 + +更新 tools 映像使用的 base 映像(Perl 或 `libc6` 版本)時,必須重新檢查這個步驟。 ## 7. 發布與選用 diff --git a/scripts/security/standalone-security-package-inventory.mts b/scripts/security/standalone-security-package-inventory.mts index 616076623b5..c08923519d8 100644 --- a/scripts/security/standalone-security-package-inventory.mts +++ b/scripts/security/standalone-security-package-inventory.mts @@ -5,6 +5,12 @@ const CURRENT_PYTHON_HTMLPARSER_FIX_PACKAGE = "nemoclaw-python3.13-htmlparser-fix=3.13.5-2+deb13u5+nemoclaw1"; const PINNED_HERMES_BASE_PYTHON_HTMLPARSER_FIX_PACKAGE = "nemoclaw-python3.13-htmlparser-fix=3.13.5-2+deb13u4+nemoclaw1"; +// The digest-pinned Hermes sandbox base predates these Debian updates. +const PINNED_HERMES_BASE_SECURITY_PACKAGE_OVERRIDES: ReadonlyMap = new Map([ + [CURRENT_PYTHON_HTMLPARSER_FIX_PACKAGE, PINNED_HERMES_BASE_PYTHON_HTMLPARSER_FIX_PACKAGE], + ["libc6=2.41-12+deb13u5", "libc6=2.41-12+deb13u4"], + ["libc-bin=2.41-12+deb13u5", "libc-bin=2.41-12+deb13u4"], +]); const SHARED_LIBEXPAT_PACKAGE = "libexpat1=2.8.3-1"; // Only the OpenClaw base installs the Debian security update (#19). const OPENCLAW_LIBEXPAT_PACKAGE = "libexpat1=2.9.0-1~deb13u1"; @@ -20,8 +26,8 @@ const OPENCLAW_SECURITY_PACKAGE_OVERRIDES: ReadonlyMap = new Map const SANDBOX_BASE_SECURITY_PACKAGE_INVENTORY = [ SHARED_ZLIB_PACKAGE, - "libc6=2.41-12+deb13u4", - "libc-bin=2.41-12+deb13u4", + "libc6=2.41-12+deb13u5", + "libc-bin=2.41-12+deb13u5", "bsdutils=1:2.41.5-0+deb13u1", "login=1:4.16.0-2+really2.41.5-0+deb13u1", "mount=2.41.5-0+deb13u1", @@ -48,10 +54,7 @@ const SANDBOX_BASE_SECURITY_PACKAGE_INVENTORY = [ ] as const; const PINNED_HERMES_BASE_SECURITY_PACKAGE_INVENTORY = SANDBOX_BASE_SECURITY_PACKAGE_INVENTORY.map( - (packageSpec) => - packageSpec === CURRENT_PYTHON_HTMLPARSER_FIX_PACKAGE - ? PINNED_HERMES_BASE_PYTHON_HTMLPARSER_FIX_PACKAGE - : packageSpec, + (packageSpec) => PINNED_HERMES_BASE_SECURITY_PACKAGE_OVERRIDES.get(packageSpec) ?? packageSpec, ); const OPENCLAW_SANDBOX_BASE_SECURITY_PACKAGE_INVENTORY = [ diff --git a/src/lib/sandbox-base-image/security-package-specs.ts b/src/lib/sandbox-base-image/security-package-specs.ts index 32fd7d660cb..a17973471cd 100644 --- a/src/lib/sandbox-base-image/security-package-specs.ts +++ b/src/lib/sandbox-base-image/security-package-specs.ts @@ -5,6 +5,12 @@ const CURRENT_PYTHON_HTMLPARSER_FIX_PACKAGE = "nemoclaw-python3.13-htmlparser-fix=3.13.5-2+deb13u5+nemoclaw1"; const PINNED_HERMES_BASE_PYTHON_HTMLPARSER_FIX_PACKAGE = "nemoclaw-python3.13-htmlparser-fix=3.13.5-2+deb13u4+nemoclaw1"; +// The digest-pinned Hermes sandbox base predates these Debian updates. +const PINNED_HERMES_BASE_SECURITY_PACKAGE_OVERRIDES: ReadonlyMap = new Map([ + [CURRENT_PYTHON_HTMLPARSER_FIX_PACKAGE, PINNED_HERMES_BASE_PYTHON_HTMLPARSER_FIX_PACKAGE], + ["libc6=2.41-12+deb13u5", "libc6=2.41-12+deb13u4"], + ["libc-bin=2.41-12+deb13u5", "libc-bin=2.41-12+deb13u4"], +]); const SHARED_LIBEXPAT_PACKAGE = "libexpat1=2.8.3-1"; // Only the OpenClaw base installs the Debian security update (#19). const OPENCLAW_LIBEXPAT_PACKAGE = "libexpat1=2.9.0-1~deb13u1"; @@ -20,8 +26,8 @@ const OPENCLAW_SECURITY_PACKAGE_OVERRIDES: ReadonlyMap = new Map export const SANDBOX_BASE_SECURITY_PACKAGE_INVENTORY = [ SHARED_ZLIB_PACKAGE, - "libc6=2.41-12+deb13u4", - "libc-bin=2.41-12+deb13u4", + "libc6=2.41-12+deb13u5", + "libc-bin=2.41-12+deb13u5", "bsdutils=1:2.41.5-0+deb13u1", "login=1:4.16.0-2+really2.41.5-0+deb13u1", "mount=2.41.5-0+deb13u1", @@ -48,10 +54,8 @@ export const SANDBOX_BASE_SECURITY_PACKAGE_INVENTORY = [ ] as const; export const PINNED_HERMES_BASE_SECURITY_PACKAGE_INVENTORY = - SANDBOX_BASE_SECURITY_PACKAGE_INVENTORY.map((packageSpec) => - packageSpec === CURRENT_PYTHON_HTMLPARSER_FIX_PACKAGE - ? PINNED_HERMES_BASE_PYTHON_HTMLPARSER_FIX_PACKAGE - : packageSpec, + SANDBOX_BASE_SECURITY_PACKAGE_INVENTORY.map( + (packageSpec) => PINNED_HERMES_BASE_SECURITY_PACKAGE_OVERRIDES.get(packageSpec) ?? packageSpec, ); export const OPENCLAW_SANDBOX_BASE_SECURITY_PACKAGE_INVENTORY = [ diff --git a/test/helpers/base-apt-security-functions.ts b/test/helpers/base-apt-security-functions.ts index 33c3c247494..a9cf9f439c2 100644 --- a/test/helpers/base-apt-security-functions.ts +++ b/test/helpers/base-apt-security-functions.ts @@ -105,8 +105,8 @@ export function baseAptSecurityFunctions( ` zlib1g) printf "${packages.zlib1gVersion}" ;;`, ' apt) printf "3.0.4" ;;', ' libapt-pkg7.0) printf "3.0.4" ;;', - ' libc6) printf "2.41-12+deb13u4" ;;', - ' libc-bin) printf "2.41-12+deb13u4" ;;', + ' libc6) printf "2.41-12+deb13u5" ;;', + ' libc-bin) printf "2.41-12+deb13u5" ;;', ' bsdutils) printf "1:2.41.5-0+deb13u1" ;;', ' login) printf "1:4.16.0-2+really2.41.5-0+deb13u1" ;;', ' mount) printf "2.41.5-0+deb13u1" ;;', diff --git a/test/helpers/onboard-script-mocks.cjs b/test/helpers/onboard-script-mocks.cjs index e32e4165e3c..232ec8058d4 100644 --- a/test/helpers/onboard-script-mocks.cjs +++ b/test/helpers/onboard-script-mocks.cjs @@ -71,7 +71,7 @@ const OPENCLAW_SECURITY_INVENTORY_PROBE = [ 'test -f "$security_inventory"', 'test ! -L "$security_inventory"', `test "$(stat -c '%u:%g:%a' "$security_inventory")" = "0:0:444"`, - `printf '%s\\n' "architecture=$arch" "zlib1g=1:1.3.dfsg+really1.3.1-1+deb13u1" "libc6=2.41-12+deb13u4" "libc-bin=2.41-12+deb13u4" "bsdutils=1:2.41.5-0+deb13u1" "login=1:4.16.0-2+really2.41.5-0+deb13u1" "mount=2.41.5-0+deb13u1" "util-linux=2.41.5-0+deb13u1" "libblkid1=2.41.5-0+deb13u1" "liblastlog2-2=2.41.5-0+deb13u1" "libmount1=2.41.5-0+deb13u1" "libsmartcols1=2.41.5-0+deb13u1" "libuuid1=2.41.5-0+deb13u1" "libpcre2-8-0=10.46-1~deb13u3" "libsqlite3-0=3.46.1-7+deb13u2" "gzip=1.13-1+deb13u1" "libexpat1=2.9.0-1~deb13u1" "libonig5=6.9.9-1+b1" "libjq1=1.8.2-1" "jq=1.8.2-1" "vim-common=2:9.2.0858-1" "vim-tiny=2:9.2.0858-1" "libssh2-1t64=1.11.1-1+deb13u2+nemoclaw2" "libssl3t64=3.5.7-1~deb13u3" "nemoclaw-python3.13-htmlparser-fix=3.13.5-2+deb13u5+nemoclaw1" "perl-base=5.44.0-1nemoclaw1" "perl=5.44.0-1nemoclaw1" "libevent-core-2.1-7t64=2.1.13-stable-1" "apt=3.0.4" "libapt-pkg7.0=3.0.4" | cmp -s - "$security_inventory"`, + `printf '%s\\n' "architecture=$arch" "zlib1g=1:1.3.dfsg+really1.3.1-1+deb13u1" "libc6=2.41-12+deb13u5" "libc-bin=2.41-12+deb13u5" "bsdutils=1:2.41.5-0+deb13u1" "login=1:4.16.0-2+really2.41.5-0+deb13u1" "mount=2.41.5-0+deb13u1" "util-linux=2.41.5-0+deb13u1" "libblkid1=2.41.5-0+deb13u1" "liblastlog2-2=2.41.5-0+deb13u1" "libmount1=2.41.5-0+deb13u1" "libsmartcols1=2.41.5-0+deb13u1" "libuuid1=2.41.5-0+deb13u1" "libpcre2-8-0=10.46-1~deb13u3" "libsqlite3-0=3.46.1-7+deb13u2" "gzip=1.13-1+deb13u1" "libexpat1=2.9.0-1~deb13u1" "libonig5=6.9.9-1+b1" "libjq1=1.8.2-1" "jq=1.8.2-1" "vim-common=2:9.2.0858-1" "vim-tiny=2:9.2.0858-1" "libssh2-1t64=1.11.1-1+deb13u2+nemoclaw2" "libssl3t64=3.5.7-1~deb13u3" "nemoclaw-python3.13-htmlparser-fix=3.13.5-2+deb13u5+nemoclaw1" "perl-base=5.44.0-1nemoclaw1" "perl=5.44.0-1nemoclaw1" "libevent-core-2.1-7t64=2.1.13-stable-1" "apt=3.0.4" "libapt-pkg7.0=3.0.4" | cmp -s - "$security_inventory"`, `test "$(node -p 'process.versions.node')" = "24.22.1"`, 'while IFS="=" read -r package version; do', ' if [ "$package" = architecture ]; then continue; fi', diff --git a/test/runtime/sandbox/sandbox-base-security-packages.test.ts b/test/runtime/sandbox/sandbox-base-security-packages.test.ts index fc4cc26e09b..b0459e196de 100644 --- a/test/runtime/sandbox/sandbox-base-security-packages.test.ts +++ b/test/runtime/sandbox/sandbox-base-security-packages.test.ts @@ -68,8 +68,8 @@ const SECURITY_IMAGES = [ const ARCHITECTURES = ["amd64", "arm64"] as const; const EXPECTED_SECURITY_PACKAGE_INVENTORY = [ "zlib1g=1:1.3.dfsg+really1.3.1-1+b1+nemoclaw1", - "libc6=2.41-12+deb13u4", - "libc-bin=2.41-12+deb13u4", + "libc6=2.41-12+deb13u5", + "libc-bin=2.41-12+deb13u5", "bsdutils=1:2.41.5-0+deb13u1", "login=1:4.16.0-2+really2.41.5-0+deb13u1", "mount=2.41.5-0+deb13u1", @@ -106,11 +106,16 @@ const EXPECTED_OPENCLAW_SECURITY_PACKAGE_INVENTORY = [ "apt=3.0.4", "libapt-pkg7.0=3.0.4", ] as const; +const PUBLISHED_HERMES_SECURITY_PACKAGE_OVERRIDES = new Map([ + [ + "nemoclaw-python3.13-htmlparser-fix=3.13.5-2+deb13u5+nemoclaw1", + "nemoclaw-python3.13-htmlparser-fix=3.13.5-2+deb13u4+nemoclaw1", + ], + ["libc6=2.41-12+deb13u5", "libc6=2.41-12+deb13u4"], + ["libc-bin=2.41-12+deb13u5", "libc-bin=2.41-12+deb13u4"], +]); const PUBLISHED_HERMES_SECURITY_PACKAGE_INVENTORY = EXPECTED_SECURITY_PACKAGE_INVENTORY.map( - (entry) => - entry === "nemoclaw-python3.13-htmlparser-fix=3.13.5-2+deb13u5+nemoclaw1" - ? "nemoclaw-python3.13-htmlparser-fix=3.13.5-2+deb13u4+nemoclaw1" - : entry, + (entry) => PUBLISHED_HERMES_SECURITY_PACKAGE_OVERRIDES.get(entry) ?? entry, ); const SECURITY_CASES = SECURITY_IMAGES.flatMap((image) => ARCHITECTURES.map((architecture) => [image.name, architecture, image] as const), @@ -287,16 +292,18 @@ function baseAptSecurityFunctionsWithLibeventVersion( ); } -function baseAptSecurityFunctionsWithPythonFixVersion( +/** Installed versions in the digest-pinned Hermes sandbox base. */ +function publishedHermesBaseAptSecurityFunctions( architecture: (typeof ARCHITECTURES)[number], - version: string, - aptPackages: BaseAptImagePackages = SHARED_BASE_APT_PACKAGES, ): string[] { - return baseAptSecurityFunctions(architecture, aptPackages).map((definition) => - definition.replace( - 'nemoclaw-python3.13-htmlparser-fix) printf "3.13.5-2+deb13u5+nemoclaw1"', - `nemoclaw-python3.13-htmlparser-fix) printf "${version}"`, - ), + return baseAptSecurityFunctions(architecture).map((definition) => + definition + .replace( + 'nemoclaw-python3.13-htmlparser-fix) printf "3.13.5-2+deb13u5+nemoclaw1"', + 'nemoclaw-python3.13-htmlparser-fix) printf "3.13.5-2+deb13u4+nemoclaw1"', + ) + .replace('libc6) printf "2.41-12+deb13u5"', 'libc6) printf "2.41-12+deb13u4"') + .replace('libc-bin) printf "2.41-12+deb13u5"', 'libc-bin) printf "2.41-12+deb13u4"'), ); } @@ -624,10 +631,7 @@ describe("sandbox base security packages", () => { "}", ].join("\n"), ...useRealPatchedParser( - baseAptSecurityFunctionsWithPythonFixVersion( - architecture, - "3.13.5-2+deb13u4+nemoclaw1", - ), + publishedHermesBaseAptSecurityFunctions(architecture), prepared.pythonShim, ), ], diff --git a/tools/openclaw-tools-image/apt-packages-browser.txt b/tools/openclaw-tools-image/apt-packages-browser.txt index c1ca2980237..724600f3254 100644 --- a/tools/openclaw-tools-image/apt-packages-browser.txt +++ b/tools/openclaw-tools-image/apt-packages-browser.txt @@ -4,3 +4,6 @@ # On 2026-11-03 trixie-security replaced 156.0.8078.73-1~deb13u1 with # 156.0.8078.79-1~deb13u1 on amd64 and arm64. chromium=156.0.8078.79-1~deb13u1 +# On 2026-11-24, with the base image's controlled packages held, the apt 3.0 +# solver no longer selected chromium-common for chromium on its own (#85). +chromium-common=156.0.8078.79-1~deb13u1 From c3e1d0b3fc03c1c176c6edbd478cf876ca04c38b Mon Sep 17 00:00:00 2001 From: Derek Hsu Date: Tue, 24 Nov 2026 15:51:34 +0800 Subject: [PATCH 2/3] fix(images): pass the image checks after the Debian pin update CI on #86 showed three more failures once the images built again. - Deep Agents Code: build the PR base from its Dockerfile.base. The pinned upstream base predates glibc 2.41-12+deb13u5. - Tools images: pin chromium and chromium-common at the trixie-security release 156.0.8078.108-1~deb13u1, which fixes the HIGH findings in 156.0.8078.79. - OpenClaw Standard: move Homebrew to 7.0.16. Its portable Ruby 4.0.10 carries msgpack 1.8.7 (CVE-2026-126366) and json 3.1.0, so the CVE-2026-33210 exception no longer matches a finding and is removed. Refs #85 Signed-off-by: Derek Hsu Co-Authored-By: Claude Opus 5.5 --- .github/workflows/managed-images.yaml | 7 ++++--- Dockerfile.base | 2 +- ci/trivy-standard-image-exceptions.json | 19 +------------------ .../2026-10-31-openclaw-tools-image.md | 2 +- .../openclaw-2026.9.2-dependency-review.md | 12 +++++++++--- ...managed-image-publication-workflow.test.ts | 10 +++++++--- .../apt-packages-browser.txt | 12 ++++++------ .../fixtures/run-phase3.sh | 2 +- 8 files changed, 30 insertions(+), 36 deletions(-) diff --git a/.github/workflows/managed-images.yaml b/.github/workflows/managed-images.yaml index febdc95ba21..10048cb2f33 100644 --- a/.github/workflows/managed-images.yaml +++ b/.github/workflows/managed-images.yaml @@ -86,9 +86,10 @@ jobs: - agent: langchain-deepagents-code display_name: Deep Agents Code dockerfile: agents/langchain-deepagents-code/Dockerfile - # Upstream :latest ships deepagents-code 0.1.87; this fork pins 0.1.71, so pip check fails. - # Remove the pin after #22. - base_alias: ghcr.io/nvidia/nemoclaw/langchain-deepagents-code-sandbox-base@sha256:35ec718bc6a86c3b38b599a77239c5e917b20dbbbe20cc36e1f05262509d89b5 + # Deep Agents Code builds its PR base from its Dockerfile.base. Upstream + # :latest ships deepagents-code 0.1.87, but this fork pins 0.1.71 (#22), + # and the last compatible upstream base predates glibc 2.41-12+deb13u5 (#85). + base_dockerfile: agents/langchain-deepagents-code/Dockerfile.base base_repository: ghcr.io/nvidia/nemoclaw/langchain-deepagents-code-sandbox-base image: nemoclaw-managed-pr/langchain-deepagents-code repository: ghcr.io/nvidia/nemoclaw/langchain-deepagents-code-sandbox diff --git a/Dockerfile.base b/Dockerfile.base index 039e3ecf137..4d12ee5cddb 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -706,7 +706,7 @@ RUN if [ "$OPENCLAW_VERSION" = "2026.7.1" ]; then \ # OpenClaw Standard Verify pull-request check when a Homebrew bump stops # honouring it. # - HOMEBREW_NO_ENV_HINTS: keeps install output short. -ARG HOMEBREW_VERSION=7.0.12 +ARG HOMEBREW_VERSION=7.0.16 RUN mkdir -p /home/linuxbrew/.linuxbrew/bin \ && chown -R sandbox:sandbox /home/linuxbrew \ && /usr/bin/setpriv --reuid=sandbox --regid=sandbox --init-groups -- \ diff --git a/ci/trivy-standard-image-exceptions.json b/ci/trivy-standard-image-exceptions.json index fbb3f732894..f226765ed30 100644 --- a/ci/trivy-standard-image-exceptions.json +++ b/ci/trivy-standard-image-exceptions.json @@ -1,21 +1,4 @@ { "schemaVersion": 1, - "exceptions": [ - { - "vulnerability": "CVE-2026-33210", - "package": "json", - "installedVersion": "2.18.0", - "severity": "CRITICAL", - "pkgPath": "home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/4.0.9/lib/ruby/gems/4.0.0/specifications/default/json-2.18.0.gemspec", - "decision": "not-affected", - "owner": "derekhsu", - "expires": "2026-12-03", - "trackingIssue": "https://github.com/NVIDIA/NemoClaw/issues/14092", - "rationale": "json 2.18.0 is a default gem of Homebrew 7.0.12's portable Ruby 4.0.9, and Homebrew main ships the same portable Ruby. GHSA-3m6g-2423-7cp3 applies only when a caller parses with `allow_duplicate_key: false`; Homebrew 7.0.12 passes only `allow_duplicate_key: true` (livecheck/strategy/json.rb). Remove this entry when Homebrew bumps portable Ruby to a release with json 2.19.2 or later.", - "compensatingControls": [ - "Homebrew and its portable Ruby run as the unprivileged sandbox user inside the OpenShell Landlock and network policy.", - "The OpenClaw Standard Verify gate fails when this entry expires or no longer matches a finding." - ] - } - ] + "exceptions": [] } diff --git a/docs/modification/2026-10-31-openclaw-tools-image.md b/docs/modification/2026-10-31-openclaw-tools-image.md index 095860f977f..95d78412f24 100644 --- a/docs/modification/2026-10-31-openclaw-tools-image.md +++ b/docs/modification/2026-10-31-openclaw-tools-image.md @@ -67,7 +67,7 @@ Debian 套件在 amd64 與 arm64 上的版本相同。 | PDF 與轉檔 | `pandoc 3.1.11.1+ds-2`、`poppler-utils 25.03.0-5+deb13u4`、`qpdf 12.2.0-1`、`ghostscript 10.05.1~dfsg-1+deb13u3` | | OCR | `tesseract-ocr 5.5.0-1+b1`;語言資料 `eng`、`chi-tra`、`chi-sim` `1:4.1.0-2` | | 圖片與影音 | `imagemagick 8:7.1.1.43+dfsg1-1+deb13u14`(提供 `magick`)、`ffmpeg 7:7.1.5-0+deb13u1`(含 `ffprobe`)、`libimage-exiftool-perl 13.25+dfsg-1` | -| 瀏覽器 | `chromium`、`chromium-common` `156.0.8078.79-1~deb13u1`,固定在 `apt-packages-browser.txt` | +| 瀏覽器 | `chromium`、`chromium-common` `156.0.8078.108-1~deb13u1`,固定在 `apt-packages-browser.txt` | | 字型 | `fontconfig 2.15.0-2.3`、`fonts-noto-cjk 1:20240730+repack1-1`、`fonts-liberation 1:2.1.5-3`、`fonts-dejavu-core 2.37-8` | | Workspace | `zip 3.0-15+deb13u1`、`unzip 6.0-29+deb13u1`、`ripgrep 14.1.1-1+b4`、`sqlite3 3.46.1-7+deb13u2` | | 執行期函式庫 | `libicu76 76.1-4`(officecli 需要) | diff --git a/docs/security/openclaw-2026.9.2-dependency-review.md b/docs/security/openclaw-2026.9.2-dependency-review.md index 49dd7d5198d..a611a99c252 100644 --- a/docs/security/openclaw-2026.9.2-dependency-review.md +++ b/docs/security/openclaw-2026.9.2-dependency-review.md @@ -335,11 +335,11 @@ The OpenClaw Standard Verify scan of the r4 candidate reports one new fixable fi | --- | --- | --- | --- | | `CVE-2026-33210` (CRITICAL, GHSA-3m6g-2423-7cp3) | `json` `2.18.0` default gem | `/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/4.0.9/` | `2.19.2` | -Homebrew `7.0.12` and Homebrew `main` both ship portable Ruby `4.0.9`, so no Homebrew release contains the fix. +At r4, Homebrew `7.0.12` and Homebrew `main` both shipped portable Ruby `4.0.9`, so no Homebrew release contained the fix. The advisory applies only when a caller parses JSON with `allow_duplicate_key: false`. Homebrew `7.0.12` passes only `allow_duplicate_key: true`, in `Library/Homebrew/livecheck/strategy/json.rb`. -`ci/trivy-standard-image-exceptions.json` records a `not-affected` exception for this finding. +`ci/trivy-standard-image-exceptions.json` recorded a `not-affected` exception for this finding until Homebrew `7.0.16` (#85). `scripts/security/reject-fixable-trivy-findings.sh` applies it with these rules: - An entry matches one finding exactly: vulnerability ID, package, installed version, severity, and package path. @@ -347,7 +347,13 @@ Homebrew `7.0.12` passes only `allow_duplicate_key: true`, in `Library/Homebrew/ - A malformed, duplicate, expired, or unused entry fails the gate. - Every other fixable CRITICAL or HIGH finding still fails the gate. -Remove the entry when Homebrew ships a portable Ruby with `json` `2.19.2` or later, and bump `HOMEBREW_VERSION` to that release. +### Homebrew 7.0.16 (#85) + +Homebrew `7.0.16` ships portable Ruby `4.0.10`, which carries `json` `3.1.0` and `msgpack` `1.8.7`. +`Dockerfile.base` now pins `HOMEBREW_VERSION=7.0.16`, and `ci/trivy-standard-image-exceptions.json` no longer holds the `CVE-2026-33210` entry. + +The bump also fixes `CVE-2026-126366` (HIGH) in `msgpack` `1.8.5`, which portable Ruby `4.0.9` carries. +The OpenClaw Standard Verify scan reported it on November 24, 2026. ## Debian zlib and apt Updates diff --git a/test/managed-image-publication-workflow.test.ts b/test/managed-image-publication-workflow.test.ts index 02c236ba5fd..40886c68f5d 100644 --- a/test/managed-image-publication-workflow.test.ts +++ b/test/managed-image-publication-workflow.test.ts @@ -464,10 +464,14 @@ describe("complete managed-image publication workflow", () => { "Dockerfile.base", ); expect(matrix.find(({ agent }) => agent === "openclaw")?.base_alias).toBeUndefined(); - // Pinned to the last upstream base index that passes pip check with the fork's Deep Agents Code version (#22). - expect(matrix.find(({ agent }) => agent === "langchain-deepagents-code")?.base_alias).toBe( - "ghcr.io/nvidia/nemoclaw/langchain-deepagents-code-sandbox-base@sha256:35ec718bc6a86c3b38b599a77239c5e917b20dbbbe20cc36e1f05262509d89b5", + // The fork pins Deep Agents Code 0.1.71 (#22), and the last compatible + // upstream base predates the fork's glibc security inventory (#85). + expect(matrix.find(({ agent }) => agent === "langchain-deepagents-code")?.base_dockerfile).toBe( + "agents/langchain-deepagents-code/Dockerfile.base", ); + expect( + matrix.find(({ agent }) => agent === "langchain-deepagents-code")?.base_alias, + ).toBeUndefined(); expect(step(prBuilder, "Build PR source base").if).toBe("matrix.base_dockerfile"); expect(step(prBuilder, "Build PR source base").with).toMatchObject({ file: "${{ matrix.base_dockerfile }}", diff --git a/tools/openclaw-tools-image/apt-packages-browser.txt b/tools/openclaw-tools-image/apt-packages-browser.txt index 724600f3254..a486c1eb26d 100644 --- a/tools/openclaw-tools-image/apt-packages-browser.txt +++ b/tools/openclaw-tools-image/apt-packages-browser.txt @@ -1,9 +1,9 @@ # Browser packages for the OpenClaw tools image (issue #16, Phase 3). # Resolved together with apt-packages.txt on 2026-10-30; same version on # amd64 and arm64. Rechecked together with apt-packages.txt on 2026-11-03. -# On 2026-11-03 trixie-security replaced 156.0.8078.73-1~deb13u1 with -# 156.0.8078.79-1~deb13u1 on amd64 and arm64. -chromium=156.0.8078.79-1~deb13u1 -# On 2026-11-24, with the base image's controlled packages held, the apt 3.0 -# solver no longer selected chromium-common for chromium on its own (#85). -chromium-common=156.0.8078.79-1~deb13u1 +# On 2026-11-24 trixie-security replaced 156.0.8078.79-1~deb13u1 with +# 156.0.8078.108-1~deb13u1 on amd64 and arm64 (#85). Pin chromium-common +# with chromium: apt 3.0 does not pick an older chromium-common on its own +# while the base image's controlled packages are held. +chromium=156.0.8078.108-1~deb13u1 +chromium-common=156.0.8078.108-1~deb13u1 diff --git a/tools/openclaw-tools-image/fixtures/run-phase3.sh b/tools/openclaw-tools-image/fixtures/run-phase3.sh index 8f23d29a11f..c6e20fba139 100755 --- a/tools/openclaw-tools-image/fixtures/run-phase3.sh +++ b/tools/openclaw-tools-image/fixtures/run-phase3.sh @@ -57,7 +57,7 @@ PY chromium_cli() { write_page - chromium --version | grep -F 156.0.8078.79 + chromium --version | grep -F 156.0.8078.108 chromium --headless --no-sandbox --disable-gpu --disable-dev-shm-usage \ --user-data-dir="$WORK/chromium-profile" --window-size=800,600 \ --screenshot="$WORK/chromium-cli.png" "file://$WORK/page.html" From 995d0836344bad8945df42001512cec61315fac6 Mon Sep 17 00:00:00 2001 From: Derek Hsu Date: Tue, 24 Nov 2026 15:58:36 +0800 Subject: [PATCH 3/3] ci(images): keep the pinned Deep Agents Code PR base The fork's agents/langchain-deepagents-code/Dockerfile.base copies four files that the fork does not have, so the PR build cannot build its base from it. Restore the pinned upstream base. Its glibc deb13u4 no longer matches the security inventory; #87 tracks that check. Refs #85 Signed-off-by: Derek Hsu Co-Authored-By: Claude Opus 5.5 --- .github/workflows/managed-images.yaml | 7 +++---- test/managed-image-publication-workflow.test.ts | 10 +++------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/managed-images.yaml b/.github/workflows/managed-images.yaml index 10048cb2f33..febdc95ba21 100644 --- a/.github/workflows/managed-images.yaml +++ b/.github/workflows/managed-images.yaml @@ -86,10 +86,9 @@ jobs: - agent: langchain-deepagents-code display_name: Deep Agents Code dockerfile: agents/langchain-deepagents-code/Dockerfile - # Deep Agents Code builds its PR base from its Dockerfile.base. Upstream - # :latest ships deepagents-code 0.1.87, but this fork pins 0.1.71 (#22), - # and the last compatible upstream base predates glibc 2.41-12+deb13u5 (#85). - base_dockerfile: agents/langchain-deepagents-code/Dockerfile.base + # Upstream :latest ships deepagents-code 0.1.87; this fork pins 0.1.71, so pip check fails. + # Remove the pin after #22. + base_alias: ghcr.io/nvidia/nemoclaw/langchain-deepagents-code-sandbox-base@sha256:35ec718bc6a86c3b38b599a77239c5e917b20dbbbe20cc36e1f05262509d89b5 base_repository: ghcr.io/nvidia/nemoclaw/langchain-deepagents-code-sandbox-base image: nemoclaw-managed-pr/langchain-deepagents-code repository: ghcr.io/nvidia/nemoclaw/langchain-deepagents-code-sandbox diff --git a/test/managed-image-publication-workflow.test.ts b/test/managed-image-publication-workflow.test.ts index 40886c68f5d..02c236ba5fd 100644 --- a/test/managed-image-publication-workflow.test.ts +++ b/test/managed-image-publication-workflow.test.ts @@ -464,14 +464,10 @@ describe("complete managed-image publication workflow", () => { "Dockerfile.base", ); expect(matrix.find(({ agent }) => agent === "openclaw")?.base_alias).toBeUndefined(); - // The fork pins Deep Agents Code 0.1.71 (#22), and the last compatible - // upstream base predates the fork's glibc security inventory (#85). - expect(matrix.find(({ agent }) => agent === "langchain-deepagents-code")?.base_dockerfile).toBe( - "agents/langchain-deepagents-code/Dockerfile.base", + // Pinned to the last upstream base index that passes pip check with the fork's Deep Agents Code version (#22). + expect(matrix.find(({ agent }) => agent === "langchain-deepagents-code")?.base_alias).toBe( + "ghcr.io/nvidia/nemoclaw/langchain-deepagents-code-sandbox-base@sha256:35ec718bc6a86c3b38b599a77239c5e917b20dbbbe20cc36e1f05262509d89b5", ); - expect( - matrix.find(({ agent }) => agent === "langchain-deepagents-code")?.base_alias, - ).toBeUndefined(); expect(step(prBuilder, "Build PR source base").if).toBe("matrix.base_dockerfile"); expect(step(prBuilder, "Build PR source base").with).toMatchObject({ file: "${{ matrix.base_dockerfile }}",