Skip to content

Conversation

@thomwiggers
Copy link
Owner

Following the initial hardening in #212, this PR refactors the python-sandbox into a standalone HTTP server.

Major Changes:

  • Sandbox Refactoring: python-sandbox/entrypoint.py is now a lightweight HTTP server. Each execution request spawns a new subprocess which is terminated after 5 seconds, ensuring a fresh environment and preventing persistent state or resource leaks.
  • Removed Docker Dependency: The PythonPlugin now communicates via HTTP instead of executing docker run. This allows running the bot without access to the Docker socket.
  • Docker Compose: Added docker-compose.yml to orchestrate both services, including network isolation (internal network for the sandbox).

Benefits:

  • Improved Security: The bot no longer needs access to /var/run/docker.sock.
  • Better Isolation: The sandbox server runs in its own network and uses its own resource limits.
  • Simpler Deployment: Services can be easily managed with Docker Compose.

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

🤖 Hi @thomwiggers, I've received your request, and I'm working on it now! You can track my progress in the logs for more details.

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

🤖 I'm sorry @thomwiggers, but I was unable to process your request. Please see the logs for more details.

@thomwiggers thomwiggers merged commit 29548f3 into develop Jan 9, 2026
16 checks passed
@thomwiggers thomwiggers deleted the feature/python-sandbox-server branch January 9, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants