Strip stale raw-network capabilities from agent images - #7659
Conversation
There was a problem hiding this comment.
Pull request overview
Hardens agent images by removing stale raw-network file capabilities.
Changes:
- Removes capabilities from
pingandmtr-packet. - Adds static regression coverage for the Dockerfile hardening.
Show a summary per file
| File | Description |
|---|---|
containers/agent/Dockerfile |
Adds capability removal and validation. |
scripts/ci/agent-dockerfile-security.test.ts |
Checks for the hardening block. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Balanced
| setcap -r "$binary" 2>/dev/null || true; \ | ||
| if getcap "$binary" | grep -q .; then \ | ||
| echo "ERROR: Failed to remove file capabilities from $binary" >&2; \ | ||
| exit 1; \ | ||
| fi; \ |
| expect(hardeningBlock).toContain('setcap -r "$binary"'); | ||
| expect(hardeningBlock).toContain('getcap "$binary"'); | ||
| expect(hardeningBlock).toContain('exit 1'); |
|
@copilot address review feedback |
|
✅ Copilot review passed with no inline comments. @copilot Add the |
Addressed in |
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
|
❌ Smoke Gemini reports failed. Facets need polishing...
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 Warning Firewall blocked 3 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "msfeed2.pkgs.visualstudio.com"
- "msfeed25.pkgs.visualstudio.com"
- "registry.npmjs.org"See Network Configuration for more information.
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤
|
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓
|
|
🔌 Smoke Services — All services reachable! ✅
|
|
✅ Smoke Claude passed
|
|
✅ 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.
|
|
✅ Build Test Suite completed successfully!
|
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
|
Smoke Test: Copilot Engine
Overall: PASS cc
|
|
EGRESS_RESULT allow=pass deny=pass ✅ Allowed domain (api.github.com) reachable — HTTP 200 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.
|
✅ Direct BYOK Smoke Test PASSEDTest Results:
Mode: Direct BYOK (COPILOT_PROVIDER_API_KEY) with api-proxy sidecar injection Status: PASS
|
Smoke Test: Services Connectivity
Overall: FAIL —
|
|
Docker Sbx Smoke Test
Overall: PASS cc
|
|
Smoke test results for Strip stale raw-network capabilities from agent images:
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) Overall: PASS
|
Chroot Version Comparison
Not all tests passed — Node.js version differs between host and chroot environment.
|
|
Smoke test: FAIL PR titles:
Overall status: FAIL Warning Firewall blocked 3 domainsThe following domains were blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "msfeed2.pkgs.visualstudio.com"
- "msfeed25.pkgs.visualstudio.com"
- "registry.npmjs.org"See Network Configuration for more information.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — PASS Notes:
|
|
OTel Tracing Smoke Test Results
All scenarios pass or are expected-pending. No regressions detected.
|
Strip stale raw-network capabilities from agent images
Running in direct BYOK mode (AWF_AUTH_TYPE=github-oidc + AWF_AUTH_AZURE_* + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) authenticated via Microsoft Entra Overall: PASS cc
|
pingandmtr-packetretained inertcap_net_rawfile capabilities in runner-based agent images, creating unnecessary attack surface if the capability bounding set regresses.Image hardening
Regression coverage