Fix cli-proxy ENETUNREACH in network-isolation mode by dual-homing it on the external bridge - #7066
Conversation
There was a problem hiding this comment.
Pull request overview
Adds host reachability for cli-proxy under network isolation by attaching it to the external bridge.
Changes:
- Dual-homes
cli-proxyonawf-netandawf-ext. - Adds unit coverage for the generated topology.
- Introduces an unrestricted-egress security issue requiring changes.
Show a summary per file
| File | Description |
|---|---|
src/compose-generator.ts |
Adds the external network attachment. |
src/compose-generator.test.ts |
Verifies both network attachments. |
Review details
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
| if (config.networkIsolation && services['cli-proxy']) { | ||
| const cliProxyService = services['cli-proxy']; | ||
| cliProxyService.networks = { | ||
| ...(cliProxyService.networks || {}), | ||
| [EXTERNAL_BRIDGE_NAME]: {}, |
|
@copilot address review feedback |
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
|
✅ Copilot review passed with no inline comments. @copilot Add the |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
|
🛡️ Smoke Copilot Network Isolation reports failed to deliver outputs while checking network isolation. Investigate the egress model. |
|
📰 DEVELOPING STORY: Smoke Copilot reports failed to deliver outputs. Our correspondents are investigating the incident... |
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed to deliver outputs. AOAI BYOK (Entra) mode investigation needed... |
|
🚀 Security Guard has started processing this pull request |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
🔌 Smoke Services — All services reachable! ✅ |
|
✅ Smoke Gemini completed. All facets verified. 💎 Smoke test completed with FAIL status. Connectivity and PR listing (secrecy) issues encountered. |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
Build Test Failed Build Test Suite - See logs for details |
|
❌ Smoke Claude failed to deliver outputs |
|
❌ Smoke Copilot BYOK reports failed to deliver outputs. BYOK mode investigation needed... |
|
✅ Contribution Check completed successfully! No contribution-guideline issues found in PR #7066. The PR description is clear, references the related issue, adds a targeted test, and places changes in the correct source and test files. |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
❌ Smoke Copilot BYOK AOAI (api-key) reports failed to deliver outputs. AOAI BYOK (api-key) mode investigation needed... |
|
📰 DEVELOPING STORY: Smoke Docker Sbx reports failed to deliver outputs. Our correspondents are investigating the incident... |
|
EGRESS_RESULT allow=pass deny=pass ✅ Allowed domain (github.com): reachable, HTTP 200 Overall: PASS cc Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "example.com"See Network Configuration for more information.
|
|
Copilot Engine Smoke Test
Overall: PASS cc
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
Smoke Test: Copilot BYOK (Direct Mode) ✅ PASS
Running in direct BYOK mode via
|
|
Redis: ❌ (DNS resolution failure: Overall: FAIL —
|
Smoke Test: Gemini Engine Validation
Overall Status: FAIL
|
📡 OTel Tracing Smoke Test Results
All core scenarios validated successfully; no regressions detected.
|
|
Smoke test: FAIL
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
Chroot Version Comparison Results
Overall: FAILED — Node.js version differs between host and chroot environment (
|
|
Found merged PRs: ${{ steps.smoke-data.outputs.SMOKE_PR_DATA }} ✅
|
|
Add A19/B19 runner doctor entries: ARC/DinD safeoutputs mount + rootless cleanup chmod noise ✅ GitHub MCP Testing Running in direct BYOK mode (AWF_AUTH_TYPE=github-oidc + AWF_AUTH_AZURE_* + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) authenticated via Microsoft Entra
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — PASS Notes:
|
|
Smoke Test: Docker Sbx — cc
Overall: PASS
|
On
ubuntu-latestGitHub-hosted runners (no Tailscale, no custom host routing),awf-cli-proxynever becomes healthy in--network-isolationmode when connecting to an external DIFC proxy: the tcp-tunnel dialsENETUNREACH 172.17.0.1:18443, exhausting the DIFC liveness probe and failing the workflow before the agent starts.Root cause
awf-netis created as aninternal: truenetwork in network-isolation mode — it has no route out.awf-ext) so they can reach the internet.cli-proxywas left attached only to the internalawf-net, even though it always setsextra_hosts: { 'host.docker.internal': 'host-gateway' }to reach the external DIFC proxy on the runner host.host-gatewayvalue falls back to the default bridge's gateway (172.17.0.1), which cli-proxy cannot reach from its isolated network — hence theENETUNREACH.Fix
src/compose-generator.ts: whennetworkIsolationis enabled and thecli-proxyservice exists, attach it toEXTERNAL_BRIDGE_NAME(awf-ext) in addition toawf-net, matching the existing Squid/api-proxy pattern:This gives
host.docker.internala gateway cli-proxy can actually route to, so the tcp-tunnel to the external DIFC proxy succeeds and the sidecar reports healthy.Tests
src/compose-generator.test.ts: new test asserting cli-proxy is dual-homed onawf-net(with its assigned IP) andawf-extwhennetworkIsolationis true anddifcProxyHost/cliProxyIpare configured.