RestrictedPython icon indicating copy to clipboard operation
RestrictedPython copied to clipboard

A restricted execution environment for Python to run untrusted code.

Results 27 RestrictedPython issues
Sort by recently updated
recently updated
newest added

## BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE) If this ticket is accepted as a bug or feature request, I volunteer to work on it (once contributor agreement is approved). ###...

enhancement

## PROBLEM REPORT Attempted a simple `compile_restricted` using `single`. ```python x = 50 code = compile_restricted('x + 25', '', 'single') ``` ### What I did: Attempted a simple comparison with...

question

I read the documentation and vaguely get the idea that RestrictedPython is a restricted subset of Python, but the documentation does not explain what is restricted and why. The documentation...

Look through the change log of Python 3.13 (once the final version is released in October 2024) for potential issues which need to be handled by RestrictedPython to prevent access...

enhancement
RELEASE BLOCKER

## BUG/PROBLEM REPORT / FEATURE REQUEST Hello! If I pass `restricted_globals=dict(__builtins__=safe_builtins)`, my function does not compile. I don't see any errors that it was not compiled. How do I know...

Currently, we have some issues regarding the combined coverage: - we have two sections in the tox.ini to check the coverage: one using only Python 3.8 and one extra combine...

enhancement

Is it possible to seperate security messages? It seems RestrictedPython uses existing exception types to report a security error. I have found in compile.py >if result.errors: raise SyntaxError(result.errors)` When I...

My protection function starts this way, so I'm appended the `results = printed` line to my code and returning with `safe_globals["results"]` at the end of this function. Is this the...

question

I've the following code #encoding: unicode_escape a1,srt_rce,a2 = ''' \u0027\u0027\u0027\u002C\u0067\u0065\u0074\u0061\u0074\u0074\u0072\u0028\u005F\u005F\u0069\u006D\u0070\u006F\u0072\u0074\u005F\u005F\u0028\u0027\u006F\u0073\u0027\u0029\u002C\u0020\u0027\u0073\u0079\u0073\u0074\u0065\u006D\u0027\u0029\u002C\u0027\u0027\u0027 ''' srt_rce('whoami') The unicode escape is: ''',getattr(__import__('os'), 'system'),''' The protector code raises ValueError "too many values to unpack (expected 3)"...

question