Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2004-05-04 17:57:34
Size: 739
Editor: dsl254-010-130
Comment: Idea for a "Sandboxed" Python program.
Revision 3 as of 2004-05-05 09:34:27
Size: 2059
Editor: gate
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Line 14: Line 13:
You're referring to RestrictedExecution, right?

http://docs.python.org/lib/restricted.html

This was brought up recently by Mitch Kapor at PyCon and noted on his [http://blogs.osafoundation.org/mitch/000559.html#000559" blog].

Also see capabilities as mentioned on:

 * http://www.python.org/cgi-bin/moinmoin/PythonThreeDotOh
 * http://mail.python.org/pipermail/python-dev/2003-March/034149.html

I thought there was a PEP about restricted execution in Python, but I can't seem to find it, so I don't know the current thinking of the BDFL or python-dev on this issue, but it is a sorely missed feature that we lost with Python 2.2 and above.

For my part, I think this is something that the PSF should fund development on so that it happens sooner rather than later. There are enough interested parties, that lends itself to getting government or other grant funding. -- KevinAltis

Having used the rexec stuff years ago (1995-6), I seem to recall that the principles of that module involved restricting the modules available, possibly along with the attributes available from each module, class and object. Is there a concise summary of how such mechanisms could have been subverted/exploited and a description of why they are particularly hard to fix? Or is that what this page is about? -- PaulBoddie

Is there such a thing as "Sandboxed Python"..?

Something where you can run a Python that is limited in what it can do.

You could do all sorts of cool things with a sandboxed Python:

  • You could turn a wiki into an RAD development platform. You just draw up your interface with WikiSyntax, write up a little bit of Python code, and bam- instant application. :)

  • You could make a distributed code system, where not just resources, but functionality as well, can distribute safely over multiple computers.

A "Sandboxed Python" would let you permit or forbid modules, limit execution slices, permit or deny network traffic, constrain filesystem access to a particular directory (floated as "/"), etc., etc.,.

You're referring to RestrictedExecution, right?

http://docs.python.org/lib/restricted.html

This was brought up recently by Mitch Kapor at PyCon and noted on his [http://blogs.osafoundation.org/mitch/000559.html#000559" blog].

Also see capabilities as mentioned on:

I thought there was a PEP about restricted execution in Python, but I can't seem to find it, so I don't know the current thinking of the BDFL or python-dev on this issue, but it is a sorely missed feature that we lost with Python 2.2 and above.

For my part, I think this is something that the PSF should fund development on so that it happens sooner rather than later. There are enough interested parties, that lends itself to getting government or other grant funding. -- KevinAltis

Having used the rexec stuff years ago (1995-6), I seem to recall that the principles of that module involved restricting the modules available, possibly along with the attributes available from each module, class and object. Is there a concise summary of how such mechanisms could have been subverted/exploited and a description of why they are particularly hard to fix? Or is that what this page is about? -- PaulBoddie

SandboxedPython (last edited 2017-06-06 20:21:57 by DmitryS)

Unable to edit the page? See the FrontPage for instructions.