Skip to content

Commit b619248

Browse files
authored
Merge pull request #456 from DigitalSlideArchive/node-lts-girder-5
Switch to node lts for Girder 5
2 parents 9848934 + 7a9413f commit b619248

File tree

3 files changed

+24
-21
lines changed

3 files changed

+24
-21
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ jobs:
468468
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
469469
- run:
470470
name: Scan the local image with trivy; fail on high or critical vulnerabilities
471-
command: trivy image --scanners vuln --input /tmp/workspace/dsa_common.tar --exit-code 1 --severity HIGH,CRITICAL --no-progress
471+
command: trivy image --scanners vuln --input /tmp/workspace/dsa_common.tar --exit-code 1 --severity HIGH,CRITICAL --no-progress --format json
472472
- run:
473473
name: Scan the local image with trivy; report low and medium vulnerabilities, but don't fail
474474
command: trivy image --scanners vuln image --input /tmp/workspace/dsa_common.tar --exit-code 0 --severity LOW,MEDIUM,UNKNOWN --no-progress

.trivyignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
# In bioformats_package.jar: this shouldn't be an issue because of how xml is
44
# used and because we don't pass urls to bioformats
55

6-
# In ubuntu, these are probably not reachable based on how we deploy
6+
# In node-pkg, this is not reachable based on how we deploy
77

8-
New ignore file:
98
# HIGH: jar - okhttp: information disclosure via improperly used cryptogra
109
CVE-2021-0341
1110
# HIGH: jar - apache-commons-io: Possible denial of service attack on untr
1211
CVE-2024-47554
1312
# HIGH: jar - com.fasterxml.jackson.core/jackson-core: jackson-core Potent
1413
CVE-2025-52999
14+
# HIGH: node-pkg - glob CLI: Command injection via -c/--cmd executes matches wi
15+
CVE-2025-64756

dsa5.Dockerfile

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ RUN python --version && \
5555
find / -xdev -name __pycache__ -type d -exec rm -rf {} \+
5656

5757
RUN . ~/.bashrc && \
58-
nvm install 22 && \
59-
nvm alias default 22 && \
58+
nvm install --lts && \
59+
nvm alias default lts/* && \
6060
nvm use default && \
6161
rdfind -minsize 32768 -makehardlinks true -makeresultsfile false /root/.nvm && \
6262
nvm uninstall 14 && \
@@ -77,7 +77,7 @@ RUN cd /opt && \
7777
pip install --no-cache-dir -e .[mount] && \
7878
pip install --no-cache-dir -e clients/python && \
7979
cd girder/web && \
80-
npm ci && \
80+
npm ci || npm install && \
8181
npm run build && \
8282
find /opt -xdev -name node_modules -exec rm -rf {} \+ && \
8383
rm -rf /root/.cache /root/.npm /tmp/* && \
@@ -90,57 +90,59 @@ RUN cd /opt/girder/worker && \
9090
cd /opt/girder/plugins/worker && \
9191
pip install --no-cache-dir -e .[girder,worker] && \
9292
cd girder_plugin_worker/web_client && \
93-
npm ci && \
93+
npm ci || npm install && \
9494
npm run build && \
9595
find /opt -xdev -name node_modules -exec rm -rf {} \+ && \
9696
rm -rf /root/.cache /root/.npm /tmp/* && \
9797
find / -xdev -name __pycache__ -type d -exec rm -rf {} \+ && \
9898
true
9999

100-
# Girder plugins
100+
# Girder plugins. If we are installing from source, use npm install if npm ci
101+
# false, since npm ci can fail if the package-lock was generated with ai
102+
# different npm version.
101103
RUN true && \
102104
cd /opt/girder/plugins/hashsum_download && \
103105
pip install --no-cache-dir -e . && \
104106
cd girder_hashsum_download/web_client && \
105-
npm ci && \
107+
npm ci || npm install && \
106108
npm run build && \
107109
cd /opt/girder/plugins/homepage && \
108110
pip install --no-cache-dir -e . && \
109111
cd girder_homepage/web_client && \
110-
npm ci && \
112+
npm ci || npm install && \
111113
npm run build && \
112114
cd /opt/girder/plugins/jobs && \
113115
pip install --no-cache-dir -e . && \
114116
cd girder_jobs/web_client && \
115-
npm ci && \
117+
npm ci || npm install && \
116118
npm run build && \
117119
cd /opt/girder/plugins/ldap && \
118120
pip install --no-cache-dir -e . && \
119121
cd girder_ldap/web_client && \
120-
npm ci && \
122+
npm ci || npm install && \
121123
npm run build && \
122124
cd /opt/girder/plugins/oauth && \
123125
pip install --no-cache-dir -e . && \
124126
cd girder_oauth/web_client && \
125-
npm ci && \
127+
npm ci || npm install && \
126128
npm run build && \
127129
cd /opt/girder/plugins/user_quota && \
128130
pip install --no-cache-dir -e . && \
129131
cd girder_user_quota/web_client && \
130-
npm ci && \
132+
npm ci || npm install && \
131133
npm run build && \
132134
cd /opt/girder/plugins/import_tracker && \
133135
pip install --no-cache-dir -e . && \
134136
cd girder_import_tracker/web_client && \
135-
npm ci && \
137+
npm ci || npm install && \
136138
npm run build && \
137139
# virtual_folders has no web_client \
138140
cd /opt/girder/plugins/virtual_folders && \
139141
pip install --no-cache-dir -e . && \
140142
cd /opt/girder/plugins/slicer_cli_web && \
141143
pip install --no-cache-dir -e . && \
142144
cd slicer_cli_web/web_client && \
143-
npm ci && \
145+
npm ci || npm install && \
144146
npm run build && \
145147
find /opt -xdev -name node_modules -exec rm -rf {} \+ && \
146148
rm -rf /root/.cache /root/.npm /tmp/* && \
@@ -152,13 +154,13 @@ RUN cd /opt && \
152154
cd /opt/large_image && \
153155
pip install --no-cache-dir --find-links https://girder.github.io/large_image_wheels -e .[memcached] -rrequirements-dev.txt && \
154156
cd /opt/large_image/girder/girder_large_image/web_client && \
155-
npm ci && \
157+
npm ci || npm install && \
156158
npm run build && \
157159
cd /opt/large_image/girder_annotation/girder_large_image_annotation/web_client && \
158-
npm ci && \
160+
npm ci || npm install && \
159161
npm run build && \
160162
cd /opt/large_image/sources/dicom/large_image_source_dicom/web_client && \
161-
npm ci && \
163+
npm ci || npm install && \
162164
npm run build && \
163165
rdfind -minsize 32768 -makehardlinks true -makeresultsfile false /opt/venv && \
164166
find /opt -xdev -name node_modules -exec rm -rf {} \+ && \
@@ -174,7 +176,7 @@ RUN cd /opt && \
174176
sed -i 's/==1\.3.*'\''/'\''/g' setup.py && \
175177
pip install --no-cache-dir -e .[analysis] && \
176178
cd /opt/HistomicsUI/histomicsui/web_client && \
177-
npm ci && \
179+
npm ci || npm install && \
178180
# This builds both the app and the plugin \
179181
npm run build && \
180182
rdfind -minsize 32768 -makehardlinks true -makeresultsfile false /opt/venv && \
@@ -189,7 +191,7 @@ RUN cd /opt && \
189191
cd /opt/girder_assetstore && \
190192
pip install --no-cache-dir -e . && \
191193
cd /opt/girder_assetstore/girder_assetstore/web_client && \
192-
npm ci && \
194+
npm ci || npm install && \
193195
npm run build && \
194196
find /opt -xdev -name node_modules -exec rm -rf {} \+ && \
195197
rm -rf /root/.cache /root/.npm /tmp/* && \

0 commit comments

Comments
 (0)