Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #30845 > unrolled thread
| Started by | Robin Krahl <me@robin-krahl.de> |
|---|---|
| First post | 2012-10-06 00:22 +0200 |
| Last post | 2012-10-06 02:11 -0700 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.lang.python
Executing untrusted scripts in a sandboxed environment Robin Krahl <me@robin-krahl.de> - 2012-10-06 00:22 +0200
Re: Executing untrusted scripts in a sandboxed environment Ramchandra Apte <maniandram01@gmail.com> - 2012-10-06 02:11 -0700
Re: Executing untrusted scripts in a sandboxed environment Ramchandra Apte <maniandram01@gmail.com> - 2012-10-06 02:11 -0700
| From | Robin Krahl <me@robin-krahl.de> |
|---|---|
| Date | 2012-10-06 00:22 +0200 |
| Subject | Executing untrusted scripts in a sandboxed environment |
| Message-ID | <mailman.1876.1349476204.27098.python-list@python.org> |
Hi all,
I need to execute untrusted scripts in my Python application. To avoid security issues, I want to use a sandboxed environment. This means that the script authors have no access to the file system. They may only access objects, modules and classes that are "flagged" or "approved" for scripting.
I read that I will not be able to do this with Python scripts. (See SandboxedPython page in the Python wiki [0] and several SE.com questions, e. g. [1].) So my question is: What is the best way to "embed" a script engine in a sandboxed environment that has access to the Python modules and classes that I provide?
Thanks for your help.
Best regards,
Robin
[0] http://wiki.python.org/moin/SandboxedPython
[1] http://stackoverflow.com/questions/3068139/how-can-i-sandbox-python-in-pure-python
[toc] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2012-10-06 02:11 -0700 |
| Message-ID | <90140a07-b532-4de7-b764-233d1bb487b4@googlegroups.com> |
| In reply to | #30845 |
On Saturday, 6 October 2012 04:00:08 UTC+5:30, Robin Krahl wrote: > Hi all, > > I need to execute untrusted scripts in my Python application. To avoid security issues, I want to use a sandboxed environment. This means that the script authors have no access to the file system. They may only access objects, modules and classes that are "flagged" or "approved" for scripting. > > I read that I will not be able to do this with Python scripts. (See SandboxedPython page in the Python wiki [0] and several SE.com questions, e. g. [1].) So my question is: What is the best way to "embed" a script engine in a sandboxed environment that has access to the Python modules and classes that I provide? > > Thanks for your help. > > Best regards, > Robin > > [0] http://wiki.python.org/moin/SandboxedPython > [1] http://stackoverflow.com/questions/3068139/how-can-i-sandbox-python-in-pure-python From http://wiki.python.org/moin/SandboxedPython "The Java and CLR/.NET runtimes support restricted execution, and these can be utilised through the Jython and IronPython variants of Python (as well as by other languages, obviously)." You can also check out http://doc.pypy.org/en/latest/sandbox.html for PyPy's sandbox
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2012-10-06 02:11 -0700 |
| Message-ID | <mailman.1896.1349514717.27098.python-list@python.org> |
| In reply to | #30845 |
On Saturday, 6 October 2012 04:00:08 UTC+5:30, Robin Krahl wrote: > Hi all, > > I need to execute untrusted scripts in my Python application. To avoid security issues, I want to use a sandboxed environment. This means that the script authors have no access to the file system. They may only access objects, modules and classes that are "flagged" or "approved" for scripting. > > I read that I will not be able to do this with Python scripts. (See SandboxedPython page in the Python wiki [0] and several SE.com questions, e. g. [1].) So my question is: What is the best way to "embed" a script engine in a sandboxed environment that has access to the Python modules and classes that I provide? > > Thanks for your help. > > Best regards, > Robin > > [0] http://wiki.python.org/moin/SandboxedPython > [1] http://stackoverflow.com/questions/3068139/how-can-i-sandbox-python-in-pure-python >From http://wiki.python.org/moin/SandboxedPython "The Java and CLR/.NET runtimes support restricted execution, and these can be utilised through the Jython and IronPython variants of Python (as well as by other languages, obviously)." You can also check out http://doc.pypy.org/en/latest/sandbox.html for PyPy's sandbox
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web