Skip to content

Commit f609e02

Browse files
committed
chore(dependencies): Update lodash to 4.17.21 and patch jshs2 package; upgrade OpenJDK to 21 in Dockerfile
Update debian base image in jdk Dockerfile
1 parent 96908c3 commit f609e02

File tree

3 files changed

+40
-62
lines changed

3 files changed

+40
-62
lines changed

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@
6767
},
6868
"resolutions": {
6969
"es5-ext": "0.10.53",
70-
"lodash": "^4.17.0",
70+
"lodash": "4.17.21",
71+
"**/lodash": "4.17.21",
72+
"jshs2/**/lodash": "4.17.21",
73+
"**/jshs2/lodash": "4.17.21",
74+
"**/form-data": "^2.5.4",
7175
"@types/node": "^20",
7276
"@types/ramda": "0.27.40",
7377
"thrift": "0.20.0"

packages/cubejs-docker/latest-debian-jdk.Dockerfile

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile-upstream:master-experimental
2-
FROM node:22.18.0-bookworm-slim AS builder
2+
FROM node:22-trixie-slim AS builder
33

44
WORKDIR /cube
55
COPY . .
@@ -12,17 +12,33 @@ RUN yarn config set network-timeout 120000 -g
1212
RUN apt-get update \
1313
# python3 package is necessary to install `python3` executable for node-gyp
1414
# libpython3-dev is needed to trigger post-installer to download native with python
15-
&& apt-get install -y python3 python3.11 libpython3.11-dev gcc g++ make cmake openjdk-17-jdk-headless \
15+
&& apt-get install -y python3 python3-dev gcc g++ make cmake openjdk-21-jdk-headless wget \
1616
&& rm -rf /var/lib/apt/lists/*
1717

1818
# We are copying root yarn.lock file to the context folder during the Publish GH
1919
# action. So, a process will use the root lock file here.
2020
RUN yarn install --prod \
2121
# Remove DuckDB sources to reduce image size
2222
&& rm -rf /cube/node_modules/duckdb/src \
23-
&& yarn cache clean
24-
25-
FROM node:22.18.0-bookworm-slim
23+
&& yarn cache clean \
24+
# FIX CVE-2019-10744: Patch lodash in unmaintained jshs2 package
25+
# jshs2 hasn't been updated since 2017 and bundles lodash 3.10.1 with critical vulnerabilities
26+
# This is a temporary fix until migration to hive-driver is completed
27+
&& if [ -d /cube/node_modules/jshs2/node_modules/lodash ]; then \
28+
echo "Patching lodash in jshs2 from 3.10.1 to 4.17.21 (CVE-2019-10744 fix)" && \
29+
rm -rf /cube/node_modules/jshs2/node_modules/lodash && \
30+
cp -r /cube/node_modules/lodash /cube/node_modules/jshs2/node_modules/; \
31+
fi
32+
33+
# FIX CVE-2022-41853: Update hsqldb from 2.3.2 to 2.7.1
34+
# Note: This is a JAR file that cannot be fixed via npm/yarn resolutions
35+
RUN wget -O /tmp/hsqldb-2.7.1.jar https://repo1.maven.org/maven2/org/hsqldb/hsqldb/2.7.1/hsqldb-2.7.1.jar \
36+
&& if [ -f /cube/node_modules/@cubejs-backend/jdbc/drivers-10.17/hsqldb.jar ]; then \
37+
mv /tmp/hsqldb-2.7.1.jar /cube/node_modules/@cubejs-backend/jdbc/drivers-10.17/hsqldb.jar; \
38+
fi \
39+
&& rm -f /tmp/hsqldb-2.7.1.jar
40+
41+
FROM node:22-trixie-slim
2642

2743
ARG IMAGE_VERSION=unknown
2844

@@ -32,7 +48,7 @@ ENV CUBEJS_DOCKER_IMAGE_TAG=latest
3248
RUN groupadd cube && useradd -ms /bin/bash -g cube cube \
3349
&& DEBIAN_FRONTEND=noninteractive \
3450
&& apt-get update \
35-
&& apt-get install -y --no-install-recommends libssl3 openjdk-17-jre-headless python3.11 libpython3.11-dev \
51+
&& apt-get install -y --no-install-recommends libssl3 openjdk-21-jre-headless python3 python3-dev \
3652
&& rm -rf /var/lib/apt/lists/* \
3753
&& mkdir cube \
3854
&& chown -R cube:cube /tmp /cube /usr

yarn.lock

Lines changed: 13 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -11744,7 +11744,7 @@ [email protected]:
1174411744
strip-ansi "^6.0.1"
1174511745
wcwidth "^1.0.0"
1174611746

11747-
combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6:
11747+
combined-stream@^1.0.8, combined-stream@~1.0.6:
1174811748
version "1.0.8"
1174911749
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
1175011750
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
@@ -14942,34 +14942,17 @@ forever-agent@~0.6.1:
1494214942
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
1494314943
integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
1494414944

14945-
form-data@^2.3.1, form-data@^2.5.0:
14946-
version "2.5.1"
14947-
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4"
14948-
integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==
14949-
dependencies:
14950-
asynckit "^0.4.0"
14951-
combined-stream "^1.0.6"
14952-
mime-types "^2.1.12"
14953-
14954-
form-data@^3.0.0:
14955-
version "3.0.1"
14956-
resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f"
14957-
integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==
14958-
dependencies:
14959-
asynckit "^0.4.0"
14960-
combined-stream "^1.0.8"
14961-
mime-types "^2.1.12"
14962-
14963-
form-data@^4.0.0, form-data@^4.0.4, form-data@~4.0.0:
14964-
version "4.0.4"
14965-
resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.4.tgz#784cdcce0669a9d68e94d11ac4eea98088edd2c4"
14966-
integrity sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==
14945+
form-data@^2.3.1, form-data@^2.5.0, form-data@^2.5.4, form-data@^3.0.0, form-data@^4.0.0, form-data@^4.0.4, form-data@~4.0.0:
14946+
version "2.5.5"
14947+
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.5.tgz#a5f6364ad7e4e67e95b4a07e2d8c6f711c74f624"
14948+
integrity sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A==
1496714949
dependencies:
1496814950
asynckit "^0.4.0"
1496914951
combined-stream "^1.0.8"
1497014952
es-set-tostringtag "^2.1.0"
1497114953
hasown "^2.0.2"
14972-
mime-types "^2.1.12"
14954+
mime-types "^2.1.35"
14955+
safe-buffer "^5.2.1"
1497314956

1497414957
formdata-polyfill@^4.0.10:
1497514958
version "4.0.10"
@@ -18764,7 +18747,7 @@ lodash.upperfirst@^4.3.1:
1876418747
resolved "https://registry.yarnpkg.com/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz#1365edf431480481ef0d1c68957a5ed99d49f7ce"
1876518748
integrity sha1-E2Xt9DFIBIHvDRxolXpe2Z1J984=
1876618749

18767-
lodash@^3.10.1, lodash@^4.16.5, lodash@^4.17.0, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0:
18750+
lodash@4.17.21, lodash@^3.10.1, lodash@^4.16.5, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0:
1876818751
version "4.17.21"
1876918752
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
1877018753
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
@@ -19185,7 +19168,7 @@ [email protected], "mime-db@>= 1.43.0 < 2":
1918519168
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
1918619169
integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
1918719170

19188-
mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.29, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34:
19171+
mime-types@^2.1.27, mime-types@^2.1.29, mime-types@^2.1.31, mime-types@^2.1.35, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24, mime-types@~2.1.34:
1918919172
version "2.1.35"
1919019173
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a"
1919119174
integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
@@ -23158,7 +23141,7 @@ [email protected], safe-buffer@~5.1.0, safe-buffer@~5.1.1:
2315823141
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
2315923142
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
2316023143

23161-
[email protected], safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0:
23144+
[email protected], safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1, safe-buffer@~5.2.0:
2316223145
version "5.2.1"
2316323146
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
2316423147
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
@@ -24165,16 +24148,7 @@ string-length@^5.0.1:
2416524148
char-regex "^2.0.0"
2416624149
strip-ansi "^7.0.1"
2416724150

24168-
"string-width-cjs@npm:string-width@^4.2.0":
24169-
version "4.2.3"
24170-
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
24171-
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
24172-
dependencies:
24173-
emoji-regex "^8.0.0"
24174-
is-fullwidth-code-point "^3.0.0"
24175-
strip-ansi "^6.0.1"
24176-
24177-
"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
24151+
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
2417824152
version "4.2.3"
2417924153
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
2418024154
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -24265,7 +24239,7 @@ string_decoder@~1.1.1:
2426524239
dependencies:
2426624240
safe-buffer "~5.1.0"
2426724241

24268-
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
24242+
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
2426924243
version "6.0.1"
2427024244
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
2427124245
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -24293,13 +24267,6 @@ strip-ansi@^5.2.0:
2429324267
dependencies:
2429424268
ansi-regex "^4.1.0"
2429524269

24296-
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
24297-
version "6.0.1"
24298-
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
24299-
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
24300-
dependencies:
24301-
ansi-regex "^5.0.1"
24302-
2430324270
strip-ansi@^7.0.1, strip-ansi@^7.1.0:
2430424271
version "7.1.0"
2430524272
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
@@ -26381,7 +26348,7 @@ workerpool@^9.2.0:
2638126348
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-9.2.0.tgz#f74427cbb61234708332ed8ab9cbf56dcb1c4371"
2638226349
integrity sha512-PKZqBOCo6CYkVOwAxWxQaSF2Fvb5Iv2fCeTP7buyWI2GiynWr46NcXSgK/idoV6e60dgCBfgYc+Un3HMvmqP8w==
2638326350

26384-
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
26351+
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
2638526352
version "7.0.0"
2638626353
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
2638726354
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -26407,15 +26374,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
2640726374
string-width "^4.1.0"
2640826375
strip-ansi "^6.0.0"
2640926376

26410-
wrap-ansi@^7.0.0:
26411-
version "7.0.0"
26412-
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
26413-
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
26414-
dependencies:
26415-
ansi-styles "^4.0.0"
26416-
string-width "^4.1.0"
26417-
strip-ansi "^6.0.0"
26418-
2641926377
wrap-ansi@^8.1.0:
2642026378
version "8.1.0"
2642126379
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"

0 commit comments

Comments
 (0)