Repository navigation
Fix published host-service access after Docker DNAT and fail connectivity smoke checks - #11083
Conversation
Co-authored-by: lpcox <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
The post-agent sudo call can execute an agent-modified CLI as host root, bypassing isolation and connectivity checks.
2 open issues
What changed in this PR
Addresses #11082 by adapting AWF’s gateway-only host-service rules to Docker’s post-DNAT forwarding path and making smoke checks fail on connectivity errors.
Changes:
- Match published services using conntrack’s original gateway address and port, with normalized port ranges.
- Add bounded Redis and PostgreSQL connectivity checks independent of agent-reported outcomes.
- Preserve quoted image arguments during workflow postprocessing and expand regression coverage.
| File | Description |
|---|---|
tests/integration/host-tcp-services.test.ts |
Adds remapped published-port and forbidden-access probes. |
src/host-iptables-rules.ts |
Adds gateway-scoped DNAT allowances and normalizes port ranges. |
src/host-iptables-host-access.test.ts |
Tests rule scoping, ordering, disabled access, and relocated gateways. |
scripts/ci/smoke-services-workflow.test.ts |
Checks gate compilation and connectivity failure propagation. |
scripts/ci/smoke-image-preparation.test.ts |
Tests quoted YAML preservation and postprocessor idempotency. |
scripts/ci/apply-general-workflow-patches.ts |
Handles escaped image arguments in quoted run steps. |
.github/workflows/smoke-services.md |
Adds an independent sandbox connectivity gate. |
.github/workflows/smoke-services.lock.yml |
Includes the compiled gate and updated session-state helper invocation. |
Review effort: Max (auto)
| - name: Require sandbox service connectivity | ||
| timeout-minutes: 3 | ||
| run: | | ||
| sudo /usr/local/bin/awf \ |
| } | ||
| }, 120000); | ||
|
|
||
| test('should allow a published service on another bridge without allowing direct container access', async () => { |
|
@copilot address review feedbac |
|
✅ Copilot review passed with no inline comments. @copilot Add the |
Moved the independent connectivity gate to run before agent execution, added |
Co-authored-by: lpcox <[email protected]>
Updated the enclave-script SQLite runtime to pinned 3.54.1 and scoped the Grype exception to the CLI-only |
|
| Metric | Base | PR | Delta |
|---|---|---|---|
| Lines | 93.75% | 93.74% | 📉 -0.01% |
| Statements | 92.30% | 92.29% | ➡️ -0.01% |
| Functions | 91.66% | 91.66% | ➡️ +0.00% |
| Branches | 86.51% | 86.50% | 📉 -0.01% |
📁 Per-file Coverage Changes (1 files)
| File | Lines (Before → After) | Statements (Before → After) |
|---|---|---|
src/nvx/one-shot-process.ts |
84.0% → 81.5% (-2.47%) | 76.8% → 74.7% (-2.11%) |
Coverage comparison generated by scripts/ci/compare-coverage.ts
|
@copilot merge main and resolve conflicts |
…t-service-ports # Conflicts: # containers/enclave/Dockerfile Co-authored-by: lpcox <[email protected]>
Merged |
|
🪪 Smoke Copilot BYOK AOAI (Entra) is testing Azure OpenAI BYOK (Entra / GitHub OIDC) mode on this pull request... |
|
🚀 Security Guard has started processing this pull request |
|
Cloud Hypervisor + Copilot smoke test
Overall: PASS
|
|
Smoke test results
|
|
test: exercise NVX harnesses through existing execute interface
|
Chroot Version Comparison
Not all tests passed (Node.js mismatch), so the
|
|
EGRESS_RESULT allow=pass deny=pass
|
|
Smoke Copilot: PASS
PRs: "test: exercise NVX harnesses through existing execute interface", "test: add live Cloud Hypervisor selected-harness acceptance coverage"
|


On Ubuntu 26.04/Docker 29 runners, published service traffic reaches
DOCKER-USERafter DNAT, bypassing AWF’s gateway-destination allowances and falling through to rejection. Smoke workflows still report success when the agent reports failed connectivity throughnoop.Gateway-scoped forwarding
Fail-closed smoke checks
PONG, PostgreSQL readiness, andSELECT 1.Workflow generation and regression coverage
--allow-host-service-portsconnections refused on ubuntu-26.04 runners; smoke tests pass despite failing #11082