n8n/packages/nodes-base/nodes/Code
Mutasem Aldmour ff8bc0aa7b
Some checks failed
CI: Python / Checks (push) Has been cancelled
fix(core): Stop the Python import guidance pointing at deployment config
On managed deployments the import allowlist is not the user's to change, so an
agent that names `N8N_RUNNERS_STDLIB_ALLOW` or tells them their setting is
invalid only produces a support request about something nobody will change for
them. Cloud also runs task runners in external mode, where n8n cannot see the
runner's configuration at all, so that guidance was doubly unfounded there.

Every agent- and user-facing surface now states the capability and stops: assume
no imports, write import-free Python, or use JavaScript. Environment variables
survive only in code comments and the config class, where operators read them.

The external-mode and rejected-allowlist cases now share one message. They led to
the same action already, and the separate wording existed only to name the
setting behind each.

Tests pin the rule across every policy shape rather than the phrasing, so a
future edit cannot quietly reintroduce a config recommendation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 15:47:56 +02:00
..
descriptions fix(core): Stop the Python import guidance pointing at deployment config 2026-08-27 15:47:56 +02:00
errors refactor: Re-parent leaf error subclasses to UserError (no-changelog) (#32541) 2026-06-24 10:00:16 +00:00
test refactor(core): Move Result and ensureError into @n8n/utils (no-changelog) (#33375) 2026-07-02 07:46:18 +00:00
Code.node.json feat: Data transformation nodes and actions in Nodes Panel (#7760) 2023-12-08 11:40:05 +01:00
Code.node.ts feat(core): Tell the workflow builder this instance's Python import policy 2026-08-27 10:20:20 +02:00
code.svg docs(editor): Nodes icons, Merge node descriptions (#8517) 2024-02-21 16:04:57 +00:00
ExecutionError.ts refactor: Re-parent leaf error subclasses to UserError (no-changelog) (#32541) 2026-06-24 10:00:16 +00:00
JavaScriptSandbox.ts fix: Unfork @n8n/vm2 (#24509) 2026-01-19 09:11:24 +00:00
JsCodeValidator.ts fix(Code Node): Do not validate code within comments (#12938) 2025-01-30 09:44:35 -05:00
JsTaskRunnerSandbox.ts refactor(core): Use task runner for sort operations (#24910) 2026-02-02 10:26:57 +00:00
python-runner-unavailable.error.ts fix(core): Defer requirements check for Python runner in internal mode (#22448) 2025-11-28 12:35:11 +01:00
PythonTaskRunnerSandbox.ts fix(core): Validate missing code param in Code node (#23405) 2025-12-22 17:29:52 +01:00
reserved-key-found-error.ts refactor(core): Consolidate task result validation in Code node (#18928) 2025-09-02 16:05:10 +02:00
result-validation.ts refactor(core): Consolidate task result validation in Code node (#18928) 2025-09-02 16:05:10 +02:00
Sandbox.ts refactor(core): Consolidate task result validation in Code node (#18928) 2025-09-02 16:05:10 +02:00
throw-execution-error.ts refactor: Replace deprecated ApplicationError in remaining nodes-base nodes (no-changelog) (#32473) 2026-06-17 18:19:46 +00:00
utils.ts refactor(core): Remove NodeExecutionOutput. Add execution hints directly to the context (#13111) 2025-02-10 16:51:01 +01:00
ValidationError.ts refactor: Re-parent leaf error subclasses to UserError (no-changelog) (#32541) 2026-06-24 10:00:16 +00:00