
rsl-interpreter
RSL is an embedded interpreter and bytecode executor within Python. It executes code that is written in a Python-like syntax, but allows the developer who is writing their application in Python to restrict exactly what their users can and can't do. Not only this, but because the interpreter is written in Python, the integration between Python code (which has higher permissions) and RSL code (which is locked down) is much greater, while still maintaining the security in RSL code.
RSL RequirementsNew:Version 1.1 released. Contains support for error handling via try-except statement and includes bugfixes for string concatenation.
You need to have the PyParsing module installed in your Python distribution for RSL to work.
What is RSL designed for?RSL is designed to be used within the following environments and situations. * On web servers, where user code needs to be run without the security risks imposed by running native Python. * Where the secured user code needs to have strong integration with the higher level Python code (such as running the user code inside a thread started by Python). * Where part of the Python application must have normal permissions and the user code must be secured (e.g. the application can not be sandboxed effectively by external applications). * Where the user code needs to be able to be updated during application execution.
What is RSL not designed for?RSL is not designed for some of the following uses, and you may find other interpreters better suited to these tasks: * Where the user code does not need to secured or prevented from accessing resources. * On client machines where the inputted user code will only ever effect the user's own computer. * Where the user code needs to execute at high speeds.
Why RSL? Why not solution XYZ?Many solutions such as RestrictedPython didn't offer a high enough security for my needs. Although in theory they'd prevent a user from accessing resources, there was no way to guarantee they couldn't, besides sandboxing the full application with AppArmor and a chroot jail. Unfortunately, sandboxing the full application was out of the question, because my code (the Python component) needed to have full access - it was only the user code that required locking down. RSL solves both these issues as the Python code does no longer need to be sandboxed and the user code can't access resources since it's not executing in native Python.
Project Information
- License: MIT License
- 2 stars
- svn-based source control
Labels:
rsl
python
interpreter
secure
bytecode