RestrictedPython
RestrictedPython copied to clipboard
A restricted execution environment for Python to run untrusted code.
How the 'min' function can be supported? I've studied the ZopeGuards.py but I'm lost a bit. The 'guard' function uses other objects from AccesControl. Is it possible to provide a...
It seems bytearray is not supported. How can I fix it myself? 
## BUG/PROBLEM REPORT / FEATURE REQUEST ### What I did: Please see the attached code. [test1.zip](https://github.com/zopefoundation/RestrictedPython/files/14626831/test1.zip) ### What I expect to happen: No error message ### What actually happened: ImportError:...
## BUG/PROBLEM REPORT / FEATURE REQUEST ### What I did: Added package to safe_globals: ```python import dateutil safe_globals = { # Others "dateutil": dateutil } ``` #### Code ```python dateutil.parser.parse("2024-01-01").strftime("%d/%m/%Y")...
## BUG/PROBLEM REPORT / FEATURE REQUEST Description: In a restricted Python package environment, the following code snippet: python 3.10.0 ``` try: exec("import os; os.system('ls'); print('**')") except: pass ``` successfully executes...
## BUG/PROBLEM REPORT / FEATURE REQUEST `RestrictingNodeTransformer` rewrites usage of `print`, and expects its output to be retrieved with `printed`. This is too opinionated for my use case (plus I...
Look through the change log of Python 3.14 (once the first release candidate version is released End of July 2025 (see https://peps.python.org/pep-0745/)) for potential issues which need to be handled...