You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix threat detection AWF run missing --copilot-api-target and GHE domains on data residency (#21527)
* Initial plan
* Fix threat detection AWF run missing --copilot-api-target and GHE domains on data residency
When engine.api-target is configured for GHE Cloud with data residency,
propagate the APITarget from the main engine config to the detection
engine config so the threat detection AWF invocation receives the same
--copilot-api-target flag and GHE-specific domains in --allow-domains.
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Add GITHUB_COPILOT_BASE_URL env var support and fix integration test api-target
- Fix TestAPITargetDomainsInThreatDetectionStep to use api.contoso-aw.ghe.com
(copilot-api. prefix does not trigger base-domain derivation in GetAPITargetDomains)
- Add GetCopilotAPITarget() helper: resolves --copilot-api-target from engine.api-target
(explicit) or GITHUB_COPILOT_BASE_URL in engine.env (fallback), mirroring the
OPENAI_BASE_URL/ANTHROPIC_BASE_URL pattern for Codex/Claude
- Update awf_helpers.go, copilot_engine_execution.go, and domains.go to use the helper
- Add unit tests for GetCopilotAPITarget and engine execution step
- Add integration test TestGitHubCopilotBaseURLInCompiledWorkflow
- Update engines.md docs to document GITHUB_COPILOT_BASE_URL
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
* Update DefaultMCPGatewayVersion to v0.1.17 and regenerate golden/lock files (#21609)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
* fix: merge main to resolve failing build-wasm and test CI jobs (#21612)
* docs: add GH_HOST and RUNNER_TEMP to glossary (daily scan 2026-03-18) (#21553)
* docs: update GHES CLI docs and add Copilot GHES troubleshooting guide (#21528)
* Fix list height not updating on terminal resize (#21555)
* fix(daily-workflow-updater): unblock PR creation by setting protected-files: allowed (#21554)
* chore: bump MCP Gateway v0.1.15→v0.1.17 (#21552)
* feat: custom Huh theme mapped from pkg/styles Dracula palette (#21557)
* Add top-level `github-app` frontmatter as universal fallback for token minting (#21510)
* feat: add GitHub App-only permissions support (#21511)
* fix: fall back to existing remote tracking ref when incremental patch fetch fails (#21568)
* Add weekly blog post writer agentic workflow (#21575)
* ci: add timeout-minutes to all 25 jobs lacking explicit limits (#21601)
* fix: add setupGlobals in generate_aw_info step to fix staged mode ReferenceError (#21602)
* Disable lockdown mode for weekly blog post generator (#21598)
* fix: replace git push with GraphQL signed commits to satisfy required_signatures rulesets (#21576)
* docs: add weekly update blog post for 2026-03-18 (#21608)
Covers v0.58.0 through v0.61.0 (7 releases this week),
notable PRs, and auto-triage-issues as Agent of the Week.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix failing CI: merge main to include setupGlobals in generate_aw_info step and update golden files
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
Co-authored-by: Landon Cox <landon.cox@microsoft.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/src/content/docs/reference/engines.md
+19-3Lines changed: 19 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,9 +139,9 @@ The specified hostname must also be listed in `network.allowed` for the firewall
139
139
140
140
#### Custom API Endpoints via Environment Variables
141
141
142
-
Two environment variables receive special treatment when set in `engine.env`: `OPENAI_BASE_URL`(for `codex`) and `ANTHROPIC_BASE_URL` (for `claude`). When either is present, the AWF sandbox proxy automatically routes API calls to the specified host instead of the default `api.openai.com` or `api.anthropic.com`. Credential isolation and firewall enforcement remain active.
142
+
Three environment variables receive special treatment when set in `engine.env`: `OPENAI_BASE_URL`(for `codex`), `ANTHROPIC_BASE_URL` (for `claude`), and `GITHUB_COPILOT_BASE_URL` (for `copilot`). When any of these is present, the AWF sandbox proxy automatically routes API calls to the specified host instead of the default endpoint. Credential isolation and firewall enforcement remain active.
143
143
144
-
This enables workflows to use internal LLM routers, Azure OpenAI deployments, or other OpenAI-compatible endpoints without bypassing AWF's security model.
144
+
This enables workflows to use internal LLM routers, Azure OpenAI deployments, corporate Copilot proxies, or other compatible endpoints without bypassing AWF's security model.
145
145
146
146
```yaml wrap
147
147
engine:
@@ -172,7 +172,23 @@ network:
172
172
- anthropic-proxy.internal.example.com
173
173
```
174
174
175
-
The custom hostname is extracted from the URL and passed to the AWF `--openai-api-target` or `--anthropic-api-target` flag automatically at compile time. No additional configuration is required.
175
+
For Copilot workflows routed through a custom Copilot-compatible endpoint (e.g., a corporate proxy or a GHE Cloud data residency instance):
`GITHUB_COPILOT_BASE_URL`is used as a fallback when `engine.api-target` is not explicitly set. If both are configured, `engine.api-target` takes precedence.
190
+
191
+
The custom hostname is extracted from the URL and passed to the AWF `--openai-api-target`, `--anthropic-api-target`, or `--copilot-api-target` flag automatically at compile time. No additional configuration is required.
t.Errorf("Expected --copilot-api-target to appear in both the main agent and threat detection AWF invocations (at least 2 times), but found %d occurrence(s).", apiTargetCount)
787
+
}
788
+
789
+
// Find all --allow-domains occurrences and verify each contains the GHE domains.
790
+
// api.contoso-aw.ghe.com triggers base-domain derivation, so both the API domain
791
+
// and the base domain (contoso-aw.ghe.com) must appear in each AWF invocation.
0 commit comments