Skip to main content
Version: 3.2.0

fix-image-scan

🔒 Security​

Scan the runtime image and drop non-production packages​

Goal: The image pushed to client clusters must be scannable in CI, and Critical or High findings must block a merge to master.

Solution: Build the runtime image from node:26-alpine, install production dependencies only, remove the npm CLI shipped in the base image, and run Trivy on that image.

Features:

  • scan:image builds the image, fails on Critical and High, and publishes a CycloneDX SBOM
  • The job blocks merge requests to master. On develop, including a merge request into develop, it runs and is allowed to fail
  • Runtime image no longer contains devDependencies or the npm CLI
  • org.opencontainers.image.url points at the public release notes

Files Modified:

  • docker/Dockerfile — node:26-alpine, npm ci --omit=dev, npm CLI removed from the final stage
  • docker/Dockerfile.local — local image base moved to node:26-alpine
  • .gitlab-ci.yml — scan:image job, Trivy binary and vulnerability DB cached
  • package.json / package-lock.json — body-parser and multer overrides, audit fixes
  • ui/package.json / ui/package-lock.json — Vite 7.3.7, Vitest 4.1.12, and overrides so npm audit is clean
  • docs/user/package-lock.json — patched source-map-js
  • ui/src/protocol/tower.mock.ts — demo tokens replaced with obvious placeholders
  • src/core/task/task.service.spec.ts — fixture tokens shortened
  • src/core/configuration/configuration.service.spec.ts — fixture token shortened
  • src/protocol/capacities/webhook-capacity/webhook-capacity.service.spec.ts — fixture token shortened
  • src/utils/normalize-error.spec.ts — fixture token shortened