Hello all,

Supply chain attacks are becoming a pressing concern in software development 
due to the large number of dependencies and multiple attack vectors. Using 
third party modules (libraries, packages etc)  is always a risk but the true 
potential of these attacks is now being weaponized. One way to deal with the 
risk is by limiting access to sensitive APIs like filesystem, shell, network 
and ffi so that packages which aren't explicitly granted permissions cannot use 
them, reducing their ability to do damage.

For example, a yaml parser should not need to use ffi, network nor shell. A 
command line argument parser library should not use network, ffi nor 
filesystem. Deno, a runtime for Typescript contains an interesting 
implementation of a permissions model for APIs.

I strongly think Python could benefit from such functionality and hacked 
together a quick experiment here: https://github.com/R9295/cpython
Currently, it only prevents module imports in a very elementary manner but 
perhaps it can be of use to spark a discussion for an implementation.

Looking forward to your thoughts,
Aarnav
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/MZNP5ZJBLMUO74PMZGWJGM6TAZXBK5AS/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to