-
Notifications
You must be signed in to change notification settings - Fork 0
fix: harden Docker sandbox, MCP bridge, and code runner #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
cf5e5e7
4f62ca6
a093d4d
bc1cd55
e777e9b
106ec1c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| FROM node:22-slim AS node-base | ||
|
|
||
| FROM python:3.14-slim | ||
|
|
||
| COPY --from=node-base /usr/local/bin/node /usr/local/bin/node | ||
| COPY --from=node-base /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
| RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm | ||
|
|
||
| RUN apt-get update && apt-get install -y --no-install-recommends git \ | ||
| && apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
|
||
|
Comment on lines
+9
to
+11
|
||
| RUN mkdir -p /workspace \ | ||
| && useradd --uid 10001 --no-create-home --shell /usr/sbin/nologin sandbox | ||
|
|
||
| WORKDIR /workspace | ||
|
|
||
| USER sandbox | ||
|
|
||
| CMD ["bash"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| """Code runner tool event constants.""" | ||
|
|
||
| from typing import Final | ||
|
|
||
| CODE_RUNNER_EXECUTE_START: Final[str] = "code_runner.execute.start" | ||
| CODE_RUNNER_EXECUTE_SUCCESS: Final[str] = "code_runner.execute.success" | ||
| CODE_RUNNER_EXECUTE_FAILED: Final[str] = "code_runner.execute.failed" | ||
| CODE_RUNNER_INVALID_LANGUAGE: Final[str] = "code_runner.invalid_language" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| """Docker sandbox event constants.""" | ||
|
|
||
| from typing import Final | ||
|
|
||
| DOCKER_EXECUTE_START: Final[str] = "docker.execute.start" | ||
| DOCKER_EXECUTE_SUCCESS: Final[str] = "docker.execute.success" | ||
| DOCKER_EXECUTE_FAILED: Final[str] = "docker.execute.failed" | ||
| DOCKER_EXECUTE_TIMEOUT: Final[str] = "docker.execute.timeout" | ||
| DOCKER_CONTAINER_CREATED: Final[str] = "docker.container.created" | ||
| DOCKER_CONTAINER_STOPPED: Final[str] = "docker.container.stopped" | ||
| DOCKER_CONTAINER_REMOVED: Final[str] = "docker.container.removed" | ||
| DOCKER_CONTAINER_STOP_FAILED: Final[str] = "docker.container.stop_failed" | ||
| DOCKER_CONTAINER_REMOVE_FAILED: Final[str] = "docker.container.remove_failed" | ||
| DOCKER_CLEANUP: Final[str] = "docker.cleanup" | ||
| DOCKER_HEALTH_CHECK: Final[str] = "docker.health_check" | ||
| DOCKER_DAEMON_UNAVAILABLE: Final[str] = "docker.daemon.unavailable" |
Uh oh!
There was an error while loading. Please reload this page.