Skip to content

chore(security): query OSV for malicious packages in supply chain check - #39

Merged
redanthrax merged 1 commit into
masterfrom
chore/supply-chain-osv-check
Oct 24, 2026
Merged

redanthrax merged 1 commit into
masterfrom
chore/supply-chain-osv-check

Conversation

@redanthrax

Copy link
Copy Markdown
Owner

Summary

  • scripts/check-supply-chain.mjs now sends every locked package to the OSV batch API and fails on any malicious-package (MAL-) record. The static blocklist only covered the May 2026 Mini Shai-Hulud wave, so it missed later campaigns such as the August 2026 keyv/cacheable "ChainDrop" worm and tensorlake 0.5.144. prepublishOnly and local runs get this without osv-scanner installed.
  • If OSV is unreachable, the check fails. SUPPLY_CHAIN_OFFLINE=1 skips the OSV query and falls back to the static blocklist with a warning.
  • SECURITY.md describes the OSV query and treats the static blocklist as an offline fallback.
  • Pin stream-json to 3.7.0 (GHSA-jj87-hc4r-jwfw) and zod@4 to 4.6.7 (GHSA-mrhx-c7xc-m3w5). Both are dev-only through @n8n/node-cli.
  • Ignore GHSA-mrhx-c7xc-m3w5 (zod <4.6.6) for zod 3.x in pnpm-workspace.yaml auditConfig and osv-scanner.toml (OSV ignore expires 2027-01-24). zod 3 is only a dev/peer dependency of n8n-workflow and never ships, and n8n-workflow (including stable 2.44.2) still requires zod 3, for which there is no patched release. The existing braces entry is unchanged.

Testing

  • Full supply chain pipeline run locally: frozen install, audit:supply-chain (610 packages checked against OSV), pnpm audit --audit-level=high, osv-scanner v2.3.3, build, pnpm test (20/20), lint. All pass. Before this change, pnpm audit and OSV failed on zod and stream-json.
  • The peer-dependency warnings for zod/openai were there before this change; only the resolved zod 4 version changed (4.4.3 → 4.6.7).
  • The OSV query code is the same as in redanthrax/tacticalrmm-node, where detection and failure when OSV is unreachable were tested.

The static blocklist only covered the May 2026 Mini Shai-Hulud wave. The
check now asks OSV for MAL- records on every locked package (fails closed;
SUPPLY_CHAIN_OFFLINE=1 skips it), and clears current audit/OSV findings
in dev-only dependencies.
@redanthrax
redanthrax merged commit d935f97 into master Oct 24, 2026
1 check passed
@redanthrax
redanthrax deleted the chore/supply-chain-osv-check branch October 24, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant