Repository navigation
fix: wire trusted Codex sandbox policy into enclave launches - #11224
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Codex shell execution permits overwriting session logs with guest-controlled metrics that are exported unchanged, allowing private seed data to bypass result-schema and disclosure-budget controls.
1 open issue
What changed in this PR
Wires Codex’s external-sandbox opt-in into AWF’s shared enclave launch environment, addressing the production policy handoff gap in #11219 without changing the outer isolation controls.
Changes:
- Enables the AWF-owned Codex policy across Docker, gVisor, and Cloud Hypervisor.
- Extends coverage for final environment and native arguments, including pinned Codex shell execution through the production Docker specification.
- Documents the trusted policy handoff and preserved isolation guarantees.
| File | Description |
|---|---|
tests/integration/enclave-codex-shell.test.ts |
Checks the running Codex process’s policy environment and sandbox arguments. |
src/enclave/agent-provider-environment.test.ts |
Verifies cross-backend policy propagation and resistance to ambient or request overrides. |
docs/enclaves-architecture.md |
Documents policy ownership across supported backends. |
containers/enclave/agent-executor/agent-provider-environment.js |
Adds the trusted Codex external-sandbox opt-in. |
Review effort: Max (auto)
| case 'codex': | ||
| return { | ||
| // AWF owns the outer sandbox; never derive native execution policy from a task. | ||
| AWF_ENCLAVE_AGENT_CODEX_BYPASS_APPROVALS: 'true', |
|
@copilot address review feedback and make sure that 'npm test' runs without any failures |
|
✅ Copilot review passed with no inline comments. @copilot Add the |
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit 431e3a5 |
Removed guest-controlled |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (5 files)
✨ New Files (1 files)
Coverage comparison generated by |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓
|
|
✅ Build Test Suite completed successfully!
|
|
✅ Security Guard completed successfully! Security GuardOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
✅ Smoke Claude passed
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
💎 Smoke Gemini is crystallizing results on this pull request... |
|
🔑 Smoke Copilot BYOK AOAI (api-key) is testing Azure OpenAI BYOK (api-key) mode on this pull request... |
|
🔌 Smoke Services is testing service connectivity for this pull request... |
|
Cloud Hypervisor + Copilot smoke test
Overall: PASS
|
|
Smoke Copilot: PR "feat: add daily regression failure triage workflow"
Overall: PASS —
|
🏗️ Build Test Suite Results
Overall: 7/8 ecosystems passed — FAIL Java failure details: with the required .NET note: the first run failed with a NuGet-Migrations error ( The
|
|
EGRESS_RESULT allow=pass deny=pass
Overall: PASS (PR author: @lpcox)
|
|
11216: fix: handle Copilot zero-batch tariffs without masking model policy
|
|
|
|
Smoke Test: Copilot BYOK (Direct) Mode ✅ PASS
Running in direct BYOK mode via
|
|
OTEL smoke test
|
Chroot Version Comparison
Result: Not all tests passed (Node.js version mismatch), so the
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|

Production enclave launches omitted Codex’s external-sandbox opt-in, so shell execution failed in nested bubblewrap despite successful inference and CLI exit 0.
AWF_ENCLAVE_AGENT_CODEX_BYPASS_APPROVALS=truein the shared provider environment for Docker, gVisor, and Cloud Hypervisor. Task text, request fields, and ambient environment cannot override it.0.159.3shell execution through the production Docker specification, including schema-valid/awf/outand canonicalresult-emptyfailures.