@@ -2,7 +2,7 @@ FROM node:24.18.0-bookworm-slim@sha256:6f7b03f7c2c8e2e784dcf9295400527b9b1270fd3
22
33ARG CODE_SERVER_VERSION=4.128.0
44ARG CODE_SERVER_SHA256=79ba26bf186e5268a22b7c17b30a5f288a16c37791f0b86c27859e8fef103188
5- ARG DEBIAN_SNAPSHOT=20260718T000000Z
5+ ARG DEBIAN_SNAPSHOT=20260722T000000Z
66
77# Daytona injects its own daemon (host-mounted, PID 1) and overrides ENTRYPOINT,
88# so we do NOT bake a sandbox daemon. Headed Chromium uses Xvfb, which the
@@ -33,16 +33,35 @@ RUN set -eux; \
3333
3434COPY package-manager/package.json package-manager/package-lock.json /opt/cheatcode-package-manager/
3535COPY doc-runtime/package.json doc-runtime/package-lock.json /opt/cheatcode-doc-runtime/
36+ # npm, pnpm, and code-server ship their own dependency trees, so ordinary
37+ # top-level overrides cannot replace vulnerable packages inside those bundles.
38+ COPY runtime-security-overrides/package.json runtime-security-overrides/package-lock.json /opt/cheatcode-runtime-security-overrides/
3639COPY skill-runtime/package.json skill-runtime/package-lock.json skill-runtime/tsconfig.json /opt/cheatcode-skill-runtime/
3740COPY skill-runtime/bin/ /opt/cheatcode-skill-runtime/bin/
3841COPY skill-runtime/src/ /opt/cheatcode-skill-runtime/src/
42+ WORKDIR /opt/cheatcode-runtime-security-overrides
43+ RUN npm ci --omit=dev --ignore-scripts --no-audit --no-fund
3944WORKDIR /opt/cheatcode-package-manager
4045RUN npm ci --omit=dev --ignore-scripts --no-audit --no-fund \
4146 && rm -rf /usr/local/lib/node_modules/npm \
4247 && ln -sf /opt/cheatcode-package-manager/node_modules/.bin/npm /usr/local/bin/npm \
4348 && ln -sf /opt/cheatcode-package-manager/node_modules/.bin/npx /usr/local/bin/npx \
4449 && ln -sf /opt/cheatcode-package-manager/node_modules/.bin/pnpm /usr/local/bin/pnpm \
45- && ln -sf /opt/cheatcode-package-manager/node_modules/.bin/pnpx /usr/local/bin/pnpx
50+ && ln -sf /opt/cheatcode-package-manager/node_modules/.bin/pnpx /usr/local/bin/pnpx \
51+ && rm -rf \
52+ /opt/cheatcode-package-manager/node_modules/npm/node_modules/brace-expansion \
53+ /opt/cheatcode-package-manager/node_modules/npm/node_modules/tar \
54+ /opt/cheatcode-package-manager/node_modules/pnpm/artifacts/exe/dist/node_modules/tar \
55+ /opt/cheatcode-package-manager/node_modules/pnpm/dist/node_modules/tar \
56+ && cp -a /opt/cheatcode-runtime-security-overrides/node_modules/brace-expansion \
57+ /opt/cheatcode-package-manager/node_modules/npm/node_modules/brace-expansion \
58+ && cp -a /opt/cheatcode-runtime-security-overrides/node_modules/tar \
59+ /opt/cheatcode-package-manager/node_modules/npm/node_modules/tar \
60+ && cp -a /opt/cheatcode-runtime-security-overrides/node_modules/tar \
61+ /opt/cheatcode-package-manager/node_modules/pnpm/artifacts/exe/dist/node_modules/tar \
62+ && cp -a /opt/cheatcode-runtime-security-overrides/node_modules/tar \
63+ /opt/cheatcode-package-manager/node_modules/pnpm/dist/node_modules/tar \
64+ && rm -f /opt/cheatcode-package-manager/package-lock.json
4665WORKDIR /opt/cheatcode-doc-runtime
4766RUN npm ci --omit=dev --ignore-scripts --no-audit --no-fund \
4867 && npm cache clean --force
@@ -61,7 +80,17 @@ RUN curl -fsSL \
6180 && echo "${CODE_SERVER_SHA256} /tmp/code-server.tar.gz" | sha256sum --check --strict \
6281 && tar -xzf /tmp/code-server.tar.gz -C /opt \
6382 && ln -sf "/opt/code-server-${CODE_SERVER_VERSION}-linux-amd64/bin/code-server" /usr/local/bin/code-server \
64- && rm -f /tmp/code-server.tar.gz
83+ && rm -f /tmp/code-server.tar.gz \
84+ && rm -rf \
85+ "/opt/code-server-${CODE_SERVER_VERSION}-linux-amd64/node_modules/js-yaml" \
86+ "/opt/code-server-${CODE_SERVER_VERSION}-linux-amd64/lib/vscode/node_modules/shell-quote" \
87+ "/opt/code-server-${CODE_SERVER_VERSION}-linux-amd64/lib/vscode/node_modules/tar" \
88+ && cp -a /opt/cheatcode-runtime-security-overrides/node_modules/js-yaml \
89+ "/opt/code-server-${CODE_SERVER_VERSION}-linux-amd64/node_modules/js-yaml" \
90+ && cp -a /opt/cheatcode-runtime-security-overrides/node_modules/shell-quote \
91+ "/opt/code-server-${CODE_SERVER_VERSION}-linux-amd64/lib/vscode/node_modules/shell-quote" \
92+ && cp -a /opt/cheatcode-runtime-security-overrides/node_modules/tar \
93+ "/opt/code-server-${CODE_SERVER_VERSION}-linux-amd64/lib/vscode/node_modules/tar"
6594
6695COPY requirements.txt /tmp/requirements.txt
6796RUN pip3 install --break-system-packages --disable-pip-version-check --no-cache-dir \
0 commit comments