googlecolab / colabtools

Python libraries for Google Colaboratory
Apache License 2.0
2.17k stars 705 forks source link

ufw or domain filtering or blocking the network access of the notebook #4376

Open nnWhisperer opened 7 months ago

nnWhisperer commented 7 months ago

In the dynamic landscape of library usage within Google Colab notebooks, there is an increasing concern about the safety and security of accessing external data. The current lack of network access controls poses a challenge for users who wish to limit data access after installing dependent packages. This is particularly relevant given the uncertainty surrounding the safety of various libraries.

I propose the implementation of a network access feature in Google Colab notebooks. This feature should allow users to control and limit network access, similar to the functionality provided by Kaggle notebooks. This control would enable users to manage data security more effectively and reduce potential risks associated with unknown library behaviors. Domain name filtering like ufw could be handier, where we can explicitly permit some domains and some API calls while restricting all others.

I tried ufw of ubuntu and several security related github repositories such as sniffnet; but it needs cap_net_raw etc capabilities not permitted even for the root user of the colab instances. So, I couldn't do it. Having an integrated feature within Google Colab would be more seamless and user-friendly.

There are nowadays a lot of libraries that collect data (some without even asking for it) and hence they bring potential security and privacy problems.

cperry-goog commented 7 months ago

thanks for the suggestion, we're unlikely to get to this soon, but keeping it open in case one of variants like Colab Enterprise is a good fit.