Repository navigation
Harden OpenAI WIF version, detection, and egress handling - #76427
Conversation
Co-authored-by: pelikhan <[email protected]>
|
Category: bug | Risk: high | Score: 68/100 (impact 35 + urgency 20 + quality 13) | Recommended action: fast_track | Notes: hardens OpenAI WIF version, detection, and egress logic; high-risk auth/runtime behavior and the most urgent patch in this batch.
|
1 similar comment
|
Category: bug | Risk: high | Score: 68/100 (impact 35 + urgency 20 + quality 13) | Recommended action: fast_track | Notes: hardens OpenAI WIF version, detection, and egress logic; high-risk auth/runtime behavior and the most urgent patch in this batch.
|
|
Category: bug | Risk: high | Score: 68/100 (impact 35 + urgency 20 + quality 13) | Recommended action: fast_track | Notes: hardens OpenAI WIF version, detection, and egress logic; high-risk auth/runtime behavior.
|
1 similar comment
|
Category: bug | Risk: high | Score: 68/100 (impact 35 + urgency 20 + quality 13) | Recommended action: fast_track | Notes: hardens OpenAI WIF version, detection, and egress logic; high-risk auth/runtime behavior.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ Ponytail Reviewer completed successfully!
|
This comment has been minimized.
This comment has been minimized.
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
What this change does: It checks that OpenAI WIF uses a supported firewall and proxy version, preserves detector token permissions, and narrows network access. It also documents the separate eval authentication path.
Should fix:
-
Reuse the image tag parser
- What this is: The validator extracts the tag from a proxy image reference.
- Problem:
imageReferenceTaginpkg/workflow/model_routing.goalready handles the same references. - Fix: Call that helper and delete
awfImageTag. - If we skip it: Two parsers must be maintained for the same image format.
Checked the changed lines and connected code, assuming normal compilation of individual workflows.
Verdict: Ship.
Lean: -9 lines possible.
Generated by ✂️ Ponytail Reviewer for #76427 · codex · routed: gpt61 medium · ~6 AIC · ⌖ ~1 AIC · ⊞ 181
Comment /ponytail to run again
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (>100 new lines) but does not have a linked Architecture Decision Record (ADR). 📄 Draft ADR committed:
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. 🔍 Gate evidence
📋 Michael Nygard ADR Format ReferenceAn ADR must contain four sections to be considered complete: Context, Decision, Alternatives Considered, and Consequences. ADRs live in
|
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Found three correctness/security issues in the OpenAI WIF hardening changes.
Highlights
- Raw AWF_AUTH_TYPE in engine.env now grants id-token: write without structured auth validation.
- latest bypasses the explicit AWF support-version gate.
- Generated model-routing API-proxy images can produce a misleading user-override error.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~5 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /tdd and /improve-codebase-architecture (selected by pr-triage). Requesting changes: the new AWF version floor can be bypassed in two ways.
📋 Key Themes & Highlights
Key Themes
- Version floor is not enforced: shorthand image tags (
v1,1.2) andversion: latestboth pass the gate. I confirmed both with probe tests. - Untested env-only WIF path:
AWF_AUTH_TYPEset viaengine.envdrives both the version gate and the detection-jobid-tokengrant, with no test coverage. - Duplicate helper:
awfImageTagrepeatsimageReferenceTagfrommodel_routing.go.
Positive Highlights
- ✅ Targeted tests pass on the PR head (
pkg/constantsandpkg/workflowOpenAI WIF and detection suites). - ✅ The
auth.openai.comallowlist removal is consistent across the Codex engine and detector paths, and the docs and ADR are updated to match. - ✅ The detector clones the engine config, so the
id-tokenfix covers same-engine overrides.
Uncertainty
I could not verify from this repository that AWF v0.29.11 provides the proxy-side egress path for auth.openai.com that the PR relies on. Please confirm this against the AWF release.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~10 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
There was a problem hiding this comment.
🟡 Changes recommended
The detector can receive id-token: write on AWF versions that expose OIDC request credentials, allowing a compromised agent to mint tokens for trusted cloud audiences.
3 open issues
What changed in this PR
Hardens OpenAI Workload Identity Federation (WIF) support in the workflow compiler and Codex threat detection, while narrowing agent network access.
Changes:
- Requires AWF
v0.29.11+and compatible version tags for custom API-proxy images. - Adds detector OIDC permission handling and removes automatic token-exchange host allowlisting.
- Expands regression coverage and documents that OpenAI evals still require API keys.
| File | Description |
|---|---|
pkg/workflow/threat_detection_job.go |
Handles detector OIDC permissions from effective environment settings. |
pkg/workflow/threat_detection_helpers.go |
Removes automatic detector access to the token-exchange host. |
pkg/workflow/threat_detection_firewall_test.go |
Checks that WIF does not add token-host egress. |
pkg/workflow/compiler_validators.go |
Adds AWF and API-proxy version validation for WIF. |
pkg/workflow/codex_engine.go |
Removes automatic Codex token-host allowlisting. |
pkg/workflow/codex_azure_oidc_test.go |
Expands version, image, egress, and detector-permission coverage. |
pkg/constants/version_constants.go |
Defines the minimum AWF version for OpenAI WIF. |
pkg/constants/version_constants_test.go |
Verifies the new minimum-version constant. |
docs/src/content/docs/reference/auth.mdx |
Documents version requirements and proxy-owned token exchange. |
docs/src/content/docs/experimental/experiments.md |
Clarifies the separate authentication requirements for evals. |
.changeset/openai-wif-follow-up.md |
Records the hardening changes for release. |
Review effort: Max (auto)
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "228d4a177c216bda61dfa37baff8ce5fee8eaa79",
"kind": "requested",
"schema_version": "1",
"state": "764a21b6e9ea0b05ccd2914dde265702e02121c0595a0073a032fa3117762c60",
"work": [
"1cc1c09c4c4f801b86421c51d7445c15f6dba621ee007c62814855c5f7d354a3",
"244fce5123e525f9da627a21c2671a87318f6a2ee5417c7a7cafc5806f97cade",
"47c8b891f85f8bd31dc255634968adc1ac858c1c84126511eae23fe6a9320326",
"52b2fa38c6e74d0b3c7670bea3f13f85a63b0c54c70a55aad4d144121cb858cd",
"548e5e6d1bcd16186da3640befd18569cdd85b76284d5a2ea6418a0f197a44ba",
"9055270039e34152abc0704cec69d4e3b7e2b1c39f9349e192c50a502a891108",
"c0b8529af780846db9249006150b9c1411ce8bb6b531b23d976a90d3d4ff32ee",
"febea9f7fdce89add2b713156737011ef582aaeca9a80eba39914d9298f18f7c"
],
"workflow": "pr-sous-chef"
}
|
…llow-up Co-authored-by: gh-aw-bot <[email protected]>
Co-authored-by: gh-aw-bot <[email protected]>
Cover keyless setup, AWF version gates, proxy-owned token egress, detector auth inheritance, and evals authentication limits. Co-authored-by: Copilot App <[email protected]>
Resolve inherited and environment-based OpenAI WIF before checking detector proxy versions and generating keyless configuration. Require credential-exclusion support before granting detector OIDC permission. Co-authored-by: Copilot App <[email protected]>
|
🎉 This pull request is included in a new release. Release: |


OpenAI WIF requires a released AWF proxy with native support, and detector overrides could inherit OIDC configuration without the permission to mint a token. The change also narrows token-exchange egress and clarifies that evals use a separate authentication path.
v0.29.11+and, when overridden, an API-proxy image with a semantic-version tag ofv0.29.11+. The default AWF pin isv0.29.11.id-token: writewhen a same-engine detector override inherits OIDC auth.auth.openai.comto agent and detector allowlists; the proxy handles token exchange.engine.authWIF does not apply to evals. OpenAI evals still requireCODEX_API_KEYorOPENAI_API_KEY; eval-specific WIF support is not included.A live token-exchange trial is not included.