fix: drop CAP_NET_ADMIN from Cloud Hypervisor VMM - #7887
Conversation
Pre-create and own the TAP for the VMM identity. Narrow Landlock access to tun_flags and launch Cloud Hypervisor with empty capability sets. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🚀 Security Guard has started processing this pull request |
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The security-critical capability and Landlock boundary should receive final human review with live-KVM confirmation.
Review tier: Balanced
Findings: None
What changed in this PR
Removes CAP_NET_ADMIN from the Cloud Hypervisor VMM while preserving TAP access through ownership and a narrowly scoped Landlock rule.
Changes:
- Empties all VMM capability sets.
- Restricts TAP sysfs access to
tun_flags. - Updates unit, live-security, and documentation assertions.
| File | Description |
|---|---|
src/cloud-hypervisor/launcher.ts |
Drops capabilities and narrows Landlock access. |
src/cloud-hypervisor/launcher.test.ts |
Verifies zero-capability launch arguments and rules. |
scripts/ci/cloud-hypervisor-live-smoke.sh |
Checks all capability sets and TAP rule live. |
scripts/ci/cloud-hypervisor-ci-scripts.test.ts |
Verifies smoke-test coverage. |
docs/INTEGRATION-TESTS.md |
Documents updated security assertions. |
docs/cloud-hypervisor-foundation.md |
Updates confinement and troubleshooting guidance. |
docs/architecture.md |
Reflects the zero-capability VMM boundary. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
✅ 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. 🌟 Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "msfeed25.pkgs.visualstudio.com"
- "registry.npmjs.org"See Network Configuration for more information.
|
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓
|
|
🛡️ 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.
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤
|
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
🚀 Security Guard has started processing this pull request |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
✅ Smoke Claude passed 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.
|
|
✅ Build Test Suite completed successfully!
|
|
❌ Smoke Gemini reports failed. Facets need polishing...
|
|
❌ Contribution Check failed. Please review the logs for details.
|
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓
|
|
🔌 Smoke Services — All services reachable! ✅
|
Smoke Test: Copilot BYOK (Direct Mode) ✅Status: PASS All tests verified:
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY via api-proxy → api.githubcopilot.com)
|
|
Smoke Test: Copilot Engine — @lpcox
Overall: PASS
|
Smoke Test: Claude Engine Validation
Overall result: 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
- "api.anthropic.com"See Network Configuration for more information.
|
|
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: Docker Sbx ValidationPR: fix: drop CAP_NET_ADMIN from Cloud Hypervisor VMM (#7887)
Overall: PASS cc @lpcox
|
Chroot Version Comparison Results
Overall: FAILED — Node.js version mismatch between host and chroot environment.
|
|
Smoke Test Results:
Overall: FAIL —
|
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
|
|
docs: add B28 runner-doctor coverage for private-CA api-proxy TLS failures
|
|
Smoke test status: FAIL Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "msfeed25.pkgs.visualstudio.com"
- "registry.npmjs.org"See Network Configuration for more information.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — PASS Note: Maven's default
|
|
OTel Tracing Smoke Test Results
Summary: All scenarios pass or behave as expected during development. No regressions detected.
|
Summary
/dev/kvmsupplementary groupvnet_hdrTAP and narrow Landlock access from the TAP sysfs directory to onlytun_flagsSecurity rationale
This closes the capability gap with
github/agent-microvmv0.9.0 at commit9ca223049a3af490df168cbb74233ab438aceefb. The prior launcher retainedCAP_NET_ADMINbecause avm.bootLandlock denial reading TAP flags was attributed to TAP configuration. AWF already creates, configures, owns, and brings up the TAP before launching the VMM. Granting read-only access to itstun_flagsattribute lets Cloud Hypervisor reopen the TAP without a capability. A compromised VMM can no longer reconfigure namespace interfaces or firewall policy, and a zero bounding set prevents capability recovery.Validation
npm test -- --runInBand src/cloud-hypervisor/launcher.test.ts src/cloud-hypervisor/vm-config-builder.test.ts src/microvm/network.test.ts scripts/ci/cloud-hypervisor-ci-scripts.test.ts(74 tests passed)npm run buildnpm run type-checkbash -n scripts/ci/cloud-hypervisor-live-smoke.sh