---
title: Tip: on servers, don't run npm install as root, use --ignore-scripts for vendor SDKs, and alert when a new systemd unit or AI-agent framework shows up | ctxsec
url: https://ctxsec.com/items/tip-run-npm-install-without-root-and-with-ignore-scripts-on-servers-and-alert-on-new-systemd-units-and-agent-frameworks
description: "The LeadStack package only got root because someone ran npm install as root. Install scripts are where npm malware runs, and an AI agent installed as a service is a full remote-control tool."
status: "guide (prompted by SafeDep's @leadstack/crm-connect analysis, Nov 19, 2026)"
published: 2026-11-21
---

> The LeadStack package only got root because someone ran npm install as root. Install scripts are where npm malware runs, and an AI agent installed as a service is a full remote-control tool.

[← Tips & Guides](/tips) · [markdown](/items/tip-run-npm-install-without-root-and-with-ignore-scripts-on-servers-and-alert-on-new-systemd-units-and-agent-frameworks.md)

guide (prompted by SafeDep's @leadstack/crm-connect analysis, Nov 19, 2026)

2026-11-21 11:44 AM ET

### Tip: on servers, don't run npm install as root, use --ignore-scripts for vendor SDKs, and alert when a new systemd unit or AI-agent framework shows up

- Build as an unprivileged user in CI and ship artifacts; don't install on production hosts.
- Set `ignore-scripts=true` in the project or CI `.npmrc` and allow scripts only for packages that need them.
- Flag dependencies that resolve to URLs or tarballs outside the registry; they can change without a new version.
- Alert on new system or user systemd units, on `loginctl enable-linger`, and on hosts that start long-polling chat APIs like Telegram.

Sources: [SafeDep: Malicious npm Package Turns Hermes Agent into a Backdoor (Nov 19, 2026)](https://safedep.io/blog/malicious-npm-leadstack-crm-connect-hermes-agent-backdoor)
