Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #30845

Executing untrusted scripts in a sandboxed environment

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <me@robin-krahl.de>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'wiki': 0.03; '[0]': 0.07; 'objects,': 0.07; 'scripts': 0.09; 'python': 0.09; 'scripting.': 0.16; 'scripts.': 0.16; 'url:moin': 0.17; 'all,': 0.21; 'help.': 0.22; 'script': 0.24; 'url:wiki': 0.26; '(see': 0.27; '[1]': 0.27; 'environment.': 0.27; 'question': 0.27; 'authors': 0.27; 'environment': 0.29; 'classes': 0.30; 'url:python': 0.32; 'file': 0.32; 'received:84': 0.32; 'to:addr:python-list': 0.33; 'thanks': 0.34; 'url:org': 0.36; 'modules': 0.36; 'execute': 0.37; 'page': 0.38; 'several': 0.39; 'system.': 0.39; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'your': 0.60
Date Sat, 06 Oct 2012 00:22:38 +0200
Subject Executing untrusted scripts in a sandboxed environment
From Robin Krahl <me@robin-krahl.de>
To python-list@python.org
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding base64
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1876.1349476204.27098.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1349476204 news.xs4all.nl 6914 [2001:888:2000:d::a6]:37505
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:30845

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

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

csiph-web