Repository navigation
Fix capability-file race in enclave executor test - #10122
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The focused test-only change preserves coverage and reliably closes the descriptor; native CodeQL confirmation remains pending.
0 open findings
What changed in this PR
Addresses the capability-file pathname race reported in #10120 with a focused enclave executor test change.
Changes:
- Opens the capability file with
O_NOFOLLOWand checks permissions and content through the same descriptor. - Closes the descriptor in
finally, preserving existing permission, content, and server-cleanup assertions.
| File | Description |
|---|---|
src/enclave/host-executor-protocol.test.ts |
Uses descriptor-based capability-file validation with reliable cleanup. |
🧠 Review effort: Max
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
✅ Copilot review passed with no inline comments. @copilot Add the |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
|
🔌 Smoke Services — All services reachable! ✅
|
|
💎 Smoke Gemini is crystallizing results on this pull request... |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
🔑 Smoke Copilot BYOK AOAI (api-key) is testing Azure OpenAI BYOK (api-key) mode on this pull request... |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅
|
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟
|
|
Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
🪪 Smoke Copilot BYOK AOAI (Entra) is testing Azure OpenAI BYOK (Entra / GitHub OIDC) mode on this pull request... |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
✅ Smoke Claude passed
|
|
🚀 Security Guard has started processing this pull request |
|
✅ Build Test Suite completed successfully!
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
|
Cloud Hypervisor + Copilot smoke test
|
|
Smoke Copilot — PASS
|
|
Services smoke test: PASS
|
|
EGRESS_RESULT allow=pass deny=pass
|
|
OTEL smoke results
|
Smoke Test: Copilot BYOK (Direct)✅ GitHub MCP — connectivity verified Status: PASS | Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY)
|
Smoke Test
|
Chroot Version Comparison
Result: Not all tests passed (Node.js version mismatch), so the
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — PASS Notes: Bun/Deno were installed via npm (the curl install scripts were blocked); .NET needed
|
The capability-file test checked permissions and content through separate pathname lookups, triggering CodeQL’s file-system race finding. Use one opened descriptor for both checks while preserving the permission and content assertions.
O_NOFOLLOW, check mode withfstatSync, and read content from that descriptor.finally.