Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Safest python code running

Tags:

python

system

How can I protect my web server, if I run custom users code on server. If any user can submit his python source on my server and run it.

Maybe some modules or linux tools for close any network and hardware activity for this script.

Thank's all for help!

like image 358
Oduvan Avatar asked Apr 11 '10 21:04

Oduvan


People also ask

Which app is best for running Python?

QPython. Available for Android users, QPython is a Python engine that helps students to understand more about this language. Its features consist of Python interpreter, runtime environment, editor, QPYI, and SL4A library, and is compatible with Python 2.7.

Where can I run my Python codes?

You are now able to run Python scripts from:The operating system command-line or terminal. The Python interactive mode. The IDE or text editor you like best. The file manager of your system, by double-clicking on the icon of your script.

Is Python safe to use?

According to the TIOBE index, Python is now the most popular programming language in the world, beating out both Java and C. In reviewing Python-related threats and vulnerabilities, Snyk found that on average, 60 new Python vulnerabilities are added to Snyk's vulnerability database each month.


1 Answers

The concept you're thinking of is sandboxing. Check out the Python wiki page about it:

http://wiki.python.org/moin/SandboxedPython

like image 151
Amber Avatar answered Sep 21 '22 16:09

Amber