Skip to content

Enforce Squid proxy egress on Docker sbx daemon in smoke workflows - #8252

Merged
lpcox merged 4 commits into
mainfrom
copilot/start-docker-sbx-daemon-with-proxy
Sep 7, 2026
Merged

Enforce Squid proxy egress on Docker sbx daemon in smoke workflows#8252
lpcox merged 4 commits into
mainfrom
copilot/start-docker-sbx-daemon-with-proxy

Conversation

Copilot AI commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

The Docker sbx smoke workflows restarted the background sbx daemon without DOCKER_SANDBOXES_PROXY, allowing microVM sandboxes to bypass Squid when proxy environment variables were stripped. AWF failed closed during direct-egress verification, preventing the agent from reaching upstream models.

Changes

  • CI Post-processing (scripts/ci/postprocess-smoke-workflows.ts):
    • Configured DOCKER_SANDBOXES_PROXY=http://host.docker.internal:3128 on the final sbx daemon start step following policy initialization.
    • Added update handling to patch existing Authenticate Docker sbx workflow steps in place during post-processing.
  • Workflow Locks (.github/workflows/smoke-docker-sbx.lock.yml, .github/workflows/smoke-playwright-docker-sbx.lock.yml):
    • Re-compiled and post-processed workflow locks to ensure the persistent daemon runs with proxy enforcement.
  • Workflow Tests (scripts/ci/smoke-docker-sbx-workflow.test.ts):
    • Added assertions verifying both Docker sbx smoke workflow lock files start the persistent daemon with DOCKER_SANDBOXES_PROXY=http://host.docker.internal:3128.
# Final daemon restart in Authenticate Docker sbx step
DOCKER_SANDBOXES_PROXY=http://host.docker.internal:3128 \
  nohup sbx daemon start > /tmp/sbx-daemon.log 2>&1 &

Copilot AI changed the title [WIP] Fix Docker sbx daemon startup with AWF Squid proxy enforcement Enforce Squid proxy egress on Docker sbx daemon in smoke workflows Sep 7, 2026
Copilot AI requested a review from lpcox September 7, 2026 15:02
@lpcox
lpcox marked this pull request as ready for review September 7, 2026 15:07
Copilot AI balanced review requested due to automatic review settings September 7, 2026 15:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The updater can skip proxying the final daemon, and the tests do not catch that regression.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Enforces Squid proxy egress for the persistent Docker sbx daemon in smoke workflows.

Changes:

  • Adds proxy configuration to final daemon startup.
  • Updates generated workflow locks.
  • Adds regression assertions for proxy enforcement.
File summaries
File Description
scripts/ci/smoke-docker-sbx-workflow.test.ts Adds assertions, but they are not anchored to the final post-policy daemon restart.
scripts/ci/postprocess-smoke-workflows.ts Adds proxy configuration, but its file-wide sentinel may incorrectly skip the security migration.
.github/workflows/smoke-playwright-docker-sbx.lock.yml Starts the persistent daemon through Squid.
.github/workflows/smoke-docker-sbx.lock.yml Starts the persistent daemon through Squid.
Review details

Suppressed comments (1)

scripts/ci/postprocess-smoke-workflows.ts:216

  • This replacement spans every workflow step from Install Docker sbx CLI to the lockdown step. If a regenerated workflow adds or changes any step in that interval, running the postprocessor while upgrading the proxy setting silently deletes those generated steps. Patch only the unproxied final daemon restart (the one immediately after sbx policy init allow-all) and preserve the rest of the workflow block.
      const sbxInstallAuthRegex = / {6}- name: Install Docker sbx CLI\n[\s\S]*?(?= {6}- name: Determine automatic lockdown mode)/;
      if (sbxInstallAuthRegex.test(sbxContent)) {
        sbxContent = sbxContent.replace(sbxInstallAuthRegex, SBX_INSTALL_AND_AUTH_STEPS);
  • Files reviewed: 4/4 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/ci/postprocess-smoke-workflows.ts Outdated
Comment thread scripts/ci/smoke-docker-sbx-workflow.test.ts
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

⚠️ Coverage Regression Detected

This PR decreases test coverage. Please add tests to maintain coverage levels.

Overall Coverage

Metric Base PR Delta
Lines 93.97% 93.95% 📉 -0.02%
Statements 92.62% 92.59% 📉 -0.03%
Functions 93.25% 93.20% 📉 -0.05%
Branches 86.45% 86.36% 📉 -0.09%
📁 Per-file Coverage Changes (3 files)
File Lines (Before → After) Statements (Before → After)
src/enclave/dynamic-registry.ts 95.7% → 92.6% (-3.18%) 94.3% → 90.9% (-3.36%)
src/enclave/manager.ts 87.8% → 87.8% (+0.08%) 86.2% → 86.3% (+0.09%)
src/log-directory-setup.ts 96.2% → 100.0% (+3.78%) 96.3% → 100.0% (+3.71%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

lpcox and others added 2 commits September 7, 2026 08:17
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@copilot Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

⚠️ Coverage Regression Detected

This PR decreases test coverage. Please add tests to maintain coverage levels.

Overall Coverage

Metric Base PR Delta
Lines 93.97% 93.95% 📉 -0.02%
Statements 92.62% 92.59% 📉 -0.03%
Functions 93.25% 93.20% 📉 -0.05%
Branches 86.45% 86.36% 📉 -0.09%
📁 Per-file Coverage Changes (3 files)
File Lines (Before → After) Statements (Before → After)
src/enclave/dynamic-registry.ts 95.7% → 92.6% (-3.18%) 94.3% → 90.9% (-3.36%)
src/enclave/manager.ts 87.8% → 87.8% (+0.08%) 86.2% → 86.3% (+0.09%)
src/log-directory-setup.ts 96.2% → 100.0% (+3.78%) 96.3% → 100.0% (+3.71%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Claude failed

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • api.anthropic.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "api.anthropic.com"

See Network Configuration for more information.

Generated by Smoke Claude for #8252

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)

@lpcox
lpcox deployed to aoai-model September 7, 2026 15:25 — with GitHub Actions Active
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.

Tested by Smoke Chroot

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...

🔮 The oracle has spoken through Smoke Codex

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Build Test Suite completed successfully!

Generated by Build Test Suite for #8252

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Contribution Check failed. Please review the logs for details.

Generated by Contribution Check for #8252

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

📰 BREAKING: Report filed by Smoke Copilot

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Gemini reports failed. Facets need polishing...

💎 Faceted by Smoke Gemini

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

📰 DEVELOPING STORY: Smoke Docker Sbx reports failed. Our correspondents are investigating the incident...

📰 BREAKING: Report filed by Smoke Docker Sbx

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅

📡 OTel tracing validated by Smoke OTel Tracing

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) Mode ✅

Test Results:

  • ✅ GitHub MCP: PR data fetched (2 recent merged PRs)
  • ✅ GitHub.com Connectivity: HTTP 200
  • ✅ File Write/Read: smoke-test-copilot-byok.txt exists and readable
  • ✅ BYOK Inference: Running in direct BYOK mode via api-proxy → api.githubcopilot.com

Overall Status: PASS

Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY) with api-proxy sidecar forwarding to api.githubcopilot.com. All smoke tests passed.

🔑 BYOK report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

@lpcox Egress isolation smoke test results:

EGRESS_RESULT allow=pass deny=pass

✅ Allowed domain (github.com) reachable: allowed=200
✅ Non-allowed domain (example.com) blocked: denied=000 (CONNECT tunnel failed, 403)

Overall: PASS

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "example.com"

See Network Configuration for more information.

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions github-actions Bot added smoke-copilot-network-isolation Copilot network-isolation egress smoke test smoke-copilot labels Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot Engine — Overall: PASS

  • ✅ GitHub MCP connectivity (PR list fetched)
  • ✅ GitHub.com connectivity (HTTP 200)
  • ✅ File write/read test

Recent PRs: #8239 Upgrade gh-aw workflows to v0.88.5, #8233 Enable validated dynamic enclave delegation handoff

cc @lpcox

📰 BREAKING: Report filed by Smoke Copilot
Add label ready-for-aw to run again

@lpcox
lpcox deployed to aoai-model September 7, 2026 15:29 — with GitHub Actions Active
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test Results: GitHub Actions Services Connectivity

  • Redis PING: ❌ (DNS resolution failure for host.docker.internal)
  • PostgreSQL pg_isready: ❌ (no response)
  • PostgreSQL SELECT 1: ❌ (DNS resolution failure)

Overall: FAIL

All checks failed with "Temporary failure in name resolution" for host.docker.internal — the AWF sandbox cannot resolve this hostname to reach host-level GitHub Actions service containers.

🔌 Service connectivity validated by Smoke Services
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

$(jq -Rs . /tmp/gh-aw/agent/body.md)

🪪 BYOK (AOAI Entra) report filed by Smoke Copilot BYOK AOAI (Entra)
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Chroot Version Comparison Results

Runtime Host Version Chroot Version Match?
Python 3.12.14 3.12.14 ✅ YES
Node.js v24.20.0 v2.98.0 ❌ NO
Go go1.22.12 go1.22.12 ✅ YES

Overall: FAILED — Node.js version inside the chroot (v2.98.0) does not match the host (v24.20.0), so the smoke-chroot label was not applied.

Tested by Smoke Chroot
Add label ready-for-aw to run again

@lpcox
lpcox deployed to aoai-model September 7, 2026 15:30 — with GitHub Actions Active
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Smoke Test: API Proxy OpenTelemetry Tracing

Scenario Result
1. Module Loading otel.js loads; exports startRequestSpan, setTokenAttributes, setBudgetAttributes, endSpan, endSpanError, shutdown, isEnabled, plus internal exporter/parsing helpers
2. Test Suite ✅ 68/68 tests passed across otel.test.js, otel-fanout.test.js, otel-workload-identity.test.js
3. Env Var Forwarding env-passthrough.ts forwards GITHUB_AW_OTEL_TRACE_ID/GITHUB_AW_OTEL_PARENT_SPAN_ID (+ COPILOT_OTEL_FILE_EXPORTER_PATH) to the agent; api-proxy-env-config.ts::buildOtelEnv() forwards OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, trace/span IDs, and OTEL_SERVICE_NAME to api-proxy
4. Token Tracker Integration onUsage callback present in token-tracker-http.js (line 348, invoked line 406) as the OTEL usage hook point
5. OTEL Diagnostics ✅ Diagnostics collected per post-step (span export check — see workflow logs for exact count)

Overall: All scenarios pass. No issues found.

📡 OTel tracing validated by Smoke OTel Tracing
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

🏗️ Build Test Suite Results

Ecosystem Project Build/Install Tests Status
Bun elysia 1/1 passed ✅ PASS
Bun hono 1/1 passed ✅ PASS
C++ fmt N/A ✅ PASS
C++ json N/A ✅ PASS
Deno oak N/A 1/1 passed ✅ PASS
Deno std N/A 1/1 passed ✅ PASS
.NET hello-world N/A (run OK) ✅ PASS
.NET json-parse N/A (run OK) ✅ PASS
Go color ok ✅ PASS
Go env ok ✅ PASS
Go uuid ok ✅ PASS
Java gson 1/1 passed ✅ PASS
Java caffeine passed ✅ PASS
Node.js clsx all passed ✅ PASS
Node.js execa all passed ✅ PASS
Node.js p-limit all passed ✅ PASS
Rust fd 1/1 passed ✅ PASS
Rust zoxide 1/1 passed ✅ PASS

Overall: 8/8 ecosystems passed — ✅ PASS

Notes:

  • Bun and Deno were not preinstalled and were installed fresh via their official install scripts before testing.
  • Java (Maven) builds initially failed with Could not create local repository at /home/runner/.m2/repository (the .m2 directory was owned by root, not writable by the runner user, unrelated to the firewall/proxy config). Worked around by pointing Maven at a writable local repo via -Dmaven.repo.local=/tmp/gh-aw/agent/m2repo; the provided ~/.m2/settings.xml proxy config (squid-proxy:3128) was otherwise used as configured and all downloads succeeded through it.
  • No other build, install, or test failures were observed across any ecosystem.

Generated by Build Test Suite for #8252 · copilot · auto · 46.8 AIC · ⊞ 12K ·
Add label ready-for-aw to run again

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

@Copilot @lpcox
Upgrade gh-aw workflows to v0.88.5
Enable validated dynamic enclave delegation handoff
GitHub MCP connectivity: ❌
GitHub.com connectivity: ✅
File write/read test: ✅
Direct BYOK inference path: ✅
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw)
Overall status: FAIL

🔑 BYOK (AOAI api-key) report filed by Smoke Copilot BYOK AOAI (api-key)
Add label ready-for-aw to run again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Start Docker sbx daemon with AWF Squid proxy enforcement

3 participants