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

Restricting folder and files user can access from frontend #405

Closed
aersam opened this issue Jul 3, 2023 · 3 comments · Fixed by #439
Closed

Restricting folder and files user can access from frontend #405

aersam opened this issue Jul 3, 2023 · 3 comments · Fixed by #439
Labels
enhancement New feature or request

Comments

@aersam
Copy link

aersam commented Jul 3, 2023

https://reata.github.io/sqllineage/?f=/etc/passwd should not display the whole /etc tree. Contents are not displayed, however :)

Looks a bit like a security issue

@reata
Copy link
Owner

reata commented Jul 3, 2023

Just seeing /etc/passwd is already kind of scary  ̄︶ ̄

We should definitely limit the f parameter to be subfolder of SQLLINEAGE_DIRECTORY. Thanks for reporting this.

@reata reata added the enhancement New feature or request label Jul 3, 2023
@aersam
Copy link
Author

aersam commented Jul 3, 2023

No problem. You also should ban using .. in the path, just to avoid path traversal completely

@reata reata changed the title Demo site seems to be a bit too flexible ;) Restricting folder and files user can access from frontend Aug 27, 2023
@reata
Copy link
Owner

reata commented Aug 27, 2023

We will return 403 when frontend sends request quering folder outside parent path. Everything is calculated based on absolute path. For user hosted sqllineage, this will be fine.

For demo site, it's not hosted by sqllineage's webapp though. And it's in a standalone docker image without sensitive info. I'll stay as it is for the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants