Repository navigation
Closed
Labels
Description
Restricted network egress for agent containers via a per-run host proxy (no privileged containers)
Context
scripts/init-firewall.sh (an iptables allowlist for Anthropic and GitHub) ships in the agent image but is never executed: every entrypoint (scripts/claude-entrypoint.sh, codex-entrypoint.sh, opencode-entrypoint.sh, …) prints "Skipping firewall setup (would require --privileged Docker flag)". Containers run with --network bridge (packages/core/src/agents/impl/utils/dockerArgsBuilder.ts), so an agent has ordinary outbound access. The public FAQ describes the allowlist as optional and off by default; in practice operators cannot turn it on without privileged containers.
Requirements
- Per-run egress proxy on the host (worker) side: for a run with restricted networking, start a lightweight HTTP/HTTPS CONNECT proxy bound to the Docker bridge gateway (or a Unix socket forwarded into the container) that only allows connections to an allowlist of hostnames. DNS resolution happens in the proxy on the host; the container is started with
--network none(or an internal network without external route) andHTTP_PROXY/HTTPS_PROXY/NO_PROXYpointing at the proxy. No--privileged, no--cap-add NET_ADMIN. - Allowlist: a built-in base list per agent (the provider API hosts for Claude/Codex/Antigravity/OpenCode/Vibe,
github.com,api.github.com,objects.githubusercontent.com, npm/pypi registries), plus repository additions in.propr/workflow.yml:and an instance-level default mode in settings (network: mode: restricted # open (default, current behaviour) | restricted allow: - "registry.npmjs.org" - "*.internal.example.com"
packages/core/src/config/configManager.ts), with the repository file able to tighten but not loosen below the instance policy when the instance setsrestrictedas mandatory. - Agent compatibility: verify every supported agent honours the proxy env vars for its API traffic (Claude Code, Codex, Antigravity, OpenCode, Vibe) and that
gitinside the container uses it (https.proxy). Document any agent that does not, and for that agent fall back toopenwith a timeline warning rather than breaking the run. - Observability: the proxy logs denied connection attempts (host, count) to the task timeline as a single aggregated event at the end of the run, and the task detail shows the mode and the denied-host summary. Denied hosts must never be silently dropped from the record.
- Lifecycle: the proxy lives and dies with the container; the reconciler/cleanup must kill orphaned proxies. Port allocation must not collide across concurrent runs on one worker.
- Remove the dead firewall script and the "Skipping firewall setup" lines, or keep the script only if it is wired to something real.
Documentation
docs/docs/features/execution-safety.mdanddocs/docs/concepts/security-overview.md: describe restricted mode accurately (what is and is not blocked, DNS behaviour, limitations).docs/docs/features/repository-workflow.md: thenetworkblock.- Update the site/FAQ wording in a follow-up (out of scope here).
- CHANGELOG.md Unreleased entry.
Tests
- Proxy unit tests: allowed host → connect; denied host → 403 and recorded; wildcard matching; IP literals denied unless allowlisted.
- Integration test (can be behind a Docker-available guard like the existing image smoke tests): a container in restricted mode can reach an allowed host via the proxy and cannot reach a denied one directly.
- Workflow schema validation test for the
networkblock. - Run
npm run lint,npm run typecheckand the affected suites.
From the Warren comparison (2026-10-06); planned for batch 4. Batch 1 is #2734, #2735, #2736.
Activity
propr-dev commentedon Oct 6, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-5-52743/claude-opus-5-5-restricted-network-egress-20261006-2103-yelmainissue-2743-20261006-2103-claude-opus-5-5-yel🔍 Track Task Execution
Restricted network mode for issue #2743 is implemented. Lint and type…