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

Filter requests in main process and block not allowed domains #7171

Closed
karliatto opened this issue Dec 8, 2022 · 3 comments · Fixed by #16264
Closed

Filter requests in main process and block not allowed domains #7171

karliatto opened this issue Dec 8, 2022 · 3 comments · Fixed by #16264
Assignees
Labels
code Code improvements

Comments

@karliatto
Copy link
Member

Currently suite is filtering all requests in the renderer process and blocking the ones that are to not allowed domains packages/suite-desktop/src/modules/request-filter.ts.

We did not have a way to filter requests in main process therefore we could not do it there but now that we have request-interceptor from request-manager package we can implement the same filter of domains for main process.

@karliatto karliatto added the code Code improvements label Dec 8, 2022
@mroz22
Copy link
Contributor

mroz22 commented Jul 16, 2024

going through old issues now. this seems to be security related and since @komret and @peter-sanderson were browsing this field, I am tagging them, whether this is something they want to push. I am sure @karliatto would be able to assist/explain his idea

@komret
Copy link
Contributor

komret commented Jul 16, 2024

Yes, we can do this. I suppose the worst part is to put together the whitelist? Do you know which URLs should be allowed?

@karliatto
Copy link
Member Author

Yes, we can do this. I suppose the worst part is to put together the whitelist? Do you know which URLs should be allowed?

Starting with 'trezor.io, 'localhost' and '127.0.0.1', also as URLs used for all the coins backends, and do a bit of research in the code and in the running app not to miss anything that is using the main process.

By looking at this list https://github.com/trezor/trezor-suite/blob/develop/packages/suite-desktop-core/src/config.ts I think some of the URLs there are not necessary in renderer anymore since the discovery in desktop is running in the main process.

@komret komret moved this to 🏃‍♀️ In progress in Suite Desktop Aug 23, 2024
@peter-sanderson peter-sanderson moved this from 🏃‍♀️ In progress to 🎯 To do in Suite Desktop Jan 6, 2025
@peter-sanderson peter-sanderson moved this from 🎯 To do to 🏃‍♀️ In progress in Suite Desktop Jan 7, 2025
@peter-sanderson peter-sanderson self-assigned this Jan 7, 2025
@github-project-automation github-project-automation bot moved this from 🏃‍♀️ In progress to 🤝 Needs QA in Suite Desktop Jan 21, 2025
@bosomt bosomt moved this from 🤝 Needs QA to ✅ Approved in Suite Desktop Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code Code improvements
Projects
Status: ✅ Approved
Development

Successfully merging a pull request may close this issue.

4 participants