Expose Azure CLI state and ADO auth token inside AWF sandbox - #6690
Conversation
There was a problem hiding this comment.
Pull request overview
Enables Azure CLI and Azure DevOps authentication inside AWF sandboxes.
Changes:
- Mounts
~/.azureacross sandbox runtimes. - Forwards Azure configuration and ADO authentication variables.
- Updates targeted tests and sbx documentation.
Show a summary per file
| File | Description |
|---|---|
src/config/sandbox-mount-policy.json |
Adds .azure to mounted home directories. |
src/config/mount-policy.test.ts |
Verifies the Azure mount policy. |
src/services/agent-volumes/home-whitelist.test.ts |
Updates allowlist and denylist assertions. |
src/services/agent-volumes/home-strategy.test.ts |
Tests the compose Azure mount. |
src/services/agent-environment/env-passthrough.ts |
Forwards Azure/ADO environment variables. |
src/services/agent-environment/env-passthrough.test.ts |
Tests the new passthrough behavior. |
src/sbx-manager.ts |
Updates credential-store commentary. |
docs/sbx-integration.md |
Documents the sbx Azure directory mount. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 8/8 changed files
- Comments generated: 3
- Review effort level: Medium
| 'ACTIONS_ID_TOKEN_REQUEST_URL', | ||
| 'ACTIONS_ID_TOKEN_REQUEST_TOKEN', | ||
| 'AZURE_CONFIG_DIR', | ||
| 'ADO_MCP_AUTH_TOKEN', |
| ".cache", | ||
| ".config", | ||
| ".local", | ||
| ".azure", |
| the host from `HOME_TOOL_SUBDIRS` (`.cache`, `.config`, `.local`, `.azure`, | ||
| `.anthropic`, `.claude`, `.cargo`, `.rustup`, `.npm`, `.nvm`) plus the agent | ||
| state dirs `.copilot` and `.gemini`. Credential-store dirs such as `.aws`, | ||
| `.ssh`, `.docker`, `.kube`, `.azure` and `.gnupg` are **never** whitelisted, | ||
| `.ssh`, `.docker`, `.kube`, and `.gnupg` are **never** whitelisted, | ||
| so they never enter the VM. Each whitelisted dir is mounted **wholesale** (as |
|
@copilot address review feedback |
Addressed all three review issues in f3dd899: 1. 2.
These are masked via 3. Documentation corrected ( |
|
✅ Copilot review passed with no inline comments. @copilot Add the |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅ |
|
🔌 Smoke Services — All services reachable! ✅ |
|
✅ Smoke Gemini completed. All facets verified. 💎 Smoke test completed with FAIL status. Comment added to PR #6690. |
|
✅ Contribution Check completed successfully! Contribution check complete — no issues found. The PR includes targeted tests for the new Azure CLI/auth behavior, updates documentation for the mount policy change, references a related issue (#6686), and keeps new files in the expected src/docs locations. |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Build Test Suite completed successfully! |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤 |
|
❌ Smoke Copilot BYOK AOAI (api-key) reports failed. AOAI BYOK (api-key) mode investigation needed... |
|
❌ Smoke Copilot BYOK AOAI (Entra) reports failed. AOAI BYOK (Entra) mode investigation needed... |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
✅ Smoke Claude passed |
|
🚀 Security Guard has started processing this pull request |
🔬 Smoke Test Results
Overall: PASS (core connectivity verified)
|
🔥 Smoke Test: Copilot Network Isolation
Overall: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "example.com"See Network Configuration for more information.
|
Smoke Test: GitHub Actions Services Connectivity
Overall: FAIL —
|
Smoke Test: API Proxy OpenTelemetry Tracing
All 5 scenarios pass. The OTEL tracing integration is working correctly.
|
Smoke Test: Copilot BYOK (Direct) — PASSRunning in direct BYOK mode (
Overall: PASS
|
Gemini Smoke Test Results
Overall Status: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "localhost"See Network Configuration for more information.
|
Smoke Test: Claude Engine Validation
Overall Result: ✅ PASS
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS
|
Chroot Smoke Test Results
Overall: ❌ FAILED — Node.js version mismatch between host and chroot environment.
|
🧪 Smoke Test Results — Docker Sbx
Overall:
|
|
Merged PRs reviewed:
✅ Playwright GitHub title check Overall: FAIL
|
Azure CLI/ADO auth was breaking in-sandbox because
~/.azurewas not mounted andADO_MCP_AUTH_TOKEN/AZURE_CONFIG_DIRwere not forwarded to the agent environment under API-proxy mode. This change aligns mount policy and env passthrough so runner-provisioned Azure/ADO auth is available inside the agent.Home mount policy: allow Azure CLI state
.azuretohome.toolSubdirsin the canonical sandbox mount policy..azurefromhome.forbiddenSubdirsso compose + sbx runtimes can mount it consistently.Agent env passthrough: propagate Azure/ADO auth inputs
AZURE_CONFIG_DIRandADO_MCP_AUTH_TOKENto always-forwarded host env vars in agent env assembly.Targeted coverage updates
.azurepresence in mounted home tool directoriesAZURE_CONFIG_DIRADO_MCP_AUTH_TOKEN