Skip to content

Commit 9b58221

Browse files
boiteclaude
andcommitted
fix: update npm to resolve Trivy CVEs in bundled dependencies
Upgrades npm to latest after Node.js install to patch vulnerable transitive dependencies (cross-spawn, glob, minimatch, tar). Chose to update npm rather than upgrade to Node.js 22 to avoid potential breaking changes for downstream consumers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 675bc66 commit 9b58221

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

Dockerfile.php7

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg \
6464
&& apt-get clean \
6565
&& rm -rf /var/lib/apt/lists/*
6666

67+
RUN npm install -g npm@latest
68+
6769
RUN docker-php-ext-install bz2 \
6870
&& install-php-extensions apcu gd gmp intl opcache pdo_mysql pdo_pgsql sockets zip imap mailparse soap mysqli bcmath \
6971
&& apt-get autoremove \

Dockerfile.php8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ RUN curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg \
6464
&& apt-get clean \
6565
&& rm -rf /var/lib/apt/lists/*
6666

67+
RUN npm install -g npm@latest
68+
6769
RUN docker-php-ext-install bz2 \
6870
&& install-php-extensions apcu gd gmp intl opcache pdo_mysql pdo_pgsql sockets zip imap mailparse soap mysqli bcmath \
6971
&& apt-get autoremove \

0 commit comments

Comments
 (0)