Repository navigation
Conversation
Co-authored-by: Copilot App <[email protected]>
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Review summary
One medium-severity lifecycle issue: failed legacy proxy startup can leave a stale host firewall filter on port 18443. The new ingress protection is otherwise appropriately fail-closed, and I found no additional actionable issues in the changed lines.
Details
- Ensure startup failures clean up or explicitly manage ownership of the installed filter so self-hosted runners do not retain unexplained state indefinitely.
- The broad Docker bridge trust and loopback binding match the documented topology assumptions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~8 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
| DOCKER_NETWORK_ARGS=(--network bridge -p 127.0.0.1:18443:18443) | ||
| else | ||
| # shellcheck source=proxy_network_lib.sh | ||
| source "${SCRIPT_DIR}/proxy_network_lib.sh" |
There was a problem hiding this comment.
Installing the host ingress filter before docker run can leave a stale filter behind whenever container creation or either readiness check fails, because the failure paths remove the container and stop_cli_proxy.sh intentionally retains the filter when no container exists.
💡 Clean up failed startup state
Please add an EXIT/ERR cleanup path after the filter is installed (or track ownership/state) so failed starts do not leave port 18443 filtered indefinitely on self-hosted runners; otherwise later jobs can inherit unexplained firewall state and lose connectivity.
There was a problem hiding this comment.
🟡 Changes recommended
The firewall can expose the credential-backed proxy through IPv6 or unintended bridges while blocking legitimate legacy sidecar traffic.
4 open issues
What changed in this PR
This PR adds ingress controls to gh-aw’s legacy credential-backed proxies while leaving compiler output and the default isolated topology unchanged.
Changes:
- Bind the host-network DIFC proxy to loopback and require firewall installation before starting the legacy CLI proxy.
- Base cleanup on the container’s actual network mode, stopping the listener before removing its filter.
- Add lifecycle and network coverage, and document the fallback trust boundary.
| File | Description |
|---|---|
docs/src/content/docs/reference/integrity.md |
Documents legacy ingress restrictions and cleanup behavior. |
actions/setup/sh/stop_cli_proxy.sh |
Checks network mode and stops the container before filter removal. |
actions/setup/sh/start_difc_proxy.sh |
Selects loopback or bridge listening based on isolation mode. |
actions/setup/sh/start_cli_proxy.sh |
Gates host-network startup on ingress-filter installation. |
actions/setup/sh/proxy_network_test.sh |
Adds network-namespace connectivity, rejection, and authentication checks. |
actions/setup/sh/proxy_network_lib.sh |
Implements reusable ingress-filter installation and removal. |
actions/setup/js/start_cli_proxy.test.cjs |
Covers binding, firewall failures, and shutdown ordering. |
Review effort: Max (auto)
| # Install the deny before any exceptions or INPUT hook. Retries are idempotent. | ||
| sudo -n iptables -w -C GH_AW_CLI_PROXY -j DROP 2>/dev/null || | ||
| sudo -n iptables -w -A GH_AW_CLI_PROXY -j DROP || return 1 | ||
| for interface in lo docker0 br-+; do |
| # Install the deny before any exceptions or INPUT hook. Retries are idempotent. | ||
| sudo -n iptables -w -C GH_AW_CLI_PROXY -j DROP 2>/dev/null || | ||
| sudo -n iptables -w -A GH_AW_CLI_PROXY -j DROP || return 1 | ||
| for interface in lo docker0 br-+; do |
| sudo -n iptables -w -I GH_AW_CLI_PROXY 1 -i "$interface" -j RETURN || return 1 | ||
| done | ||
| sudo -n iptables -w -C INPUT -p tcp --dport 18443 -j GH_AW_CLI_PROXY 2>/dev/null || | ||
| sudo -n iptables -w -I INPUT 1 -p tcp --dport 18443 -j GH_AW_CLI_PROXY || return 1 |
| cleanup() { | ||
| if [ -n "$SERVER_PID" ]; then kill "$SERVER_PID" 2>/dev/null || true; fi | ||
| if [ -n "$MCP_PID" ]; then kill "$MCP_PID" 2>/dev/null || true; fi | ||
| for namespace in external sidecar isolated; do | ||
| ip netns delete "$namespace" 2>/dev/null || true | ||
| done | ||
| } | ||
| trap cleanup EXIT | ||
|
|
||
| ip link set lo up | ||
| for entry in external:eth0:192.0.2 sidecar:docker0:172.18.0 isolated:br-awf-test:172.19.0; do | ||
| IFS=: read -r namespace interface subnet <<< "$entry" | ||
| ip netns add "$namespace" |
Triage
|
|
Category: bug
|
|
Category: bug | Risk: high | Total score: 81 (impact 0/urgency 0/quality 0) | Recommended action: fast_track | Batch: none PR: #76957 — Restrict legacy credential-backed proxy ingress
|
|
Category: bug | Risk: high | Total score: 81/100 | Breakdown: impact 45, urgency 24, quality 12 | Recommended action: fast_track | Batch: security-review
|


Summary
Legacy host-network DIFC and CLI proxies exposed token-backed GitHub access to other machines that could reach the runner's listener (AI Scan alerts 1095 and 1096).
The default isolated topology and compiler output are unchanged. Host processes and Docker-standard
docker0/br-*interfaces remain trusted; nonstandard bridge-interface names are not exceptions. Alert 1097 is not treated as an authentication bypass: the MCP HTTP binding is retained for gateway compatibility, with valid, missing, and incorrect API keys checked across interfaces.Validation
make agent-report-progresspassed: build, JavaScript lint/typecheck, shell checks, and 51 proxy startup/lifecycle tests.bash actions/setup/sh/proxy_network_test.shpassed in an isolated Linux Docker fixture using real iptables and network namespaces: legacy connectivity, external rejection, retry/scoped cleanup, DIFC loopback, and MCP authentication.JavaScript tests ran on Linux Node 24 through a session-local wrapper because the existing FIFO diagnostic capture stalls on macOS. CLI/DIFC network checks use a synthetic HTTP listener, not a live GitHub token or a complete AWF/MCPG deployment.