-
Notifications
You must be signed in to change notification settings - Fork 1
merge 1.5.7 into main #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
14b4772
8cd96d8
2dc8d3f
6094dd7
074f085
b72b268
1e82068
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,63 +1,47 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FROM node:24.13.0-alpine3.23 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FROM node:25.6.1-slim | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ENV PORT 8080 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ENV NODE_ENV production | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Fix CVE-2025-64756: Patch glob in npm's system installation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Vulnerable paths found by AWS Inspector: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - /usr/local/lib/node_modules/npm/node_modules/glob/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/glob/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Fix CVE-2026-23745 and CVE-2026-23950: Patch tar in npm's system installation | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Vulnerable paths found by AWS Inspector: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - /usr/local/lib/node_modules/npm/node_modules/tar/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # - /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/tar/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN npm install -g npm@latest && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cd /tmp && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Download safe glob version once | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| npm pack glob@11.1.0 && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Download safe tar version (7.5.4 fixes both CVEs) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| npm pack tar@7.5.4 && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Patch glob in npm's direct dependencies | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ -d "/usr/local/lib/node_modules/npm/node_modules/glob" ]; then \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tar -xzf glob-11.1.0.tgz && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /usr/local/lib/node_modules/npm/node_modules/glob && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mv package /usr/local/lib/node_modules/npm/node_modules/glob && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -f glob-11.1.0.tgz; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Patch glob in node-gyp's dependencies (download again for second location) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ -d "/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/glob" ]; then \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| npm pack glob@11.1.0 && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tar -xzf glob-11.1.0.tgz && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/glob && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mv package /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/glob && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -f glob-11.1.0.tgz; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Patch tar in npm's direct dependencies | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ -d "/usr/local/lib/node_modules/npm/node_modules/tar" ]; then \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tar -xzf tar-7.5.4.tgz && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /usr/local/lib/node_modules/npm/node_modules/tar && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mv package /usr/local/lib/node_modules/npm/node_modules/tar && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -f tar-7.5.4.tgz; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Patch tar in node-gyp's dependencies (download again for second location) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| if [ -d "/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/tar" ]; then \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| npm pack tar@7.5.4 && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tar -xzf tar-7.5.4.tgz && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/tar && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mv package /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/tar && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -f tar-7.5.4.tgz; \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fi && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /tmp/package /tmp/glob-* /tmp/tar-* 2>/dev/null || true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Upgrade npm to latest version to address CVE-2026-0775 (npm 11.8.0 vulnerability) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN npm install -g npm@latest | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Update tar to 7.5.8 to fix CVE in npm's bundled tar (7.5.4) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN mkdir -p /tmp/tar-update && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cd /tmp/tar-update && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| npm init -y && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| npm install tar@7.5.8 --legacy-peer-deps && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /usr/local/lib/node_modules/npm/node_modules/tar && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cp -r node_modules/tar /usr/local/lib/node_modules/npm/node_modules/ && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /tmp/tar-update | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Fix CVE GHSA-7h2j-956f-4vf2: Update @isaacs/brace-expansion from 5.0.0 to 5.0.1 in npm's node_modules | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN mkdir -p /tmp/brace-expansion-update && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cd /tmp/brace-expansion-update && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| npm init -y && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| npm install @isaacs/brace-expansion@5.0.1 --legacy-peer-deps && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /usr/local/lib/node_modules/npm/node_modules/@isaacs/brace-expansion && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cp -r node_modules/@isaacs/brace-expansion /usr/local/lib/node_modules/npm/node_modules/@isaacs/ && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /tmp/brace-expansion-update | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Fix minimatch vulnerability: Update npm's bundled minimatch from 10.1.2 to 10.2.1 (and deps: brace-expansion, balanced-match) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN mkdir -p /tmp/minimatch-update && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cd /tmp/minimatch-update && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| npm init -y && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| npm install minimatch@10.2.1 --legacy-peer-deps && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /usr/local/lib/node_modules/npm/node_modules/minimatch && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cp -r node_modules/minimatch /usr/local/lib/node_modules/npm/node_modules/ && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /usr/local/lib/node_modules/npm/node_modules/brace-expansion && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cp -r node_modules/brace-expansion /usr/local/lib/node_modules/npm/node_modules/ && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /usr/local/lib/node_modules/npm/node_modules/balanced-match && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cp -r node_modules/balanced-match /usr/local/lib/node_modules/npm/node_modules/ && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /tmp/minimatch-update | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+6
to
39
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Upgrade npm to latest version to address CVE-2026-0775 (npm 11.8.0 vulnerability) | |
| RUN npm install -g npm@latest | |
| # Update tar to 7.5.8 to fix CVE in npm's bundled tar (7.5.4) | |
| RUN mkdir -p /tmp/tar-update && \ | |
| cd /tmp/tar-update && \ | |
| npm init -y && \ | |
| npm install tar@7.5.8 --legacy-peer-deps && \ | |
| rm -rf /usr/local/lib/node_modules/npm/node_modules/tar && \ | |
| cp -r node_modules/tar /usr/local/lib/node_modules/npm/node_modules/ && \ | |
| rm -rf /tmp/tar-update | |
| # Fix CVE GHSA-7h2j-956f-4vf2: Update @isaacs/brace-expansion from 5.0.0 to 5.0.1 in npm's node_modules | |
| RUN mkdir -p /tmp/brace-expansion-update && \ | |
| cd /tmp/brace-expansion-update && \ | |
| npm init -y && \ | |
| npm install @isaacs/brace-expansion@5.0.1 --legacy-peer-deps && \ | |
| rm -rf /usr/local/lib/node_modules/npm/node_modules/@isaacs/brace-expansion && \ | |
| cp -r node_modules/@isaacs/brace-expansion /usr/local/lib/node_modules/npm/node_modules/@isaacs/ && \ | |
| rm -rf /tmp/brace-expansion-update | |
| # Fix minimatch vulnerability: Update npm's bundled minimatch from 10.1.2 to 10.2.1 (and deps: brace-expansion, balanced-match) | |
| RUN mkdir -p /tmp/minimatch-update && \ | |
| cd /tmp/minimatch-update && \ | |
| npm init -y && \ | |
| npm install minimatch@10.2.1 --legacy-peer-deps && \ | |
| rm -rf /usr/local/lib/node_modules/npm/node_modules/minimatch && \ | |
| cp -r node_modules/minimatch /usr/local/lib/node_modules/npm/node_modules/ && \ | |
| rm -rf /usr/local/lib/node_modules/npm/node_modules/brace-expansion && \ | |
| cp -r node_modules/brace-expansion /usr/local/lib/node_modules/npm/node_modules/ && \ | |
| rm -rf /usr/local/lib/node_modules/npm/node_modules/balanced-match && \ | |
| cp -r node_modules/balanced-match /usr/local/lib/node_modules/npm/node_modules/ && \ | |
| rm -rf /tmp/minimatch-update | |
| # Pin npm to a specific version that includes the required security fixes. | |
| # Avoid manually modifying npm's internal node_modules tree, which is brittle | |
| # and may break when npm's internal layout changes. | |
| RUN npm install -g npm@11.9.0 && npm --version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The base image was changed to Node 25.6.1, but CI runs tests on Node 22.x (see
.github/workflows/test.yml). This version mismatch can lead to “works in CI, breaks in prod” (and Node 25 is non‑LTS). Consider aligning the Docker base image with the CI/runtime Node version (or updating CI and/or declaringengines.nodeinpackage.json).