dify沙盒

Yeuoly a0c74d335e feat: prevent nodejs code injection (#140) пре 6 месеци
.github 3e39e127ca refactor: using docker to execute CI tests on Github actions to prevent environmental breaking changes (#98) пре 11 месеци
build e769713929 fix: vulns, uncompleted results (#41) пре 1 година
cmd 93beee1510 fix: requests operation not permitted (#81) пре 1 година
conf 3a738590e7 refactor: Fix sandbox escape by disabling the preload parameter. (#96) пре 11 месеци
dependencies 62954e9c30 fix: amd64 пре 1 година
docker a0c74d335e feat: prevent nodejs code injection (#140) пре 6 месеци
internal a0c74d335e feat: prevent nodejs code injection (#140) пре 6 месеци
tests a0c74d335e feat: prevent nodejs code injection (#140) пре 6 месеци
.gitignore ebb0325f35 chore: update .gitignore (#47) пре 1 година
FAQ.md 072abe73aa update FAQ (#28) пре 1 година
LICENSE a57aa758c7 License (#9) пре 1 година
README.md 7f45f6df11 add workflow (#29) пре 1 година
go.mod f40de1f6bc security: bump golang.org/x/net to 0.23.0 and bump google.golang.org/… (#105) пре 11 месеци
go.sum f40de1f6bc security: bump golang.org/x/net to 0.23.0 and bump google.golang.org/… (#105) пре 11 месеци
install.sh 91696da794 fix пре 1 година
workflow.png 7f45f6df11 add workflow (#29) пре 1 година

README.md

Dify-Sandbox

Introduction

Dify-Sandbox offers a simple way to run untrusted code in a secure environment. It is designed to be used in a multi-tenant environment, where multiple users can submit code to be executed. The code is executed in a sandboxed environment, which restricts the resources and system calls that the code can access.

Use

Requirements

DifySandbox currently only supports Linux, as it's designed for docker containers. It requires the following dependencies:

  • libseccomp
  • pkg-config
  • gcc
  • golang 1.20.6

Steps

  1. Clone the repository using git clone https://github.com/langgenius/dify-sandbox and navigate to the project directory.
  2. Run ./install.sh to install the necessary dependencies.
  3. Run ./build/build_[amd64|arm64].sh to build the sandbox binary.
  4. Run ./main to start the server.

If you want to debug the server, firstly use build script to build the sandbox library binaries, then debug as you want with your IDE.

FAQ

Refer to the FAQ document

Workflow

workflow