By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,199 Members | 1,064 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,199 IT Pros & Developers. It's quick & easy.

Running scripts in a sandbox

P: n/a
Hi,

I currently have two files:

core.py
Runs the application, provides APIs to plugins

untrusted-plugin.py
Executes code using the API from core.py

I would like to run the code of untrusted-plugin.py in a sandbox, but
still provide it with some hooks to the core API.
My environment does not allow me to apply any changes OS-wise (standard
web hoster), so I have no way to run the plugin in another process.

I found a reference to rexec using Google, but apparently it was
removed due to security issues in Python 2.3. Is there antoher way to
do this?

Thanks,
-Samuel

Oct 3 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Samuel schrieb:
Hi,

I currently have two files:

core.py
Runs the application, provides APIs to plugins

untrusted-plugin.py
Executes code using the API from core.py

I would like to run the code of untrusted-plugin.py in a sandbox, but
still provide it with some hooks to the core API.
My environment does not allow me to apply any changes OS-wise (standard
web hoster), so I have no way to run the plugin in another process.

I found a reference to rexec using Google, but apparently it was
removed due to security issues in Python 2.3. Is there antoher way to
do this?
ZOPE has some restriced execution environment - maybe you can borrow it.
But it is very restrictive I believe, and generally speaking python
isn't equipped to support fine coarsed resource control. Maybe at some
point PyPy might help there, but that certainly will take a while and
isn't standard webhoster stuff either.

diez
Oct 3 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.