This repository uses defenses against npm supply-chain worms such as Mini Shai-Hulud (TeamPCP), which compromise packages via CI OIDC token theft and malicious install lifecycle scripts (often pulling Bun and router_init.js).
- pnpm only —
packageManager,engines.pnpm, andpnpm-lock.yamlenforce a single package manager. Enable Corepack sonpm install/yarn installare rejected in this repo (see below). We do not use apreinstallscript: that would run when end users install the published node via npm in n8n. - Frozen lockfile —
pnpm-lock.yamlis committed; CI usespnpm install --frozen-lockfile. - pnpm workspace config — supply-chain settings live in
pnpm-workspace.yaml(pnpm 10+ ignorespackage.json→pnpm). - Blocked install scripts — only packages in
pnpm-workspace.yaml→onlyBuiltDependenciesmay run lifecycle scripts (currentlyisolated-vmfor dev tooling).strictDepBuilds: truefails on unreviewed scripts. - Blocklist scan —
pnpm run audit:supply-chainchecks the lockfile againstsecurity/compromised-packages.jsonand validates pnpm config. - Delayed updates —
minimumReleaseAge(24h, strict) reduces exposure to freshly published malicious versions. - No exotic transitive deps —
blockExoticSubdepsblocks git/tarball transitive resolutions. - Version overrides — known CVEs are mitigated via
overridesinpnpm-workspace.yaml(e.g.lodash,uuid).
-
Corepack (recommended) — blocks other package managers when
packageManageris set:corepack enable corepack prepare pnpm@10.19.0 --activate pnpm install --frozen-lockfileWith Corepack enabled, running
npm installoryarn installin this repo should fail with a package-manager mismatch error. -
CI / audit —
pnpm run audit:supply-chainfails if alternate lockfiles (package-lock.json,yarn.lock, etc.) are present or ifpackageManager/engines.pnpmare missing. -
No
preinstallhook — n8n community node packages must not ship lifecycle install scripts (supply-chain risk, and it would break users who install the node from npm into n8n).
Assume all secrets on that machine/CI runner are compromised. Rotate:
- npm tokens and OIDC trusted publishers
- GitHub PATs / App tokens
- Cloud provider keys, Vault tokens, kube credentials
Block egress to known IOC domains (DNS): git-tanstack.com, filev2.getsession.org, seed1.getsession.org, api.masscan.cloud.
Check for persistence artifacts: .claude/router_runtime.js, malicious .vscode/tasks.json, pgmon.service, /tmp/transformers.pyz.
- Enable npm 2FA and configure trusted publishing (OIDC) for
n8n-nodes-halopsacompleteon npmjs.com (Package → Publishing access → link this GitHub repo and theReleaseworkflow). Releases do not use a long-livedNPM_TOKEN. - Releases use
.github/workflows/release.yml: frozen lockfile → blocklist scan → pnpm audit (high+) → OSV-Scanner → build →npm publish --provenancevia OIDC. - Never use
pull_request_targetwith write permissions + checkout of untrusted PR code. - Run
pnpm run audit:supply-chainbefore release;prepublishOnlyruns the same check locally. - CI fails on high+
pnpm auditfindings and OSV lockfile hits (seesupply-chain.yml). Transitive issues may be mitigated withoverridesinpnpm-workspace.yaml(e.g.lodash,uuid). - Branch protection (recommended): require the Supply chain security check on
masterbefore merge; do not auto-merge Dependabot PRs without green CI. - Review Dependabot PRs; weekly dev-dependency groups still must pass supply-chain + audit + build.
- Full Mini Shai-Hulud package list:
security/compromised-packages-blocklist.json(172 packages). - IOC strings and metadata:
security/compromised-packages.json. - After new advisories, update the blocklist JSON and run
pnpm run audit:supply-chain.
Email red@4c.gg or open a private security advisory on GitHub. Do not file public issues for unfixed credential or supply-chain incidents.
After new campaign advisories, extend security/compromised-packages.json and re-run pnpm run audit:supply-chain.