Skip to content

Automation plugins: patch undici and the bundled zod; reviewed audit exception for n8n's zod 3 - #89

Merged
benediktveith merged 2 commits into
mainfrom
fix/automation-audit
Oct 24, 2026
Merged

benediktveith merged 2 commits into
mainfrom
fix/automation-audit

Conversation

@benediktveith

Copy link
Copy Markdown
Contributor

Fixes #84.

Changes (plugins/automations)

  • undici → 6.29.1 (override): GHSA-4qv8-2p9j-2685, GHSA-xjj6-f33q-929c. Not a breaking change; @ai-sdk/provider-utils asks for ^6.28.0.
  • zod → 4.6.7 for @activepieces/pieces-framework and @activepieces/shared (scoped overrides, same major): GHSA-mrhx-c7xc-m3w5. This is the zod the Activepieces piece bundles; activepieces/dist/dependencies.json now lists only zod@4.6.7.
  • npm run audit → scripts/audit.mjs: runs npm audit --audit-level=low as before, with one reviewed exception (below). The exception matches advisory + install path + exact version, so any other finding, or a different zod version at that path, still fails.

n8n's zod 3 path: is it affected?

Yes, on paper: the advisory range is zod < 4.6.6. zod 3.25.76 ships the zod 4 core under zod/v4, and that core contains the vulnerable handleArrayResult (zod/v4/core/schemas.js). n8n-workflow imports zod/v4.
But no fix is available: there is no patched 3.x (3.25.76 is the last one). The current @n8n/expression-runtime (0.35.0) still pins zod 3.25.76. Forcing zod 4 onto it would be a breaking change for n8n-workflow, and npm audit fix --force only suggests a downgrade to n8n-workflow 1.75.1.
And it is dev-only in this repo: n8n-workflow is a peer dependency of n8n-nodes-patronus that the n8n host provides at runtime. n8n/dist contains no zod, and no shipped bundle contains this copy. That is why it is a documented exception, to be removed once n8n moves to zod ≥ 4.6.6.

Test

  • npm test (build + typecheck + 55 tests): passed. n8n lint: ok.
  • npm run audit: passes; it lists 3 entries, all from the one excepted advisory.
  • Negative check: with a non-matching version in the exception, the audit fails on all three entries.
  • The lockfile was generated with npm 11.21.1, like the current Node 24 in CI. With the local npm 11.6.2, npm ci in n8n/ fails because that npm reads the lockfile differently.

🤖 Generated with Claude Code

…exception for n8n's zod 3

- undici 6.29.1 (GHSA-4qv8-2p9j-2685, GHSA-xjj6-f33q-929c).
- zod 4.6.7 for @activepieces/pieces-framework and @activepieces/shared; this is the zod the
  Activepieces piece bundles (GHSA-mrhx-c7xc-m3w5).
- zod 3.25.76 under n8n-workflow / @n8n/expression-runtime has no patched 3.x and ships the
  affected zod 4 core under zod/v4. It is dev-only here (n8n-workflow is a peer the n8n host
  provides; no shipped bundle contains it), so scripts/audit.mjs excepts exactly that
  advisory at that path and version. Everything else still fails the audit.

Fixes #84.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T16:10:43.315938Z 59dbfff PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 59dbfff87f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/automations/scripts/audit.mjs Outdated
An unreachable or failing audit endpoint returned error-only JSON, which the wrapper read
as a clean audit. It now exits 1 unless npm returns a vulnerability report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@benediktveith
benediktveith merged commit 0ad8b99 into main Oct 24, 2026
17 checks passed
@benediktveith
benediktveith deleted the fix/automation-audit branch October 24, 2026 16:25
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.

Automation plugins: npm audit fails on new undici and zod advisories

1 participant