chore: resolve Docker image vulnerabilities associated with cross-spawn (#4634)

Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
Mir Arif Hasan 2024-12-20 12:44:46 +06:00 committed by GitHub
parent a3912d3ed2
commit f29504b2f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3765 additions and 4377 deletions

View file

@ -35,6 +35,7 @@
"pnpm": {
"overrides": {
"cookie": "0.7.2",
"cross-spawn": "7.0.6",
"vue": "3.5.12",
"@nestjs-modules/mailer>mjml": "5.0.0-alpha.4",
"subscriptions-transport-ws>ws": "7.5.10",

File diff suppressed because it is too large Load diff

View file

@ -14,6 +14,12 @@ RUN pnpm fetch
COPY . .
RUN pnpm install -f --offline
RUN npm uninstall -g cross-spawn && \
npm cache clean --force && \
# Remove any remaining old versions
find /usr/local/lib/node_modules -name "cross-spawn" -type d -exec rm -rf {} + && \
# Install cross-spawn v7 globally
npm install -g cross-spawn@^7.0.6 --force
FROM base_builder AS backend_builder
WORKDIR /usr/src/app/packages/hoppscotch-backend
@ -27,6 +33,13 @@ FROM node:20-alpine3.19 AS backend
RUN apk add caddy
RUN npm install -g pnpm
RUN npm uninstall -g cross-spawn && \
npm cache clean --force && \
# Remove any remaining old versions
find /usr/local/lib/node_modules -name "cross-spawn" -type d -exec rm -rf {} + && \
# Install cross-spawn v7 globally
npm install -g cross-spawn@^7.0.6 --force
COPY --from=base_builder /usr/src/app/packages/hoppscotch-backend/backend.Caddyfile /etc/caddy/backend.Caddyfile
COPY --from=backend_builder /dist/backend /dist/backend
COPY --from=base_builder /usr/src/app/packages/hoppscotch-backend/prod_run.mjs /dist/backend
@ -106,6 +119,12 @@ RUN apk add caddy
RUN apk add tini curl
RUN npm install -g pnpm
RUN npm uninstall -g cross-spawn && \
npm cache clean --force && \
# Remove any remaining old versions
find /usr/local/lib/node_modules -name "cross-spawn" -type d -exec rm -rf {} + && \
# Install cross-spawn v7 globally
npm install -g cross-spawn@^7.0.6 --force
# Copy necessary files
# Backend files