feat: add pasta networking and lock down /proc in nsjail#2571
Merged
daryllimyt merged 2 commits intomainfrom Apr 27, 2026
Merged
feat: add pasta networking and lock down /proc in nsjail#2571daryllimyt merged 2 commits intomainfrom
daryllimyt merged 2 commits intomainfrom
Conversation
|
✅ No security or compliance issues detected. Reviewed everything up to 85f829e. Security OverviewDetected Code Changes
|
jordan-umusu
approved these changes
Apr 27, 2026
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
clone_newnetfor agent, Python, and action sandboxes./proc.Notes
docker-compose.dev.ymlchanges used for manual cluster testing are intentionally not included in this PR.systempaths=unconfinedfor that path.Validation
TRACECAT__SERVICE_KEY=test-service-key uv run ruff check tracecat/agent/sandbox/config.py tracecat/sandbox/executor.py tracecat/sandbox/networking.py tests/unit/test_agent_sandbox_config.py tests/unit/test_sandbox_networking.py tests/unit/test_agent_sandbox_litellm.pyTRACECAT__SERVICE_KEY=test-service-key uv run basedpyright tracecat/agent/sandbox/config.py tracecat/sandbox/executor.py tracecat/sandbox/networking.py tests/unit/test_agent_sandbox_config.py tests/unit/test_sandbox_networking.py tests/unit/test_agent_sandbox_litellm.py_run_nsjail_harness_in_docker_or_skip()passed./dev/net/tun.localhost:5432and it was unavailable.Coverage Review
The committed unit coverage gives good confidence that generated nsjail configs now always clone a network namespace, only add pasta when internet access is requested, use generated pasta DNS mounts, and mount fresh procfs instead of host
/proc.The current coverage is not enough by itself for a high-confidence production rollout of pasta-backed outbound internet access. The missing piece is an integration test on a Linux runner or node with
/dev/net/tun,CAP_SYS_ADMIN, unconfined seccomp, and unmasked proc system paths that verifies real outbound DNS/connectivity through pasta while the jail remains isolated from the host network. A full agent-path assertion that jailed/proconly exposes jail PIDs would also reduce risk.Summary by cubic
Add
pastauserspace networking tonsjailsandboxes with always-isolated network namespaces;pastais enabled only when outbound internet access is requested. Replace host/procbind mounts with a fresh read-only procfs and generate sandbox-local DNS files for reliablepasta-backed resolution.New Features
pastaonly when internet is requested for agent, Python, and action sandboxes.resolv.conf,hosts, andnsswitch.conf; stop bind-mounting host resolver files.tracecat/sandbox/networking.pyand focused unit tests, plus Dockerized smoke test forpasta.Migration
security_opt: ["seccomp:unconfined", "systempaths=unconfined"]./dev/net/tunto be available.Written for commit 85f829e. Summary will update on new commits. Review in cubic