Enforce Squid proxy egress on Docker sbx daemon in smoke workflows - #8252
Conversation
There was a problem hiding this comment.
🟡 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 CLIto 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 aftersbx 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.
|
| 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
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>
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
| 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
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓
|
|
❌ Smoke Claude failed 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
- "api.anthropic.com"See Network Configuration for more information.
|
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
🌑 The shadows whisper... Smoke Codex failed. The oracle requires further meditation...
|
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅ 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.
|
|
✅ Build Test Suite completed successfully!
|
|
❌ Contribution Check failed. Please review the logs for details.
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
🚀 Security Guard has started processing this pull request |
|
❌ Smoke Gemini reports failed. Facets need polishing...
|
|
📰 DEVELOPING STORY: Smoke Docker Sbx reports failed. Our correspondents are investigating the incident...
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
Smoke Test: Copilot BYOK (Direct) Mode ✅Test Results:
Overall Status: PASS Running in direct BYOK mode (
|
|
EGRESS_RESULT allow=pass deny=pass ✅ Allowed domain (github.com) reachable: Overall: PASS 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.
|
|
Smoke Test: Copilot Engine — Overall: PASS
Recent PRs: #8239 Upgrade gh-aw workflows to v0.88.5, #8233 Enable validated dynamic enclave delegation handoff cc
|
Smoke Test Results: GitHub Actions Services Connectivity
Overall: FAIL All checks failed with "Temporary failure in name resolution" for
|
|
$(jq -Rs . /tmp/gh-aw/agent/body.md)
|
Chroot Version Comparison Results
Overall: FAILED — Node.js version inside the chroot (
|
Smoke Test: API Proxy OpenTelemetry Tracing
Overall: All scenarios pass. No issues found.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS Notes:
|
|
|
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
scripts/ci/postprocess-smoke-workflows.ts):DOCKER_SANDBOXES_PROXY=http://host.docker.internal:3128on the finalsbx daemon startstep following policy initialization.Authenticate Docker sbxworkflow steps in place during post-processing..github/workflows/smoke-docker-sbx.lock.yml,.github/workflows/smoke-playwright-docker-sbx.lock.yml):scripts/ci/smoke-docker-sbx-workflow.test.ts):DOCKER_SANDBOXES_PROXY=http://host.docker.internal:3128.