RestrictedPython
RestrictedPython copied to clipboard
A restricted execution environment for Python to run untrusted code.
Look through the change log of Python 3.11 (once the final version is released) for potential issues which need to be handled by RestrictedPython to prevent access to otherwise forbidden...
Hi, Is there a way to include annotated assignment in the code being executed? ``` sample_code = """ a: int = 1 """ supported_builtins["_getattr_"] = safer_getattr supported_builtins["_getiter_"] = default_guarded_getiter supported_builtins["_iter_unpack_sequence_"]...
Currently the documentation contains copied and doubled text as well as German documentation parts. That should be consolidated and translated / removed. We should have a consistent documentation, so that...
@stephan-hof did bring up the point that the current handling of `flags` and `dont_inherit` did not work as expected in https://github.com/zopefoundation/RestrictedPython/pull/39#issuecomment-283074699 > Currently this inheritance is not compatible. > Let's...
All source code in Restricted Python should be reviewed and all methods should have a descriptive doc string
Following up from https://github.com/plone/Products.CMFPlone/pull/2839: Why does RestrictedPython not allow to use `python:mytemplate.macros['master']` in a template but `mytemplate/macros/master` is allowed? `macros` is the property `chameleon.zpt.program.import.macros` which returns a `chameleon.zpt.template.Macros` object. Allowed:...
The Check for: ```python elem in my_object ``` should be created to check if ``in``and ``not in`` are handled correct. This Issue supersedes #113
``` d = {"test": 0} d["test"]+=1 >>> Augmented assignment of object items and slices is not allowed. ``` Why is this a security risk and is it possible to safely...
Base: https://docs.python.org/2/library/code.html / https://docs.python.org/3/library/code.html Guards should either deny access or print that they were called.
The Package README should be improved and included in tests, to show that the code it contains actually works.