diff --git a/Dockerfile b/Dockerfile index 54c35b28db1..a7e8fabbfd9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,6 @@ # Build the base first when GHCR is unavailable: # docker build -f Dockerfile.base -t ghcr.io/nvidia/nemoclaw/sandbox-base:latest . -# Global ARG values precede FROM so every stage can use them. ARG BASE_IMAGE=ghcr.io/nvidia/nemoclaw/sandbox-base:latest ARG NEMOCLAW_CORPORATE_CA_B64= ARG NEMOCLAW_MANAGED_IMAGE_CAPABILITY_UNION=0 @@ -14,7 +13,7 @@ ARG CODEX_ACP_LINUX_ARM64_0_11_1_INTEGRITY=sha512-I1f6WoSLbLlsWq4zH+vtwdoc4Y41mq FROM scratch AS reviewed-npm-archive ADD --chmod=0444 --checksum=sha256:5dbb86c71d07a1957f2e90734092dd6a58bdcd9ebc2d8d41ca1c6e6a21d364e1 https://registry.npmjs.org/npm/-/npm-12.0.2.tgz /npm-12.0.2.tgz FROM node:24.22.1-trixie-slim@sha256:43b9ba1142b8dcf33fa8f922ca1be85714adc444e0586c7cf7726daaeabc1bea AS npm12 -RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates=20250419 curl=8.14.1-2+deb13u7 && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates=20250419+deb13u1 curl=8.14.1-2+deb13u7 && rm -rf /var/lib/apt/lists/* COPY scripts/lib/install-openclaw-migration-runtimes.sh scripts/lib/reviewed-npm-archive.mts scripts/lib/bundled-npm-package.mts scripts/lib/reviewed-npm-audit.mts scripts/lib/patch-bundled-npm-ip-address.mts scripts/lib/reviewed-npm-identity.mts /scripts/lib/ COPY scripts/lib/patch-bundled-npm-undici.mts scripts/lib/remediate-openclaw-runtime-dependencies.mts /scripts/lib/ COPY scripts/lib/openclaw-npm-remediation.mts scripts/lib/patch-openclaw-dependency-overrides.mts /scripts/lib/ diff --git a/Dockerfile.base b/Dockerfile.base index b1b52f4e228..020cb6656ff 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 @@ -128,14 +128,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/agents/hermes/Dockerfile b/agents/hermes/Dockerfile index eedc50d24be..4d1768d7ad1 100644 --- a/agents/hermes/Dockerfile +++ b/agents/hermes/Dockerfile @@ -6,7 +6,7 @@ # Layers PR-specific code (plugin, config, startup script) on top of the # pre-built Hermes base image. Mirrors the OpenClaw Dockerfile structure. -ARG BASE_IMAGE=ghcr.io/nvidia/nemoclaw/hermes-sandbox-base@sha256:4574777698fa65e270f53ee4c6fca90640cc89867e7dcc726c2ca03429d4ed8b +ARG BASE_IMAGE=ghcr.io/nvidia/nemoclaw/hermes-sandbox-base@sha256:fd4c0fafa288b6e29911e928a75487fd3c821b7ab2e4bc0eed92fb275f392e3d ARG NEMOCLAW_CORPORATE_CA_B64= ARG NEMOCLAW_MANAGED_IMAGE_CAPABILITY_UNION=0 # BuildKit supplies this automatic platform argument. The Portable staged diff --git a/agents/hermes/Dockerfile.base b/agents/hermes/Dockerfile.base index 5a374bac591..466efd8e800 100644 --- a/agents/hermes/Dockerfile.base +++ b/agents/hermes/Dockerfile.base @@ -28,14 +28,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 @@ -102,14 +102,14 @@ RUN --mount=type=bind,source=scripts/security/security-package-inventory.mts,tar 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/agents/langchain-deepagents-code/Dockerfile.base b/agents/langchain-deepagents-code/Dockerfile.base index 73845d81bae..1e281a10018 100644 --- a/agents/langchain-deepagents-code/Dockerfile.base +++ b/agents/langchain-deepagents-code/Dockerfile.base @@ -20,14 +20,14 @@ ARG NEMOCLAW_CORPORATE_CA_B64 # hadolint ignore=DL4006 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 \ && if [ -n "${NEMOCLAW_CORPORATE_CA_B64:-}" ]; then \ install -d -o root -g root -m 0755 /usr/local/share/nemoclaw /usr/local/share/ca-certificates; \ { printf '%s' "${NEMOCLAW_CORPORATE_CA_B64}" | base64 --decode > /usr/local/share/nemoclaw/corporate-ca.pem 2>/dev/null \ @@ -99,14 +99,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/agents/pi/Dockerfile.base b/agents/pi/Dockerfile.base index 52d13ebd539..9a9d56bb7c5 100644 --- a/agents/pi/Dockerfile.base +++ b/agents/pi/Dockerfile.base @@ -24,14 +24,14 @@ ARG NEMOCLAW_CORPORATE_CA_B64 # hadolint ignore=DL4006 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 \ && if [ -n "${NEMOCLAW_CORPORATE_CA_B64:-}" ]; then \ install -d -o root -g root -m 0755 /usr/local/share/nemoclaw /usr/local/share/ca-certificates; \ { printf '%s' "${NEMOCLAW_CORPORATE_CA_B64}" | base64 --decode > /usr/local/share/nemoclaw/corporate-ca.pem 2>/dev/null \ @@ -103,14 +103,14 @@ RUN --mount=type=bind,source=scripts/security/security-package-inventory.mts,tar python3=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/ci/pi-agent-qualification-v1-linux-amd64.json b/ci/pi-agent-qualification-v1-linux-amd64.json index db2ee7b4867..f463a0fe1cd 100644 --- a/ci/pi-agent-qualification-v1-linux-amd64.json +++ b/ci/pi-agent-qualification-v1-linux-amd64.json @@ -3,13 +3,13 @@ "agent": "pi", "platform": "linux/amd64", "image": "ghcr.io/nvidia/nemoclaw/pi-sandbox", - "digest": "sha256:d2112ac0777406e4a766380994763eace2871a5a4c1d48e03fce0bc4e6a167e2", - "reference": "ghcr.io/nvidia/nemoclaw/pi-sandbox@sha256:d2112ac0777406e4a766380994763eace2871a5a4c1d48e03fce0bc4e6a167e2", + "digest": "sha256:1b4cfca2be5b5c829f1e47b92b50eecf961f17fecf51ded839f20b35c2368d39", + "reference": "ghcr.io/nvidia/nemoclaw/pi-sandbox@sha256:1b4cfca2be5b5c829f1e47b92b50eecf961f17fecf51ded839f20b35c2368d39", "source": { "repository": "NVIDIA/NemoClaw", - "revision": "015c79818d02ede786799dac1a9b3536cfe52cee", - "release": "v0.0.145-9-g015c79818d", - "cohort": "ghrun-44837524030-1" + "revision": "3acbec263ff059c0d2e85caa82118c0d85cb0238", + "release": "v0.0.145-12-g3acbec263f", + "cohort": "ghrun-44923815295-1" }, "startupProfileContractVersion": 1, "capabilityContractVersion": 1 diff --git a/ci/pi-agent-qualification-v1-linux-arm64.json b/ci/pi-agent-qualification-v1-linux-arm64.json index 57a66a2a3d6..350d49678ef 100644 --- a/ci/pi-agent-qualification-v1-linux-arm64.json +++ b/ci/pi-agent-qualification-v1-linux-arm64.json @@ -3,13 +3,13 @@ "agent": "pi", "platform": "linux/arm64", "image": "ghcr.io/nvidia/nemoclaw/pi-sandbox", - "digest": "sha256:ca4118d9a4fcd4f07927d8e39cddc7d47ccfd7a13f4ad05e10f113f07466173d", - "reference": "ghcr.io/nvidia/nemoclaw/pi-sandbox@sha256:ca4118d9a4fcd4f07927d8e39cddc7d47ccfd7a13f4ad05e10f113f07466173d", + "digest": "sha256:d3cdfa6b6a46e82fd81d689e91404360066059708230539736ae88c689d4df50", + "reference": "ghcr.io/nvidia/nemoclaw/pi-sandbox@sha256:d3cdfa6b6a46e82fd81d689e91404360066059708230539736ae88c689d4df50", "source": { "repository": "NVIDIA/NemoClaw", - "revision": "015c79818d02ede786799dac1a9b3536cfe52cee", - "release": "v0.0.145-9-g015c79818d", - "cohort": "ghrun-44837524030-1" + "revision": "3acbec263ff059c0d2e85caa82118c0d85cb0238", + "release": "v0.0.145-12-g3acbec263f", + "cohort": "ghrun-44923815295-1" }, "startupProfileContractVersion": 1, "capabilityContractVersion": 1 diff --git a/scripts/security/standalone-security-package-inventory.mts b/scripts/security/standalone-security-package-inventory.mts index 5593ff8299e..0e3c2b809c6 100644 --- a/scripts/security/standalone-security-package-inventory.mts +++ b/scripts/security/standalone-security-package-inventory.mts @@ -8,8 +8,8 @@ const PINNED_HERMES_BASE_PYTHON_HTMLPARSER_FIX_PACKAGE = const SANDBOX_BASE_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", diff --git a/src/lib/agent/candidate-authority.ts b/src/lib/agent/candidate-authority.ts index 1a97571cd93..0bc4ff6e1e7 100644 --- a/src/lib/agent/candidate-authority.ts +++ b/src/lib/agent/candidate-authority.ts @@ -13,8 +13,8 @@ export const CANDIDATE_QUALIFICATION_RECEIPT_DIGESTS: Readonly< Record > = Object.freeze({ pi: Object.freeze([ - "af37d2d4915ce89e7e414ea7198a4eb93564f319ca91dd6c432e20ca3d7929b3", - "61a175017316528effb187ff25b7d984d7eb0297b1832d12404e8574f41ffc95", + "99448184097d195f3705571d3b276c423931f3e99e7bd486b4996933933e4572", + "9413ec7f193098d4759a2d37368efda5514563dc03d1d3d5133afd4428e9dbc7", ]), }); diff --git a/src/lib/sandbox-base-image/security-package-specs.ts b/src/lib/sandbox-base-image/security-package-specs.ts index 3fa5e48fc8b..bf8f51b04a9 100644 --- a/src/lib/sandbox-base-image/security-package-specs.ts +++ b/src/lib/sandbox-base-image/security-package-specs.ts @@ -8,8 +8,8 @@ const PINNED_HERMES_BASE_PYTHON_HTMLPARSER_FIX_PACKAGE = export const SANDBOX_BASE_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", diff --git a/test/helpers/base-apt-security-functions.ts b/test/helpers/base-apt-security-functions.ts index 07fa8b6c661..64135d7b99b 100644 --- a/test/helpers/base-apt-security-functions.ts +++ b/test/helpers/base-apt-security-functions.ts @@ -57,8 +57,8 @@ export function baseAptSecurityFunctions(architecture: DebianArchitecture): stri ' [[ "$#" -eq 3 && "$1" == "-W" && "$2" == \'-f=${Version}\' ]] || return 64', ' case "$3" in', ' zlib1g) printf "1:1.3.dfsg+really1.3.1-1+b1+nemoclaw1" ;;', - ' 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 e895e716955..26d57f3f310 100644 --- a/test/helpers/onboard-script-mocks.cjs +++ b/test/helpers/onboard-script-mocks.cjs @@ -442,7 +442,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+b1+nemoclaw1" "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.8.3-1" "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" | cmp -s - "$security_inventory"`, + `printf '%s\\n' "architecture=$arch" "zlib1g=1:1.3.dfsg+really1.3.1-1+b1+nemoclaw1" "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.8.3-1" "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" | 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 86bca3da58a..b2beef8b8d0 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", @@ -98,12 +98,34 @@ const EXPECTED_OPENCLAW_SECURITY_PACKAGE_INVENTORY = [ ...EXPECTED_SECURITY_PACKAGE_INVENTORY, "libevent-core-2.1-7t64=2.1.13-stable-1", ] as const; -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, -); +const PUBLISHED_HERMES_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", + "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.8.3-1", + "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+deb13u4+nemoclaw1", + "perl-base=5.44.0-1nemoclaw1", + "perl=5.44.0-1nemoclaw1", +] as const; const SECURITY_CASES = SECURITY_IMAGES.flatMap((image) => ARCHITECTURES.map((architecture) => [image.name, architecture, image] as const), ); @@ -278,15 +300,17 @@ function baseAptSecurityFunctionsWithLibeventVersion( ); } -function baseAptSecurityFunctionsWithPythonFixVersion( +function baseAptSecurityFunctionsForPublishedHermes( architecture: (typeof ARCHITECTURES)[number], - version: string, + glibcVersion: string, ): string[] { 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 "${version}"`, - ), + definition + .replaceAll("2.41-12+deb13u5", glibcVersion) + .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"', + ), ); } @@ -350,7 +374,8 @@ describe("sandbox base security packages", () => { ); const stalePackageCases = [ - ["libc6", "2.41-12+deb13u3"], + ["libc6", "2.41-12+deb13u4"], + ["libc-bin", "2.41-12+deb13u4"], ["util-linux", "2.41-5"], ["login", "1:4.16.0-2+really2.41-5"], ["libpcre2-8-0", "10.46-1~deb13u1"], @@ -538,7 +563,7 @@ describe("sandbox base security packages", () => { ); it.each(ARCHITECTURES)( - "accepts the exact published Hermes Python package on %s", + "rejects Hermes inventory with superseded glibc and pinned Python on %s", (architecture) => { const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "nemoclaw-hermes-published-security-")); const hermes = SECURITY_IMAGES.find((image) => image.name === "Hermes")!; @@ -563,10 +588,49 @@ describe("sandbox base security packages", () => { "}", ].join("\n"), ...useRealPatchedParser( - baseAptSecurityFunctionsWithPythonFixVersion( - architecture, - "3.13.5-2+deb13u4+nemoclaw1", - ), + baseAptSecurityFunctionsForPublishedHermes(architecture, "2.41-12+deb13u4"), + prepared.pythonShim, + ), + ], + { timeoutMs: 15_000 }, + ); + expect(result.status).not.toBe(0); + expect(result.stdout).not.toContain("nemoclaw-security-inventory-ok"); + } finally { + fs.rmSync(tmp, { recursive: true, force: true }); + } + }, + ); + + it.each(ARCHITECTURES)( + "accepts Hermes inventory with refreshed glibc and pinned Python on %s", + (architecture) => { + const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "nemoclaw-hermes-published-security-")); + const hermes = SECURITY_IMAGES.find((image) => image.name === "Hermes")!; + const prepared = completedImageSecurityCommand( + hermes, + tmp, + architecture, + PUBLISHED_HERMES_SECURITY_PACKAGE_INVENTORY.map((spec) => + spec.replace("2.41-12+deb13u4", "2.41-12+deb13u5"), + ), + ); + + try { + const { result } = runLoggedDockerShell( + prepared.command, + tmp, + [ + "perl_base_installed=1", + "perl_installed=1", + [ + "stat() {", + ` [[ "$#" -eq 3 && "$1" == "-c" && "$2" == "%u:%g:%a" && "$3" == ${JSON.stringify(prepared.inventory)} ]] || return 64`, + ' printf "0:0:444\\n"', + "}", + ].join("\n"), + ...useRealPatchedParser( + baseAptSecurityFunctionsForPublishedHermes(architecture, "2.41-12+deb13u5"), prepared.pythonShim, ), ], @@ -576,6 +640,7 @@ describe("sandbox base security packages", () => { status: 0, stderr: "", }); + expect(result.stdout).toContain("nemoclaw-security-inventory-ok"); } finally { fs.rmSync(tmp, { recursive: true, force: true }); }