Bypass agent ENTRYPOINT in rootless artifact permission repair#6342
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes rootless artifact permission repair by bypassing the agent image entrypoint and improves failure diagnostics.
Changes:
- Runs repair commands directly through
sh. - Falls back to stdout when stderr is empty.
- Updates invocation and logging tests.
Show a summary per file
| File | Description |
|---|---|
src/artifact-permissions.ts |
Corrects repair execution and error reporting. |
src/artifact-permissions.test.ts |
Tests shell invocation and stdout fallback. |
src/artifact-preservation-errors.test.ts |
Updates preservation contract expectations. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Medium
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤 |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓 |
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅ |
|
🔌 Smoke Services — All services reachable! ✅ |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅ |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded. |
|
✅ Build Test Suite completed successfully! |
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓 |
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
|
🚀 Security Guard has started processing this pull request |
|
✅ Smoke Gemini completed. All facets verified. 💎 |
|
✅ Contribution Check completed successfully! No comment needed: the PR includes tests for the new rootless artifact permission repair path, references the related issue, and stays within existing src/test file organization. |
|
📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤 |
|
🔑 Smoke Copilot PAT PAT auth validated. All systems operational. ✅ |
|
✅ Smoke Copilot BYOK AOAI (Entra) completed. Copilot AOAI BYOK (Entra) mode operational. 🔓 |
|
✅ Smoke Copilot BYOK AOAI (api-key) completed. Copilot AOAI BYOK (api-key) mode operational. 🔓 |
|
✅ Smoke Claude passed |
|
🚀 Security Guard has started processing this pull request |
|
✅ Contribution Check completed successfully! PR #6342 follows CONTRIBUTING.md: tests included, description references #6334, and changes stay in src/tests with no docs update needed. |
Smoke Test: Claude Engine Validation
Overall Result: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
🎯 Smoke Test: Copilot BYOK (Direct) Mode✅ PASS — All tests successful
Running in direct BYOK mode (COPILOT_API_KEY) via api-proxy → api.githubcopilot.com CC: Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Smoke test: Copilot network isolation egress enforcement EGRESS_RESULT allow=pass deny=pass ✅ Test 1 (allowed domain Overall: PASS
Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"
- "example.com"See Network Configuration for more information.
|
Smoke Test Results — PAT Auth
Auth mode: PAT (COPILOT_GITHUB_TOKEN) Overall: INCONCLUSIVE Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
🔥 Smoke Test Results
Overall: PASS cc Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Smoke Test: PASS\n- fix: bypass AWF entrypoint in rootless artifact permission repair ✅\n- fix: set AWF_GEMINI_ENABLED for Vertex AI users (googleApiKey) ✅\n- GitHub title check ✅\n- file write/read ✅\n- build ✅\nOverall: PASS Warning Firewall blocked 2 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"
- "registry.npmjs.org"See Network Configuration for more information.
|
Smoke Test: Services Connectivity
Overall: FAIL Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test: API Proxy OpenTelemetry Tracing
Overall: All scenarios pass or are expected-pending during development. Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Chroot Version Comparison Results
Not all tests passed — Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Running direct BYOK mode (github-oidc + AWF_AUTH_AZURE_* + COPILOT_PROVIDER_BASE_URL) Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
|
Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY + COPILOT_PROVIDER_BASE_URL) via api-proxy → Azure OpenAI (Foundry, o4-mini-aw) Overall: PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
🔥 Smoke Test: Docker Sbx — PASS
Overall: PASS
|
Build Test Suite Results
Overall: 8/8 ecosystems passed - PASS Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "awmgmcpg"See Network Configuration for more information.
|
Smoke Test Results
Overall Status: FAIL Last 2 PRs (from git log):
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.
|
Rootless artifact permission repair was invoking the
agentimage without overriding itsENTRYPOINT, so the repair command never ran and each directory incurred a deterministic ~30s timeout. This change routes the repair throughshdirectly sochown/chmodexecutes as intended and preserves actionable failure details when errors are emitted on stdout.Repair path correction (core fix)
fixArtifactPermissionsForRootless(),docker runnow sets--entrypoint sh.-c 'chown ...; chmod ...', avoidingentrypoint.sh/iptables wait logic entirely.Failure observability
stderr, with fallback tostdoutwhenstderris empty.Contract coverage updates
--entrypoint sh,-c ...command).