Coder Social home page Coder Social logo

code-sandbox-spa's Introduction

Code Sandbox

Test project for messing around with remote code execution sandboxes (eg. go playground, hackerrack, etc)

Getting Started

Install dependencies:

yarn

Build code environment image(s):

docker build goenv -t codesandbox-goenv

Run the service:

yarn dev
# in another terminal
cd ui && yarn start

...or as a container:

docker compose up --build

TODO

  • execution timeout
  • add multi-language support
  • add security to sandbox environment
    • get it running in kubernetes first
  • improve front-end
    • better styling
  • add message queue to handle high request load
    • switch to using websockets to do client/server comms first
  • write tests

Learnings

Securing the Sandbox

Containers are inherently insecure because it's possible to make system calls to the host kernel and even escape the container itself.

Two prominent solutions exist that are OCI-compliant and work out of the box with Docker/Kubernetes:

  1. Google gVisor
    • solves the security issues of containers by running in a sandbox
    • implements its own system calls to protect and filter calls to the host kernel
  2. Kata Containers
    • solves the speed issues of virtual machines while maintaining their security levels
    • runs a virtualization layer that provides isolation but works more like containers

Both of these solutions are built for Linux only, cannot be run on a Windows or OSX host. So these runtimes can and should only be utilized in a production environment.

code-sandbox-spa's People

Contributors

ianlamb avatar dgbrown avatar

Watchers

 avatar  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.