Conversation
…ib vulnerabilities Adds 'apk update && apk upgrade' to the Dockerfile to resolve: - CVE-2026-22184 (CRITICAL): zlib out-of-bounds write (fixed in zlib 1.3.2-r0) - CVE-2026-27171 (MEDIUM): zlib improper validation of input (fixed in zlib 1.3.2-r0)
|
Cursor Agent can help with this pull request. Just |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
📝 WalkthroughWalkthroughA Dockerfile for the serverless dev-mode proxy was updated with an Alpine package refresh command. The Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| @@ -1,5 +1,7 @@ | |||
| FROM node:20-alpine | |||
|
|
|||
| RUN apk update && apk upgrade --no-cache | |||
There was a problem hiding this comment.
Redundant apk update leaves cache in Docker image
Low Severity
The apk update before apk upgrade --no-cache is redundant and counterproductive. The --no-cache flag on apk upgrade already fetches the package index into memory and discards it after use. Running apk update separately first writes index files to /var/cache/apk/ that persist in the image layer, unnecessarily increasing image size. Using just apk upgrade --no-cache alone achieves the same result without the leftover cache.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/engine/src/lib/devMode/containers/serverless-dev-mode-proxy/Dockerfile (1)
3-3: Prefer a deterministic zlib fix over a blanketapk upgrade.Line 3 upgrades every installed Alpine package on each rebuild, not just
zlib. Alpine documents thatapk updaterefreshes repository indexes andapk upgradeupdates installed packages, while Docker notes that mutable tags likenode:20-alpinealready drift over time and recommends pinning base images/digests for auditability. For this CVE fix, I’d rather pin a patched base image digest or apply a zlib-only/version-pinned upgrade so the image stays reproducible. (wiki.alpinelinux.org)Possible direction
-FROM node:20-alpine -RUN apk update && apk upgrade --no-cache +FROM node:20-alpine@sha256:<patched-digest> +# or, if the base image can't move yet: +RUN apk add --no-cache 'zlib=1.3.2-r0'Does the current official `node:20-alpine` image already include Alpine packages with `zlib` >= 1.3.2-r0, and what digest should be pinned in the Dockerfile to keep this fix reproducible?🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/engine/src/lib/devMode/containers/serverless-dev-mode-proxy/Dockerfile` at line 3, The Dockerfile uses a blanket "RUN apk update && apk upgrade --no-cache" which makes builds non-deterministic; replace this with a deterministic fix by either pinning the base image (node:20-alpine) to a specific digest that includes the patched zlib, or remove the global upgrade and instead install/upgrade only the zlib package to a specific patched version (e.g., use apk add --no-cache zlib=<version>) and drop the apk upgrade step; update the Dockerfile line containing RUN apk update && apk upgrade --no-cache and ensure the chosen zlib version or the pinned node:20-alpine@sha256:<digest> is recorded for reproducible builds.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In
`@packages/engine/src/lib/devMode/containers/serverless-dev-mode-proxy/Dockerfile`:
- Line 3: The Dockerfile uses a blanket "RUN apk update && apk upgrade
--no-cache" which makes builds non-deterministic; replace this with a
deterministic fix by either pinning the base image (node:20-alpine) to a
specific digest that includes the patched zlib, or remove the global upgrade and
instead install/upgrade only the zlib package to a specific patched version
(e.g., use apk add --no-cache zlib=<version>) and drop the apk upgrade step;
update the Dockerfile line containing RUN apk update && apk upgrade --no-cache
and ensure the chosen zlib version or the pinned node:20-alpine@sha256:<digest>
is recorded for reproducible builds.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: bfc8f7ed-41e6-4506-b93f-2139527e6e8e
📒 Files selected for processing (1)
packages/engine/src/lib/devMode/containers/serverless-dev-mode-proxy/Dockerfile


Addresses: This PR fixes two
zlibvulnerabilities (CVE-2026-22184 CRITICAL, CVE-2026-27171 MEDIUM) in thenode:20-alpinebase image for the dev-mode proxy. It addsapk update && apk upgrade --no-cacheto the Dockerfile to updatezlibfrom1.3.1-r2to1.3.2-r0.Summary by CodeRabbit