Commit Graph

31 Commits

Author SHA1 Message Date
Mutasem Aldmour
8f758f48ef
test(core): Cover the Python import allowlist across the n8n/runner seam
n8n now parses the same allowlist the Python runner enforces, so the two can
drift: the runner's suite and n8n's unit tests could both stay green while the
builder describes a policy that is not applied.

- Add a shared fixture, read by a test on each side, pinning how
  N8N_RUNNERS_STDLIB_ALLOW / N8N_RUNNERS_EXTERNAL_ALLOW parse. It caught a real
  divergence on the first run: the runner returns a set and collapses
  duplicates, n8n's parser did not. Fixed.
- Add an integration test that starts the Python runner for real and drives a
  Code node through the broker, covering config -> spawned runner env ->
  enforcement in one path: import-free code runs, an allowlisted import runs, a
  non-allowlisted one is rejected, and the rejection names the configured list
  (so it cannot pass against an empty default).

The integration test needs the runner's virtualenv and skips without it, which
is most Node CI lanes today; verified it skips rather than fails. Making
`getVenvPath` public is what lets it decide that synchronously.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-27 11:42:14 +02:00
Lorent Lempereur
b6bb202b7b
refactor: Assign task runner IDs from n8n (#35494) 2026-08-10 11:20:37 +00:00
Emilia
95a81ed219
feat(core): Add N8N_RUNNERS_ALLOW_TRANSITIVE_IMPORTS for the Python task runner (#33130)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 08:20:12 +00:00
Emilia
46aa8e4af7
fix(core): Let allowlisted Python packages import their own submodules via relative imports (#32772)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 08:32:02 +00:00
n8n-assistant[bot]
71262655e4
chore: Bundle/2.x (#32031)
Co-authored-by: Matsu <matias.huhta@n8n.io>
Co-authored-by: Dawid Myslak <dawid.myslak@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Arvin A <51036481+DeveloperTheExplorer@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Dimitri Lavrenük <20122620+dlavrenuek@users.noreply.github.com>
Co-authored-by: Garrit Franke <32395585+garritfra@users.noreply.github.com>
Co-authored-by: Jaakko Husso <jaakko@n8n.io>
Co-authored-by: Daria <daria.staferova@n8n.io>
Co-authored-by: Oğuz Eroğlu <oguz.eroglu@n8n.io>
Co-authored-by: Robin Braumann <robin.braumann@n8n.io>
Co-authored-by: oleg <me@olegivaniv.com>
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
Co-authored-by: José Braulio González Valido <jose.gonzalez@n8n.io>
Co-authored-by: Alexander Gekov <40495748+alexander-gekov@users.noreply.github.com>
Co-authored-by: Bernhard Wittmann <bernhard.wittmann@n8n.io>
2026-06-10 07:42:43 +00:00
n8n-assistant[bot]
d4f9223842
chore: Bundle/2.x (#31173)
Co-authored-by: Matsu <matias.huhta@n8n.io>
Co-authored-by: Elias Meire <elias@meire.dev>
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Dawid Myslak <dawid.myslak@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-27 08:36:28 +03:00
Iván Ovejero
a7864762ca
fix: Restore broken stdlib calls in Python Code node (#29776) 2026-05-05 11:53:14 +00:00
n8n-assistant[bot]
85b7796434
chore: Bundle 2.x (#28844)
Co-authored-by: Matsu <matias.huhta@n8n.io>
Co-authored-by: Dawid Myslak <dawid.myslak@gmail.com>
Co-authored-by: Bernhard Wittmann <bernhard.wittmann@n8n.io>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Dimitri Lavrenük <20122620+dlavrenuek@users.noreply.github.com>
Co-authored-by: Benjamin Schroth <68321970+schrothbn@users.noreply.github.com>
Co-authored-by: Danny Martini <danny@n8n.io>
Co-authored-by: RomanDavydchuk <roman.davydchuk@n8n.io>
Co-authored-by: Sandra Zollner <sandra.zollner@n8n.io>
Co-authored-by: Milorad FIlipović <milorad@n8n.io>
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
2026-04-22 08:51:32 +03:00
n8n-assistant[bot]
562d867483
chore: Bundle 2026-W7 (#26214)
Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
Co-authored-by: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
Co-authored-by: yehorkardash <yehor.kardash@n8n.io>
Co-authored-by: James Gee <1285296+geemanjs@users.noreply.github.com>
Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Stephen Wright <sjw948@gmail.com>
Co-authored-by: oleg <me@olegivaniv.com>
Co-authored-by: Albert Alises <albert.alises@gmail.com>
Co-authored-by: Danny Martini <danny@n8n.io>
2026-02-25 07:08:58 +00:00
Iván Ovejero
483c8210ee
feat(core): Add drain timeout for runners (#24290) 2026-02-06 13:34:53 +00:00
Tomi Turtiainen
659de949cb
feat(core): Add profiling support via sentry (#25049) 2026-01-30 09:49:50 +00:00
Iván Ovejero
8693d9ead1
refactor(core): Improve Python match extraction handling (#24975) 2026-01-28 10:37:33 +00:00
Iván Ovejero
76b4604a31
refactor(core): Improve f-string handling (#24864) 2026-01-27 08:52:35 +00:00
Iván Ovejero
63c2f82741
refactor(core): Normalize exception attribute access in Python task runner (#24216) 2026-01-13 14:22:33 +00:00
Iván Ovejero
93bb0c5399
fix(core): Ensure runner does not terminate pipe reader prematurely (#23448) 2025-12-19 17:16:17 +01:00
Iván Ovejero
9a56529d5d
fix(core): Protect against name-mangling in native Python runner (#21482) 2025-11-03 13:16:47 +01:00
Iván Ovejero
fbd60d2a07
fix(core): Ensure reconnect on broker down in native Python runner (#21475) 2025-11-03 14:11:39 +02:00
Iván Ovejero
98baeec45e
refactor(core): Minor leftover cleanups in native Python runner (#21473) 2025-11-03 13:04:54 +01:00
Iván Ovejero
614f89b8a0
refactor(core): Switch to multiprocessing pipes in native Python runner (#21232) 2025-10-30 12:29:59 +01:00
Iván Ovejero
7cea1e26fe
fix(core): Harden security restrictions in native Python runner (#21263) 2025-10-28 11:47:47 +01:00
Iván Ovejero
8527e4b6f1
feat(core): Support N8N_BLOCK_RUNNER_ENV_ACCESS in native Python runner (#21215) 2025-10-27 12:15:54 +01:00
Iván Ovejero
4de20da3da
refactor(core): Strengthen Python security validator (#21086) 2025-10-23 13:40:13 +02:00
Iván Ovejero
6bb660b52e
refactor(core): Improve observability for task failures in native Python runner (#20754) 2025-10-14 12:28:27 +02:00
Iván Ovejero
7ae88f836c
fix(core): Block introspection attributes unconditionally (#20641) 2025-10-10 13:59:34 +02:00
Iván Ovejero
09c8559c2c
fix: Prevent runtime import via __builtins__ dict in native Python runner (#20628) 2025-10-10 12:39:30 +02:00
Iván Ovejero
bcdbada74b
fix(core): Tighten Sentry error filtering in native Python runner (#20500) 2025-10-08 09:26:58 +02:00
Iván Ovejero
5a3adf5c97
feat(core): Support _FILE in native Python runner (no-changelog) (#20035) 2025-09-26 12:03:36 +02:00
Iván Ovejero
72a94c5e41
fix(core): Do not report SyntaxError to Sentry in native Python runner (no-changelog) (#20031) 2025-09-25 17:11:34 +02:00
Iván Ovejero
b5e685b6f2
fix(core): Do not report security violations to Sentry in native Python runner (no-changelog) (#19867) 2025-09-22 16:50:49 +02:00
Iván Ovejero
36958e3ffa
test: Add integration tests for execution flows in native Python runner (#19198) 2025-09-05 10:49:45 +02:00
Iván Ovejero
fc094518d6
test(core): Test security validation in native Python runner (#19146) 2025-09-03 16:19:01 +02:00