Skip to content

The environment variable N8N_RUNNERS_STDLIB_ALLOW=* did not take effect #20538

Description

@ichat001

Bug Description

see demo:

demo.mp4

To Reproduce

  1. copy docker-compose.yml
  2. run docker compose up -d
  3. test python code:
import sys
output = f"Python version: {sys.version}"
return {"data": output}

docker-compose.yml:

services:
  n8n:
    image: n8nio/n8n:next
    container_name: n8n
    environment:
      - N8N_RUNNERS_ENABLED=true
      - N8N_RUNNERS_MODE=external
      - N8N_RUNNERS_BROKER_LISTEN_ADDRESS=0.0.0.0
      - N8N_RUNNERS_AUTH_TOKEN=your-secret-here
      - N8N_NATIVE_PYTHON_RUNNER=true
    ports:
      - "5678:5678"
    volumes:
      - n8n_data:/home/node/.n8n

  task-runners:
    image: n8nio/runners:nightly
    container_name: n8n-runners
    environment:
      - N8N_RUNNERS_TASK_BROKER_URI=http://n8n:5679
      - N8N_RUNNERS_AUTH_TOKEN=your-secret-here
      - N8N_RUNNERS_STDLIB_ALLOW=*
      - N8N_RUNNERS_EXTERNAL_ALLOW=*
    depends_on:
      - n8n

volumes:
  n8n_data:

Expected behavior

Import of standard library module 'sys' is allow

Debug Info

Security violations detected
Line 1: Import of standard library module 'sys' is disallowed. Allowed stdlib modules: none

Operating System

docker

n8n Version

1.115.1

Node.js Version

22.19.0

Database

SQLite (default)

Execution mode

main (default)

Hosting

self hosted

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions