Problem
On ARC/DinD runners with (redacted) DOCKER_HOST`, AWF v0.25.53 chroot mode still forces 7 workflow-level workarounds despite gh-aw #30840 being closed as fixed in v0.75.0.
Context
Upstream report: github/gh-aw#34896
Root Cause
Seven distinct deficiencies in the firewall agent:
- Chroot rejects Alpine/musl DinD —
entrypoint.sh requires capsh + glibc on the daemon host; stock docker:dind (Alpine) fails (chroot: No such file or directory)
- engine.env identity vars clobbered by capsh —
HOME/USER/LOGNAME are reset by the user-switch in entrypoint.sh; engine.env overrides are lost, breaking Copilot
- TCP
DOCKER_HOST doesn't resolve daemon filesystem — host-env.ts infers the bind-mountable root from the DOCKER_HOST URL scheme; TCP hosts have no unix-socket path to derive the daemon rootfs from
- Runner-installed binaries invisible in chroot —
agent-volumes.ts mounts the daemon's /usr:ro, not the runner's, so runner-installed copilot is absent
INTERNAL_SERVERS hardcodes "github" — mount_mcp_as_cli.cjs always excludes github MCP from CLI shimming when --disable-builtin-mcps is active
- No identity/hosts synthesis — AWF doesn't generate a minimal
/etc/passwd//etc/group//etc/hosts for the target UID
- Threat-detection job silently no-ops — runs without
pre-agent-steps; ENOENT on copilot is swallowed by GH_AW_DETECTION_CONTINUE_ON_ERROR default, masking the failure as green
Proposed Solution
containers/agent/entrypoint.sh: stage a glibc chroot-runtime bundle; apply engine.env identity vars post-capsh; synthesize /etc/passwd, /etc/group, /etc/hosts for the target UID
src/host-env.ts: add resolveDaemonFilesystem() using Docker API inspect (MergedDir/UpperDir) instead of DOCKER_HOST URL inference
src/services/agent-volumes.ts: include engine binary staging into chroot overlay for both agent and detection jobs
containers/agent/Dockerfile: bundle capsh, /bin/sh, busybox applets, and libutil.so.1 as a chroot-runtime tarball
- Fix
INTERNAL_SERVERS hardcoding and reconsider GH_AW_DETECTION_CONTINUE_ON_ERROR default to surface setup failures
Generated by Firewall Issue Dispatcher · ◷
Problem
On ARC/DinD runners with
(redacted)DOCKER_HOST`, AWF v0.25.53 chroot mode still forces 7 workflow-level workarounds despite gh-aw #30840 being closed as fixed in v0.75.0.Context
Upstream report: github/gh-aw#34896
Root Cause
Seven distinct deficiencies in the firewall agent:
entrypoint.shrequirescapsh+ glibc on the daemon host; stockdocker:dind(Alpine) fails (chroot: No such file or directory)HOME/USER/LOGNAMEare reset by the user-switch inentrypoint.sh;engine.envoverrides are lost, breaking CopilotDOCKER_HOSTdoesn't resolve daemon filesystem —host-env.tsinfers the bind-mountable root from the DOCKER_HOST URL scheme; TCP hosts have no unix-socket path to derive the daemon rootfs fromagent-volumes.tsmounts the daemon's/usr:ro, not the runner's, so runner-installedcopilotis absentINTERNAL_SERVERShardcodes"github"—mount_mcp_as_cli.cjsalways excludes github MCP from CLI shimming when--disable-builtin-mcpsis active/etc/passwd//etc/group//etc/hostsfor the target UIDpre-agent-steps;ENOENToncopilotis swallowed byGH_AW_DETECTION_CONTINUE_ON_ERRORdefault, masking the failure as greenProposed Solution
containers/agent/entrypoint.sh: stage a glibc chroot-runtime bundle; apply engine.env identity vars post-capsh; synthesize/etc/passwd,/etc/group,/etc/hostsfor the target UIDsrc/host-env.ts: addresolveDaemonFilesystem()using Docker API inspect (MergedDir/UpperDir) instead of DOCKER_HOST URL inferencesrc/services/agent-volumes.ts: include engine binary staging into chroot overlay for both agent and detection jobscontainers/agent/Dockerfile: bundlecapsh,/bin/sh, busybox applets, andlibutil.so.1as a chroot-runtime tarballINTERNAL_SERVERShardcoding and reconsiderGH_AW_DETECTION_CONTINUE_ON_ERRORdefault to surface setup failures