-
Notifications
You must be signed in to change notification settings - Fork 506
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
Allow comm open messages #438
Allow comm open messages #438
Conversation
I have a mimerender extension that opens comms from the client side to communicate with the server (https://github.com/Quansight/ibis-vega-transform). xref vidartf/phoila#11 vidartf/phoila#7 Quansight/ibis-vega-transform#15
Relevant parts of previous discussion:
|
Thanks @saulshanabrook !
Not including comm_open was more of an oversight by me orignially. Is comm_open more likely to execute arbitrary code than other comm messages? |
AFAIK you have to have a comm handler registered on the backend for a |
I am fine with this change! Leaving it open for a bit to leave a chance to comment for more people. |
I guess there is only a super construed corner case where it would be an issue:
Possible at-risk cases:
I haven't been able to find any such cases in core ipywidgets, and a few other libs I searched tough. |
Yeah that is an issue. Basically it means you have to vet all your python code for registered comm handlers. Voila could print this as well when it starts up, so at least you know the attack area. And if you see one that you don't recognize, then you can dig into it. |
Simply a notebook calling |
Interesting security issue, let me think about it before we merge. I also noticed we don't allow comm close events, I guess that is less of a security issue. |
We discussed this at our daily standup today.
So the requirement for comm_open to be safe is that the environment only contains trusted code while the requirement for comm_msg to be safe is that the notebook only contains trusted code. Now, we think that creating widgets from the frontend is a much needed feature in voila. We think that we should merge this and make |
Note: I think the comm targets will only be registered when the python code that registers it is imported. Right? |
This seems strange to me. Should it give these warnings when starting notebook/lab ? |
Yeah. |
I have a mimerender extension that opens comms from the client side to communicate with the server (https://github.com/Quansight/ibis-vega-transform).
xref vidartf/phoila#11 vidartf/phoila#7 Quansight/ibis-vega-transform#15