fix(docker): purge apt-tracked npm in Dockerfile.dev to remove stale SBOM metadata

Matches the pattern already applied in Dockerfile.custom_ui and the
apk del in the wolfi-based Dockerfiles. Without this, scanners can
still report the old npm-bundled tar/minimatch versions from dpkg
metadata.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Harshit28j 2026-03-08 02:28:13 +05:30
parent 96d390d423
commit a56541ba26

View file

@ -94,7 +94,8 @@ RUN apt-get update && apt-get upgrade -y \
done \
&& find / -path "*/node_modules/npm/package.json" -exec \
sed -i 's/"tar": "\^7\.5\.[0-9]*"/"tar": "^7.5.10"/g; s/"minimatch": "\^10\.[0-9.]*"/"minimatch": "^10.2.4"/g' {} + 2>/dev/null \
&& npm cache clean --force
&& npm cache clean --force \
&& apt-get purge -y npm && apt-get autoremove -y
WORKDIR /app