Skip to content

Keep proxy-routed provider APIs out of agent egress - #76293

Merged
pelikhan merged 5 commits into
mainfrom
copilot/domains-audit-fix-direct-provider-api-hosts
Nov 9, 2026
Merged

pelikhan merged 5 commits into
mainfrom
copilot/domains-audit-fix-direct-provider-api-hosts

Conversation

Copilot AI commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Universal LLM engines were adding provider API hosts to AWF’s agent allowlist based only on the model prefix, even when inference used the reflected gateway. This exposed direct provider egress without an explicit network opt-in.

  • AWF policy: Omit model-mapped provider hosts for proxy-routed universal consumers; retain declared defaults and explicit network, MCP, and runtime domains.
  • Opt-ins and compatibility: Explicitly allow a provider host when needed:
    network:
      allowed:
        - api.openai.com
    Non-proxy engine provider mappings and vendor-bundle opt-ins remain supported.
  • Generated workflows: Regenerate affected lock files so emitted AWF allowlists reflect the policy change.

Copilot AI changed the title [WIP] Fix proxy-routed behavior engines allowing direct provider API hosts Keep proxy-routed provider APIs out of agent egress Nov 9, 2026
Copilot AI requested a review from gh-aw-bot November 9, 2026 19:14
@pelikhan
pelikhan marked this pull request as ready for review November 9, 2026 19:19
Copilot AI adaptive review requested due to automatic review settings November 9, 2026 19:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

An empty initial allowlist causes configured blocked domains to be omitted, allowing runtime network expansion to bypass explicit network restrictions.

3 open issues
What changed in this PR

This PR addresses #76218 by separating gateway-routed inference from direct agent egress in gh-aw’s firewall policy.

Changes:

  • Omit model-mapped provider hosts for universal LLM consumers while retaining declared defaults and explicit network, MCP, and runtime domains.
  • Add regression tests for provider restrictions, explicit opt-ins, and non-proxy compatibility; target integration assertions at emitted allowlists.
  • Regenerate 17 workflow lock files to remove implicit provider API allowances.
File Description
pkg/​workflow/​domains_package_registry_integration_test.go Inspect emitted firewall allowlists and update Aider expectations.
pkg/​workflow/​behavior_defined_engine.go Skip provider-domain mappings for universal consumers.
pkg/​workflow/​behavior_defined_engine_network_test.go Cover provider restrictions, opt-ins, and direct-engine compatibility.
pkg/​workflow/​aider_workflow_test.go Require explicit OpenAI host opt-in.
.github/​workflows/​smoke-pydantic.lock.yml Refresh Pydantic smoke allowlist.
.github/​workflows/​smoke-opencode.lock.yml Refresh OpenCode smoke allowlist.
.github/​workflows/​smoke-mini-swe-agent.lock.yml Refresh mini-SWE-agent smoke allowlist.
.github/​workflows/​smoke-goose.lock.yml Refresh Goose smoke allowlist.
.github/​workflows/​smoke-factory.lock.yml Refresh Factory smoke allowlist.
.github/​workflows/​smoke-deepseek-harness.lock.yml Refresh DeepSeek Harness smoke allowlist.
.github/​workflows/​smoke-crush.lock.yml Refresh Crush smoke allowlist.
.github/​workflows/​smoke-atomic.lock.yml Refresh Atomic smoke allowlist.
.github/​workflows/​smoke-aider.lock.yml Refresh Aider smoke allowlist.
.github/​workflows/​engine-conformance-opencode.lock.yml Refresh OpenCode conformance allowlist.
.github/​workflows/​engine-conformance-goose.lock.yml Refresh Goose conformance allowlist.
.github/​workflows/​engine-conformance-factory.lock.yml Refresh Factory conformance allowlist.
.github/​workflows/​engine-conformance-atomic.lock.yml Refresh Atomic conformance allowlist.
.github/​workflows/​daily-team-evolution-insights.lock.yml Remove implicit provider API allowance.
.github/​workflows/​daily-security-red-team.lock.yml Remove implicit provider API allowance.
.github/​workflows/​daily-go-test-stubs-aider.lock.yml Remove implicit provider API allowance.
.github/​workflows/​daily-code-debt-aider.lock.yml Remove implicit provider API allowance.

Review effort: Max (auto)

Comment on lines +793 to +795
if e.usesUniversalLLMConsumer() || (behavior.Execution != nil && behavior.Execution.ProviderEnvMode == behaviorProviderEnvModeUniversalLLMConsumer) {
// AWF-proxied inference uses its gateway target, not direct agent egress.
defaults = behavior.Network.Defaults
EngineConfig: &EngineConfig{ID: definition.Engine.ID, Version: definition.Engine.Version},
NetworkPermissions: &NetworkPermissions{Allowed: []string{}},
}
assert.NotContains(t, emittedAWFAllowedDomains(t, engine, data), host)
Comment on lines +793 to +795
if e.usesUniversalLLMConsumer() || (behavior.Execution != nil && behavior.Execution.ProviderEnvMode == behaviorProviderEnvModeUniversalLLMConsumer) {
// AWF-proxied inference uses its gateway target, not direct agent egress.
defaults = behavior.Network.Defaults
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "7febfb45fdedc560b1140d214b26234fe3c62ef9",
  "kind": "requested",
  "schema_version": "1",
  "state": "6a877247e67cff456e9f45619997e7e03ec1346abb01f8188150b3d7cebf7c3e",
  "work": [],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · haiku45 · ~10 AIC · ⌖ ~18 AIC · ⊞ 1.3K · ◷
Comment /souschef to run again

Copilot AI and others added 2 commits November 9, 2026 20:04
…-fix-direct-provider-api-hosts

# Conflicts:
#	pkg/workflow/domains_package_registry_integration_test.go

Co-authored-by: gh-aw-bot <[email protected]>

Copilot AI commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

Merged latest main in 4057a5c using make merge-main, resolved the integration-test conflict, and aligned new assertions with the PR’s proxy-egress policy in 5c11f40. Build, targeted tests, final validation, and all 365 workflow drift checks passed. Secret scans passed; CodeQL timed out. No workflows were dispatched.

@pelikhan
pelikhan merged commit 92ce754 into main Nov 9, 2026
47 checks passed
@pelikhan
pelikhan deleted the copilot/domains-audit-fix-direct-provider-api-hosts branch November 9, 2026 22:19
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.2

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[domains-audit] Proxy-routed behavior engines automatically allow direct provider API hosts

4 participants