Harden sandbox networking and installer - #24
Merged
Conversation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
Pull request overview
This PR hardens the CodeRunner sandbox by tightening network exposure, adding Host/Origin validation for REST routes, and improving installer behavior for offline/host-only operation while pinning key dependencies.
Changes:
- Add a host-only/offline network mode in the installer with resume-time network-mode checks and readiness probing via a new
/healthendpoint. - Bind internal services (Jupyter, Playwright) to loopback and add Host/Origin allowlisting middleware for non-MCP REST routes.
- Harden skill handling by blocking path traversal and adding ZIP extraction safety checks; pin
fastmcpin examples and the proxy venv.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
test-e2e.sh |
Adds E2E smoke tests covering new security/network behaviors and skill traversal protections. |
server.py |
Adds extra allowed hostnames, skill ZIP/path traversal hardening, /health, and REST Host/Origin validation middleware. |
README.md |
Documents offline/host-only network mode and clarifies proxy venv usage. |
install.sh |
Pins Apple container to 1.2.2, updates DNS config path behavior, adds network-mode logic and readiness checks, and creates a pinned proxy venv. |
examples/requirements.txt |
Pins fastmcp version for reproducibility. |
examples/claude_desktop/mcpproxy.py |
Improves failure messaging and exits when DNS resolution fails. |
entrypoint.sh |
Restricts Jupyter/Playwright to loopback and removes permissive Jupyter settings. |
docker-compose.yml |
Updates healthcheck to use the new /health endpoint. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
macOS ships bash 3.2, where expanding an empty array under 'set -u' is a fatal 'unbound variable' error. NETWORK_ARGS is empty in the default network mode, so install.sh aborted before starting the container. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mkagenius
added a commit
that referenced
this pull request
Aug 12, 2026
macOS ships bash 3.2, where expanding an empty array under 'set -u' is a fatal 'unbound variable' error. MOUNT_SPECS, NORMALIZED_MOUNTS and VOLUME_ARGS are all empty when no --mount is passed, which breaks once this branch is combined with the 'set -u' added in #24. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mkagenius
approved these changes
Aug 12, 2026
mkagenius
left a comment
Collaborator
There was a problem hiding this comment.
Tested on my mac via copilot .. set -u is not supported i guess, fixed it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing
container execegress denial