Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/healeycodes/untrusted-python
📦 Run untrusted python code on the server.
https://github.com/healeycodes/untrusted-python
pyseccomp rlimit sandbox seccomp setrlimit untrusted-code
Last synced: about 1 month ago
JSON representation
📦 Run untrusted python code on the server.
- Host: GitHub
- URL: https://github.com/healeycodes/untrusted-python
- Owner: healeycodes
- Created: 2023-07-20T06:07:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-28T09:53:55.000Z (over 1 year ago)
- Last Synced: 2024-11-29T22:55:39.868Z (about 2 months ago)
- Topics: pyseccomp, rlimit, sandbox, seccomp, setrlimit, untrusted-code
- Language: TypeScript
- Homepage: https://untrusted-python.vercel.app
- Size: 213 KB
- Stars: 37
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 📦 untrusted-python
> My blog post: [Running Untrusted Python Code](https://healeycodes.com/running-untrusted-python-code)
This is a sandbox for running untrusted Python code. Until it's been audited by someone with some kind of security authority, you should consider it to be insecure.
With that in mind, I welcome any bug reports, sandbox escapes, etc. – please raise an issue or email/DM me.
You can try and break out of it here: https://untrusted-python.vercel.app
### Development
#### Fly.io backend
Install [flyctl](https://fly.io/docs/hands-on/install-flyctl/).
```bash
cd sandbox
fly launch
```Follow the instructions in your terminal. Make a note of the URL – it will look like `https://foo.fly.dev`. Copy it (without a trailing slash), and add it to `web/.env` as `API`.
#### Next.js frontend
```bash
npm i
npm run dev
```Follow the instructions in your terminal.
### Deploy
`web` is a Next.js app that you can deploy to Vercel. Set the root directory of the project to `web`.
`sandbox` is a Fly.io app that has `fly.toml` file ready to use. Add the Fly.io URL as a Vercel environment variable as `API` (without a trailing slash).