Skip to content

Firewall recommends adding the internal MCP gateway to network.allowed, but validation rejects it #45915

Closed

Description

@syarihu

Summary

The internal MCP gateway (awmg-mcpg:8080) is gh-aw's own infrastructure — the agent reaches the github and safeoutputs MCP servers through it, so a run can't read from GitHub or post results if that hop is blocked. In the compiled .lock.yml the gateway appears under topologyAttach, not in the user-facing network.allowed. In practice, though, the firewall denies the hop, the block report then recommends adding awmgmcpg to network.allowed, and following that recommendation fails to compile. It's unclear what the intended way to allow the gateway is, so I wanted to surface the facts and ask.

Observed facts

1. The firewall denies the gateway hop.
We have observed the egress firewall deny the agent's hop to awmg-mcpg:8080, causing the github and safeoutputs MCP servers to fail during initialization. The same denial is reported in #41711 (closed as not planned by the [aw-failures] expiry workflow).

2. The block report recommends adding awmgmcpg to network.allowed.
The firewall block report lists the gateway host awmgmcpg (the normalized display name of awmg-mcpg) as a blocked domain and recommends adding it to network.allowed. The same recommendation appears verbatim in the bodies of #44877 and #44519 (both open, bot-generated [cli-tools-test] issues on unrelated subjects; their bodies embed the firewall audit report that carries this recommendation):

network:
  allowed:
    - awmgmcpg

3. Following that recommendation does not compile.
Adding the recommended entry and running gh aw compile fails:

network.allowed[1]: Validation failed for field 'network.allowed'
Value: awmgmcpg
Reason: 'awmgmcpg' is not a valid ecosystem identifier
Suggestion: Use a valid ecosystem identifier or a domain name containing a dot (e.g., 'example.com').

4. The gateway host is not accepted by the current network.allowed validator.
Single-word network.allowed entries must be a known ecosystem identifier, otherwise they error (#27474 / #27475). The gateway is neither a known ecosystem nor a domain name containing a dot — both the normalized awmgmcpg and the actual container hostname awmg-mcpg are single-label — so neither form is accepted by the current validator.

The question

Putting these together: the gateway is internal infrastructure attached via topologyAttach, not something a workflow author would (or, per the validator, can) list under network.allowed. That makes it look like the gateway should be reachable by construction — independent of the user-facing network.allowed egress policy — rather than something the user is asked to allowlist.

So:

  • Is allowlisting the gateway through network.allowed intended to be possible at all? If not, the block report probably should not recommend adding awmgmcpg there — this is the same class of misleading recommendation that [cli-tools-test] Firewall analysis shows - as blocked domain with incorrect allow-list recommendation #26375 addressed for the - value.
  • If the gateway is expected to be reachable by construction (via topologyAttach), is the firewall's denial of that hop the unexpected behavior here, so that no user-side allowlisting is ever needed?

Steps to reproduce (fact #3)

  1. Add the gateway host to network.allowed, exactly as the block report recommends:
    network:
      allowed:
        - defaults
        - awmgmcpg
  2. Run gh aw compile → fails with 'awmgmcpg' is not a valid ecosystem identifier.

(Any workflow reproduces this — the validator rejects the value regardless of whether the workflow uses the gateway.)

Environment

Activity

  1. locked and limited conversation to collaborators on Jul 16, 2026
  2. unlocked this conversation on Jul 16, 2026
  3. added
    bug
    question
    on Jul 16, 2026
  4. matiloti commented on Jul 17, 2026

    @matiloti

    Another occurrence of fact #2, on GHES + v0.82.9 (copilot engine). A PR-triage run's firewall block report surfaced exactly this recommendation to the agent:

    Firewall blocked 1 domain
    The following domain was blocked by the firewall during workflow execution:
      awmgmcpg
    To allow these domains, add them to the network.allowed list in your workflow frontmatter:
    network:
      allowed:
        - defaults
        - "awmgmcpg"
    

    Confirms the report still emits the normalized single-label awmgmcpg and recommends adding it to network.allowed — which, as you note, the validator then rejects. +1 on treating this as the same class of misleading recommendation as the - value fixed in #26375: the internal gateway is topologyAttach infra and shouldn't be recommended for (or accepted into) the user-facing network.allowed.

    Worth noting the block report can appear even when the gateway hop otherwise works — in our run the github MCP server registered 25 tools fine through the same gateway, so the deny here was benign for that hop.

  5. locked and limited conversation to collaborators on Jul 17, 2026
  6. unlocked this conversation on Jul 17, 2026
  7. jeffhandley commented on Jul 17, 2026

    @jeffhandley

    I found a narrow characteristic that reproduces the warning and a source-level workaround that has been reliable in repeated runs.

    Characteristic that triggers it

    The warning occurs when the Copilot engine is given a native HTTP MCP endpoint hosted by the generated awmg-mcpg container. In my workflow, either of these was enough to create such an endpoint:

    • GitHub tools using their default MCP mode.
    • Safe Outputs using their default MCP transport.

    The generated job gives Copilot HTTP_PROXY/HTTPS_PROXY values for the firewall's Squid proxy, but its NO_PROXY does not include awmg-mcpg. Copilot's HTTP client therefore sends a request such as http://awmg-mcpg:8080/mcp/... through Squid. Squid rejects that internal single-label host with TCP_DENIED/403, and the firewall report subsequently suggests the non-compilable awmgmcpg allowlist entry described in this issue.

    The important distinction is not merely whether awmg-mcpg appears in topologyAttach; the fixed lock file still attaches the container. The warning disappears when the agent no longer receives or calls native HTTP MCP endpoints on that container.

    Minimal source-level reproduction

    This frontmatter is sufficient to exercise both affected native transports:

    tools:
      github:
        toolsets: [default]
    
    safe-outputs:
      submit-pull-request-review:
        max: 1
        target: "*"
        allowed-events: [COMMENT]

    After compiling and running it, inspect the uploaded firewall access.log. The problematic form contains a line like:

    TCP_DENIED/403 ... http://awmg-mcpg:8080/mcp/...
    

    Adding awmgmcpg or awmg-mcpg to network.allowed is not a viable workaround: both are single-label names and fail validation as described in the issue body.

    Tested workaround

    Route both capabilities through the generated CLI proxy instead:

    tools:
      cli-proxy: true
      github:
        mode: gh-proxy
        toolsets: [default]
    
    safe-outputs:
      submit-pull-request-review:
        max: 1
        target: "*"
        allowed-events: [COMMENT]

    Both settings matter for a workflow that uses both capabilities:

    • github.mode: gh-proxy removes the native GitHub MCP endpoint.
    • tools.cli-proxy: true exposes Safe Outputs through the CLI proxy rather than its
      native HTTP MCP endpoint.

    I tested the two changes separately while debugging:

    • A run with the default GitHub MCP transport showed the native GitHub initialization denial: github/gh-aw run 29142010736.
    • After addressing GitHub but before routing Safe Outputs through the CLI proxy, the same denial remained for Safe Outputs.
    • With both settings applied, the agent still submitted its review successfully, while the uploaded firewall artifacts contained zero TCP_DENIED entries and zero requests to awmg-mcpg.

    I have since checked the raw access.log artifacts for more than two dozen additional review runs using this configuration; all remained free of both TCP_DENIED and awmg-mcpg requests. The final three incremental Beta runs contained 52, 61, and 71 firewall requests respectively, again with zero denials and zero awmg-mcpg traffic.

    This looks like a practical workaround rather than a complete fix: native HTTP MCP should presumably be able to reach the gateway that gh-aw attached to the topology, or the generated proxy environment should exempt that internal host. Independently, the firewall recommendation should avoid suggesting a value that gh aw compile cannot accept.

    Note

    This comment was drafted with GitHub Copilot.

  8. locked and limited conversation to collaborators on Jul 17, 2026
  9. unlocked this conversation on Jul 17, 2026
  10. lpcox commented on Jul 28, 2026

    @lpcox
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-inspectedawfbugclicommunitycompilermcpquestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions