Skip to content
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

feat(cli): Load all nodes and credentials code in isolation - N8N-4362 #3906

Merged

Conversation

netroy
Copy link
Member

@netroy netroy commented Aug 19, 2022

Currently all nodes and credentials are loaded in the same global context as the rest of the app. This becomes a security nightmare as we have more and more community nodes.

We can fix this by loading all nodes and credentials code in isolated contexts, which in turn also reduces any possibilities of external side-effects creating trouble for any inividial node or credential.

PS: This breaks the functionality in the Function node where one can refer to env variables with expression like $ENV_VAR.

@netroy netroy force-pushed the load-nodes-and-credentials-in-isolated-contexts branch from d2cd702 to f3a449e Compare August 19, 2022 16:26
@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Aug 19, 2022
@netroy netroy force-pushed the load-nodes-and-credentials-in-isolated-contexts branch from f3a449e to 4eb518d Compare August 25, 2022 08:42
@krynble
Copy link
Contributor

krynble commented Aug 29, 2022

Hey @netroy thank you for your contribution!

I'll start reviewing and testing this today and I'll keep you posted.

@krynble krynble self-assigned this Aug 29, 2022
@netroy netroy force-pushed the load-nodes-and-credentials-in-isolated-contexts branch from 4eb518d to 04288a9 Compare August 31, 2022 15:34
@netroy netroy changed the title [N8N-4362] Load all nodes and credentials code in isolation feat(cli): Load all nodes and credentials code in isolation - N8N-4362 Sep 9, 2022
@netroy netroy force-pushed the load-nodes-and-credentials-in-isolated-contexts branch from 04288a9 to 0dc47c8 Compare September 9, 2022 15:55
@netroy netroy merged commit b450e97 into n8n-io:master Sep 9, 2022
@netroy netroy deleted the load-nodes-and-credentials-in-isolated-contexts branch September 9, 2022 16:08
@n8n-assistant n8n-assistant bot added the Upcoming Release Will be part of the upcoming release label Sep 9, 2022
@janober
Copy link
Member

janober commented Sep 15, 2022

Got released with n8n@0.194.0

@janober janober removed the Upcoming Release Will be part of the upcoming release label Sep 15, 2022
valya pushed a commit to valya/n8n that referenced this pull request Nov 8, 2022
n8n-io#3906)

[N8N-4362] Load all nodes and credentials code in isolation

Co-authored-by: Omar Ajoue <krynble@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants