Skip to content

[domains-audit] Agy adds GitHub download egress without the documented engine-domain opt-in #72063

Not planned

Description

@github-actions

Summary

Agy unconditionally adds its engine bundle to the agent firewall, including when network: {} is selected or a preinstalled custom executable makes its download hosts unnecessary. This differs from the shared domain helper and the documented rule that engine bundles require explicit network.allowed opt-in.

The immediate fix is to stop granting download egress for custom executables. For the default executable, separate verified CLI bootstrap access from the agent's runtime allow-list before removing the download rules; the current harness genuinely needs them.

Affected sets

All entries below are in pkg/workflow/data/ecosystem_domains.json:270 and are injected by pkg/workflow/agy_engine_execution.go:51.

Set Domain Bucket File:line
AgyDefaultDomains github.com github-core pkg/workflow/data/ecosystem_domains.json:270
AgyDefaultDomains api.github.com github-core pkg/workflow/data/ecosystem_domains.json:270
AgyDefaultDomains objects.githubusercontent.com tooling-download pkg/workflow/data/ecosystem_domains.json:270
AgyDefaultDomains release-assets.githubusercontent.com tooling-download pkg/workflow/data/ecosystem_domains.json:270

The remaining entry, host.docker.internal, is gateway reachability and is not a removal candidate.

Why this is suspicious

GetAllowedDomainsForEngineWithModel explicitly does not merge engine defaults (domains.go:679-689). Agy bypasses that policy by calling mergeDomainsWithNetworkToolsAndRuntimes(AgyDefaultDomains, ...) directly. BuildAWFConfigJSON copies the result into network.allowDomains (awf_config_build.go:56-62), so this is runtime firewall configuration, not merely provider metadata.

The same Agy execution function supports engine.command overrides (agy_engine_execution.go:12-15). The harness downloads only when command === "agy" (actions/setup/js/agy_harness.cjs:61-89), yet a trusted custom executable receives the identical allow-list. Its gateway inference path explicitly disables direct inference fallback (:95-104), providing no reason to retain unrelated direct download access.

Suggested change

  1. Make Agy's runtime policy use the shared explicit-opt-in domain path, retaining necessary gateway connectivity separately.
  2. Do not add release-download hosts for custom preinstalled executables. For the default agy command, stage the verified binary before the agent firewall step or otherwise separate bootstrap-only access from agent execution. Preserve checksum and version verification; simply deleting the domains would break today's bootstrap.
  3. Keep direct GitHub/download access available through an explicit, clearly documented bundle. Add a purpose/applicability comment at domains.go:128.
  4. Add policy tests at the emitted AWF configuration level, not only the shared helper level.

Verification

Static source and test review only; no audited endpoint was contacted and no Go tests were executed.

  • TestEngineDomainSetsRequireExplicitNetworkAllowedOptIn (domains_test.go:459) covers Copilot through the shared helper, not Agy's execution builder.
  • TestNetworkPermissionsGatePackageRegistries (domains_package_registry_test.go:274) includes Agy but also calls the shared helper; it does not observe this separate execution path.
  • Extend TestAgyCompilerSelectionAndRestrictions (agy_engine_test.go:54, including its custom trusted executable case) and TestAgyNativeRuntimeDefaults (:215) with empty-network, selective-network, and explicit agy opt-in assertions on network.allowDomains.
  • TestAgyHarnessPrivateConfigurationAndLiteralInput (agy_harness_test.go:58) uses a custom binary and verifies gateway routing. Preserve that path and fail-closed behavior while narrowing egress.
View full findings

Comments and scope checked

.github/aw/network.md:94 identifies these hosts as Agy transport; :100-104 and docs/src/content/docs/reference/network.md:146 describe engine bundles as explicit opt-ins. domains.go:71-88 explains the installation/runtime separation expected of normal engine defaults. Agy currently differs: its native archive is downloaded inside its harness. This report recognizes that concrete dependency rather than treating every GitHub host as unjustified.

The sanitization computation also starts from explicit network/tools/runtimes without Agy defaults (domains.go:867-870), whereas the execution path grants the bundle. Tests should keep those policy representations consistent.

Deduplication

Open issue #70226 already tracks shared GitHub parent-rule breadth and baseline duplication. This report does not re-report that general suffix finding: it identifies the separate automatic Agy execution path, including unnecessary grants for custom binaries. Current comments/tests now explicitly document the GitHub Packages suffix exception. No matching issue for this execution-path defect was found in the completed audit-prefix/security, agy network, and AgyDefaultDomains searches. A supplemental agy firewall query failed; it is not claimed as completed.

This is a newly reported observation, not a claim about when the behavior was introduced. Reviewed commit: 9a57ef760fda8457186126cf0f098ff595a3b5f7.

> - [x] expires on Nov 22, 2026, 10:27 AM UTC

Generated by 🌐 Weekly Network Domain Set Audit · pi · gpt60 · ~254 AIC · ⌖ ~58 AIC · ⊞ 11K · ◷

Activity

  1. added
    cookie
    on Oct 26, 2026
  2. added
    backlog:security
    on Nov 21, 2026
  3. github-actions commented on Nov 22, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-11-22T10:27:27.962Z.

    Closed by Workflow

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

Metadata

Metadata

Labels

backlog:securitycookiesecurity

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions