Giter Site home page Giter Site logo

repy_v2's Introduction

repy_v2

RepyV2 is a cross-platform, Restricted Python environment and is used most prominently in Seattle, the open peer-to-peer testbed. This README gives a quick conceptual overview. More detailed information is available from the Seattle documentation and the source code in this repository.

Repy is "restricted" in several ways, and its restrictions revolve around making it a safe sandbox inside of which untrusted code can be executed with minimal impact to the system hosting the sandbox. This means that a sandboxed program has limited resources to use, is confined to a single directory on the file system, needs explicit permission to use TCP/UDP ports, and so on; furthermore, while Python-based, many useful but dangerous (or potentially obscurer) features of Python are disabled in Repy. Lastly, the RepyV2 sandbox exposes a safe API that connects programs with the outside world, the user, and the file system.

Code Safety

Repy ensures code safety in the sense that buggy or deliberately destructive code cannot harm the host machine. This is done in three ways: First, the code is checked statically for constructs that we consider unsafe, see safe.py. This catches things like attempting to import a library, using the print statement (instead of RepyV2'2 log function), and so on.

Second, the namespace wrapping layer in namespace.py performs checks on every call to the RepyV2 API functions. This guarantees that only specific types of variables can be passed to and returned from the API.

Third, the RepyV2 API also defends itself against attempts of otherwise abusing call parameters. For example, the functions for accessing files will not accept attempts to add directory names to filenames, and the networking functions don't allow passing options to the actual socket objects used for data transfer.

Resource Restrictions

Repy reads resource quotas for a sandbox from a restrictions file. The nanny component tallies usage statistics for all resources, and intervenes (by blocking resource consumption) so that the quotas are met. A much more detailed description and evaluation of the concept can be found in our paper "Fence: Protecting Device Availability with Uniform Resource Control".

Directory And Interface Restrictions

These restrictions govern where the sandbox can read and write files, and what IP addresses and interfaces the Repy sandbox may bind to. They are set up via command-line arguments to the sandbox. See repy.py's usage string for details

repy_v2's People

Contributors

aaaaalbert avatar justincappos avatar choksi81 avatar monzum avatar lukpueh avatar linkleonard avatar kellender avatar awwad avatar vladimir-v-diaz avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.