Skip to content

[domains-audit] Separate direct model API egress from engine transport bundles #78353

Done

Description

@github-actions

Summary

The selectable Copilot, Codex, Gemini and Pi transport bundles include direct vendor model hosts, and Claude conditionally adds one. Gateway-proxied inference does not by itself need those hosts in the agent's firewall allow-list. Split direct vendor egress from the gateway/GitHub transport baseline so selecting the baseline does not implicitly grant both capabilities. This is a new finding, not a claim that the entries were recently added.

These engine bundles are already explicit network.allowed opt-ins, not automatic grants for normal runs. The current reference describes them as direct-provider transport, so changing them needs a documented compatibility migration.

Affected sets

Set Domain Bucket File:line
CopilotDefaultDomains api.githubcopilot.com vendor-model-api pkg/workflow/data/ecosystem_domains.json:265
CodexDefaultDomains api.openai.com vendor-model-api pkg/workflow/data/ecosystem_domains.json:264
GeminiDefaultDomains generativelanguage.googleapis.com vendor-model-api pkg/workflow/data/ecosystem_domains.json:266
PiDefaultDomains api.githubcopilot.com vendor-model-api pkg/workflow/data/ecosystem_domains.json:268
Claude runtime addition to claude opt-in api.anthropic.com vendor-model-api pkg/workflow/claude_engine.go:448-457

Why this is suspicious

getEcosystemDomains expands the named bundles from the JSON arrays (pkg/workflow/domains.go:205-229), and the merged list becomes AWF network.allowDomains (pkg/workflow/awf_config_build.go:67-74). Separately, Gemini points its CLI at the API proxy when the firewall is enabled (pkg/workflow/gemini_engine.go:340-344), Pi constructs an AWF gateway model configuration (pkg/workflow/pi_engine.go:430-462), and the Codex/Claude harnesses can configure provider endpoints from AWF /reflect (actions/setup/js/codex_harness.cjs:770-792, actions/setup/js/claude_harness.cjs:401-456). The reference explicitly says normal inference is proxied and Gemini's proxy upstream need not grant the agent direct access (docs/src/content/docs/reference/network.md:167-182).

The current comments intentionally retain these concrete hosts for model transport (domains.go:105-127); they do not establish that proxied runs require agent-side egress. Direct/custom-provider and non-proxied paths may have different needs and must be preserved through explicit configuration.

Suggested change

  1. Separate gateway/GitHub baseline bundles from named direct-model opt-ins; move the affected host grants to explicit direct-provider sets or literal-domain opt-ins. Preserve supported direct/custom-target configurations and document the behavior change.
  2. For Claude, distinguish proxy-target configuration from an intentional direct Anthropic grant. Preserve existing custom ANTHROPIC_BASE_URL and engine.api-target semantics; do not infer a change to the latter without reviewing its documented Copilot-target behavior.
  3. Test the emitted AWF network.allowDomains for proxied runs with the transport baseline, and test that each deliberate direct-provider opt-in still grants the corresponding host. Ensure gateway upstream targets continue to work independently of agent egress.

Verification

TestCopilotDefaultDomains, TestCodexDefaultDomains, TestGeminiDomainSetRequiresPackageOptIn, and TestEngineDomainSetsRequireExplicitNetworkAllowedOptIn (pkg/workflow/domains_test.go:351-575) currently require the listed hosts. TestEngineDefaultDomainsKeepTransportDomains (domains_package_registry_test.go:116-133), http_mcp_domains_test.go:190-210,312-330, and TestClaudeEngineAllowedDomainsFollowEffectiveTarget (claude_engine_test.go:249-303) also encode existing behavior. Update those assertions and retain coverage for intentional direct access. This is static source/test review; no endpoint was contacted and no tests were run.

View full findings

Pi provider mappings versus effective firewall

piProviderDomains contains api.githubcopilot.com (copilot and github-copilot), api.anthropic.com (anthropic), api.openai.com (openai and codex), and generativelanguage.googleapis.com (google and gemini), all vendor-model-api metadata (ecosystem_domains.json:272-279). getPiDefaultDomains resolves these according to model (domains.go:167-187), and pi_engine_config_test.go:95-103 tests that metadata. However, the normal firewall helper validates that result and then merges only explicit network/tools/runtimes (domains.go:689-698); named pi expansion reads the static JSON bundle, not this dynamic result. Do not remove provider metadata merely because it names upstreams. The reference's claim that provider-scoped models replace the API host in the pi set (reference/network.md:178) should be reconciled with the actual firewall path and covered by emitted-policy tests.

Complete engine classification and comments

  • Gateway: host.docker.internal in all eight bundles and 172.30.0.1 in Codex. The common gateway purpose is described at domains.go:105-111; the Codex IP is identified in domains_test.go:511.
  • GitHub core: github.com in all bundles; api.github.com in Agy, Claude, Codex, Copilot and detection; raw.githubusercontent.com in Claude, Copilot, Gemini, Pi and Pi base. Comments describe shared transport at domains.go:105-143. GitHub's parent suffix also covers package hosts; [domains-audit] Shared GitHub parent rule covers package registries outside ecosystem opt-ins #70226 already tracks that boundary and baseline duplication.
  • Tooling downloads: Agy's objects.githubusercontent.com and release-assets.githubusercontent.com; [domains-audit] Agy adds GitHub download egress without the documented engine-domain opt-in #72063 already tracks their automatic grant and bootstrap dependency. The Agy declaration lacks a purpose comment.
  • Vendor model APIs: the four static entries in the table; detection additionally has api.business.githubcopilot.com, api.enterprise.githubcopilot.com, api.individual.githubcopilot.com, and api.githubcopilot.com (domains.go:720-727 describes detection use). The Claude addition and Pi provider metadata are described above.
  • Package registry: detection's registry.npmjs.org, documented for lockfile validation (domains.go:720-727), is separately reported in this audit. No engine bundle contains PKI, telemetry, OS mirror, or authentication entries. No extra entry was left unclassified.

Other set and overlap checks

The script inventoried 60 named units: 43 JSON ecosystems, eight engine bundles, seven Pi provider mappings, one compound union and one sanitization-only set. It found 108 exact-intersection pairs and 33 directed wildcard-shadow groups, including same-set shadows. Ecosystem priority enumerates all categories; deliberate overlaps include Python/Python-native, Rust/Python-native, Node/Deno, Node/Node-CDNs and shared Google storage. github shadows several explicit githubusercontent hosts; chrome Google wildcards and GitHub parent breadth are already tracked by #72064 and #70226. No individual JSON array contains duplicate entries. The loader sorts lists at runtime, although 31 ecosystem arrays and three engine arrays are not sorted in source. Playwright downloads are a documented feature set (domains.go:549-560). Sorting or comment wording alone is not being reported as a security defect.

Generated by 🌐 Weekly Network Domain Set Audit · pi · routed: gpt61 high · ~23 AIC · ⌖ ~2 AIC · ⊞ 6.8K · ◷

Activity

  1. added
    cookie
    on Nov 16, 2026
  2. github-actions commented on Nov 16, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, Copilot will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · pi · gpt50 · ~1 AIC · ⌖ ~2 AIC · ⊞ 11.5K · ◷

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

Metadata

Metadata

Labels

cookiesecurity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions