Skip to content

Conversation

@ivov
Copy link
Member

@ivov ivov commented Nov 25, 2025

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Nov 25, 2025
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files

Prompt for AI agents (all 1 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="packages/@n8n/config/src/configs/security.config.ts">

<violation number="1" location="packages/@n8n/config/src/configs/security.config.ts:11">
Defaulting `restrictFileAccessTo` to `/home/user/...` blocks the real n8n data directory on every environment where the username isn’t literally `user`, so file access now fails by default in the standard Docker image and most installs.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

@blacksmith-sh

This comment has been minimized.

@currents-bot
Copy link

currents-bot bot commented Nov 25, 2025

E2E Tests: n8n tests passed after 10m 1.3s

🟢 588 · 🔴 0 · ⚪️ 12 · 🟣 5

View Run Details

Run Details

  • Project: n8n

  • Groups: 2

  • Framework: Playwright

  • Run Status: Passed

  • Commit: 36e1a04

  • Spec files: 96

  • Overall tests: 600

  • Duration: 10m 1.3s

  • Parallelization: 9

Groups

GroupId Results Spec Files Progress
ui 🟢 539 · 🔴 0 · ⚪️ 12 · 🟣 4 90 / 90
ui:isolated 🟢 49 · 🔴 0 · ⚪️ 0 · 🟣 1 6 / 6


This message was posted automatically by currents.dev | Integration Settings

@ivov ivov added the v2-prep label Nov 25, 2025
@ivov ivov force-pushed the cat-57-secure-default-for-n8n_restrict_file_access_to branch 8 times, most recently from f865bb6 to 838c8c1 Compare November 25, 2025 16:43
@ivov ivov force-pushed the cat-57-secure-default-for-n8n_restrict_file_access_to branch from 838c8c1 to 6e6ba2c Compare November 25, 2025 16:48
@n8n-io n8n-io deleted a comment from codecov bot Nov 25, 2025
@ivov ivov requested a review from tomi November 25, 2025 17:01
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@blacksmith-sh

This comment has been minimized.

@ivov ivov removed the request for review from tomi November 25, 2025 17:11
*/
@Env('N8N_RESTRICT_FILE_ACCESS_TO')
restrictFileAccessTo: string = '';
restrictFileAccessTo: string = '~/.n8n-files';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to keep the default value inside the N8N home folder. The breaking change docs mention the default will be

./data directory inside the n8n home folder.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have N8N_BLOCK_FILE_ACCESS_TO_N8N_FILES defaulting to true which according to the code blocks ~/.n8n. This clashes with a default that allowlists a subdir inside ~/.n8n for user operations. Seems more secure to guide users to keep user data separate from n8n internals or they might end up disabling the blocklist for convenience? Product-wise I'm not clear on how these two settings are meant to interact.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm okay, that makes sense. Let's keep it like this and update the v2 breaking changes doc. Could you do that? 🙏

tomi
tomi previously approved these changes Nov 26, 2025
Copy link
Collaborator

@tomi tomi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a test that ~/mydir works as expected?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to keep changes to a minimum or? #22280 (review)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but if we introduce new logic it would be good to have some tests for it.

@ivov ivov requested a review from tomi November 26, 2025 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

n8n team Authored by the n8n team v2-prep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants