-
Notifications
You must be signed in to change notification settings - Fork 1
feat(docker): add blocked nodes configuration for n8n in production #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ompose file - Introduced a new environment variable `N8N_BLOCKED_NODES` in the `docker-compose.prod.yml` file to specify blocked nodes for the n8n service. This change enhances the n8n service by allowing users to restrict certain nodes, improving security and control over workflows.
WalkthroughA new environment variable, Changes
Possibly related PRs
Suggested reviewers
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
🔍 Vulnerabilities of
|
digest | sha256:3000bb798b32fb0a465e9be2070f4cb5e54a1fda0e4d3b570b24314684508568 |
vulnerabilities | |
platform | linux/amd64 |
size | 243 MB |
packages | 1628 |
📦 Base Image node:20-alpine
Description
| ||||||||||||
Description
| ||||||||||||
Description
| ||||||||||||
Description
| ||||||||||||
Description
| ||||||||||||
Description
| ||||||||||||
Description
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
docker-compose.prod.yml (2)
21-21
: Document the new environment variable
Please update your project documentation (e.g.,README.md
,.env.example
) to includeN8N_BLOCKED_NODES
, describe its format (a comma-separated list of node IDs), and explain its default behavior when unset.Would you like help generating the necessary documentation updates?
21-21
: Quote comma-separated value for clarity
Although commas are valid unquoted, wrapping the assignment in quotes prevents parsing issues if values change (e.g., include spaces). For example:- - N8N_BLOCKED_NODES=n8n-nodes-base.executeCommand,n8n-nodes-base.ssh + - "N8N_BLOCKED_NODES=n8n-nodes-base.executeCommand,n8n-nodes-base.ssh"
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docker-compose.prod.yml
(1 hunks)
🔇 Additional comments (1)
docker-compose.prod.yml (1)
21-21
:❌ Incorrect review comment
Verify n8n version compatibility for N8N_BLOCKED_NODES
Ensure that the n8n Docker image you’re deploying supports theN8N_BLOCKED_NODES
environment variable (it was introduced in a specific n8n release). If an older image is used, this variable may be ignored and blocking won’t take effect.
🌐 Web query:
Does n8n support the environment variable `N8N_BLOCKED_NODES`? Which version introduced it?
💡 Result:
Yes, n8n supports the environment variable
N8N_BLOCK_ENV_ACCESS_IN_NODE
. This variable controls whether users can access environment variables within expressions and the Code node. By default, it is set tofalse
, allowing access. Setting it totrue
restricts access to environment variables in these contexts. (docs.n8n.io)The
N8N_BLOCK_ENV_ACCESS_IN_NODE
environment variable was introduced in n8n version 0.214.0. (community.n8n.io)Citations:
- 1: https://docs.n8n.io/hosting/configuration/environment-variables/security/?utm_source=openai
- 2: https://community.n8n.io/t/no-access-to-env/20665?utm_source=openai
Correct n8n environment variable and version requirement
The variableN8N_BLOCKED_NODES
does not exist in n8n. You should useN8N_BLOCK_ENV_ACCESS_IN_NODE
instead, which was introduced in n8n v0.214.0. Ensure your Docker image is at least that version so the setting is recognized.• File:
docker-compose.prod.yml
– Line 21: replace
yaml - N8N_BLOCKED_NODES=n8n-nodes-base.executeCommand,n8n-nodes-base.ssh
with something like
yaml - N8N_BLOCK_ENV_ACCESS_IN_NODE=true
Likely an incorrect or invalid review comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
N8N_BLOCKED_NODES
in thedocker-compose.prod.yml
file to specify blocked nodes for the n8n service.This change enhances the n8n service by allowing users to restrict certain nodes, improving security and control over workflows.