From 9be6b76420d1e1f1e9fc53bda319dd993b14dceb Mon Sep 17 00:00:00 2001 From: Luis Date: Wed, 18 Nov 2026 14:29:00 -0500 Subject: [PATCH] build: run npm ci with --ignore-scripts in the build/install/update scripts The Dockerfile already uses `npm ci --ignore-scripts`; the host-side build helpers (build.sh, install.sh, update.sh) did not. Align them so a lifecycle script in a dependency cannot run during a local rebuild. No package in the current lockfile declares install scripts, so this is a hardening no-op today. --- build.sh | 2 +- install.sh | 2 +- update.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index d830b38..ec7a31e 100755 --- a/build.sh +++ b/build.sh @@ -118,7 +118,7 @@ else command -v rsync >/dev/null 2>&1 || die "rsync not detected" info "Building frontend static assets" if [ "${ARTEX_SKIP_NPM_CI:-0}" != "1" ]; then - (cd web && npm ci) + (cd web && npm ci --ignore-scripts) fi (cd web && npm run build:static) info "Syncing frontend assets to server/webui/dist" diff --git a/install.sh b/install.sh index d6ed9e6..8c245d6 100755 --- a/install.sh +++ b/install.sh @@ -106,7 +106,7 @@ JSON # embedding the frontend requires node to produce the static assets if command -v npm >/dev/null 2>&1; then info "building frontend static assets..." - ( cd web && npm ci && npm run build:static ) + ( cd web && npm ci --ignore-scripts && npm run build:static ) rm -rf server/webui/dist && cp -r web/out server/webui/dist info "compiling embedded single binary..." CGO_ENABLED=0 go build -tags embedui -trimpath -o artex ./cmd/artex diff --git a/update.sh b/update.sh index 8b74905..b312b7b 100755 --- a/update.sh +++ b/update.sh @@ -56,7 +56,7 @@ update_local(){ if command -v npm >/dev/null 2>&1; then info "Rebuilding frontend static assets…" - ( cd web && npm ci && npm run build:static ) + ( cd web && npm ci --ignore-scripts && npm run build:static ) rm -rf server/webui/dist && cp -r web/out server/webui/dist info "Recompiling the embedded single binary…" CGO_ENABLED=0 go build -tags embedui -trimpath -o artex ./cmd/artex