Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a sandbox in Distutils2 #52926

Closed
tarekziade mannequin opened this issue May 10, 2010 · 7 comments
Closed

Add a sandbox in Distutils2 #52926

tarekziade mannequin opened this issue May 10, 2010 · 7 comments
Assignees
Labels
type-feature A feature request or enhancement

Comments

@tarekziade
Copy link
Mannequin

tarekziade mannequin commented May 10, 2010

BPO 8680
Nosy @vstinner, @tarekziade, @merwok

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/tarekziade'
closed_at = <Date 2014-03-13.10:44:33.169>
created_at = <Date 2010-05-10.22:15:46.891>
labels = ['type-feature']
title = 'Add a sandbox in Distutils2'
updated_at = <Date 2014-03-13.10:44:33.169>
user = 'https://github.com/tarekziade'

bugs.python.org fields:

activity = <Date 2014-03-13.10:44:33.169>
actor = 'eric.araujo'
assignee = 'tarek'
closed = True
closed_date = <Date 2014-03-13.10:44:33.169>
closer = 'eric.araujo'
components = ['Distutils2']
creation = <Date 2010-05-10.22:15:46.891>
creator = 'tarek'
dependencies = []
files = []
hgrepos = []
issue_num = 8680
keywords = []
message_count = 7.0
messages = ['105471', '105749', '115783', '120622', '120623', '120624', '120627']
nosy_count = 5.0
nosy_names = ['vstinner', 'tarek', 'eric.araujo', 'meatballhat', 'th3flyboy']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue8680'
versions = ['3rd party']

@tarekziade
Copy link
Mannequin Author

tarekziade mannequin commented May 10, 2010

Add a sandbox in distutils2, so all installation steps can be recorded or controlled.

Usage example: a dry-run mode that prevents anything to be written on the disk but just reports.

See setuptools.sandbox for example

@tarekziade tarekziade mannequin self-assigned this May 10, 2010
@tarekziade tarekziade mannequin added the type-feature A feature request or enhancement label May 10, 2010
@merwok
Copy link
Member

merwok commented May 14, 2010

What kind of sandbox should that be? Best-effort, meaning it replaces some functions to provide the dry-run feature, or an iron-clad sandbox that blocks malicious code from breaking out?

@merwok
Copy link
Member

merwok commented Sep 7, 2010

I talked a bit about that with haypo. A strong sandbox would have to intercept a number of C and Python calls to catch everything. The sandbox module in setuptools/distribute does that in 250 lines. I’m not sure it catches C code run from extension modules being built, but we could test that with haypo’s pysandbox.

@th3flyboy
Copy link
Mannequin

th3flyboy mannequin commented Nov 6, 2010

Hey, even if it's not perfect, it would be nice to at least see partial sand boxing in Python, rather than none at all. I'm working on an open source game project that uses Python, but recently the issue of security came up involving using python scripts with malicious intent or even just on accident that may cause security issues with user generated content. It would be great to be able to see even a built in sandbox that just covers python scripts, let alone calls to C/C++ code. Even if it's not perfect, some is better than none in my opinion.

@merwok
Copy link
Member

merwok commented Nov 6, 2010

We’re saying the same thing :) It all depends on the promise: If you’re making a best-effort sandbox, you’re trying to do the best you can, in cooperation with your users. For a game, I think you want an iron-clad sandbox that is totally error-proof. See https://pypi.python.org/pypi/pysandbox/1.0.3 for such a thing.

@th3flyboy
Copy link
Mannequin

th3flyboy mannequin commented Nov 6, 2010

Cool, thanks for that link, that should really help. One quick question however, do you or anyone else know if that will work under Python 3, we currently use 2, however it would be nice to be able to future proof for moving to 3.

@merwok
Copy link
Member

merwok commented Nov 6, 2010

I think there is some py3 support in pysandbox, but I’m not sure, and this discussion is off-topic for this bug tracker. If you don’t find anything in the links on the pysandbox page, feel free to ask on the python-list mailing list.

@merwok merwok closed this as completed Mar 13, 2014
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant