Skip to content

Fix Codex threat detection job proxy setup#27974

Merged
pelikhan merged 6 commits intomainfrom
copilot/investigate-codex-detection-job-issue
Apr 23, 2026
Merged

Fix Codex threat detection job proxy setup#27974
pelikhan merged 6 commits intomainfrom
copilot/investigate-codex-detection-job-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

Summary

Fixes Codex detection job failures where the detection Execute Codex CLI step failed with unauthorized OpenAI API key errors while the main agent job succeeded.

Root cause

The detection job did not generate Codex MCP/proxy bootstrap when no MCP tools were configured, so Codex did not consistently use the AWF OpenAI proxy provider in detection runs.

Changes

  • Ensure MCP setup generation still runs for Codex + AWF firewall even when mcpTools is empty.
  • In threat detection generation, include Codex MCP setup before Codex execution so detection config includes the OpenAI proxy provider.
  • Avoid duplicate Download container images step generation for Codex detection jobs.
  • Improve diagnostic logging when Codex detection MCP setup generation fails.
  • Add regression tests for:
    • Codex detection including MCP setup/openai-proxy config.
    • Codex detection avoiding duplicate container image download steps.

Validation

  • go test -v -run 'TestCodexEngineWithOutputSteps|TestBuildDetectionEngineExecutionStepCodexIncludesMCPSetup|TestBuildDetectionJobStepsCodexAvoidsDuplicateContainerPullStep' ./pkg/workflow/
  • make fmt
  • make agent-finish (fails on pre-existing unrelated tests in this branch baseline):
    • TestCopilotDetectionDefaultModel (2 subtests)
    • TestWasmGolden_CompileFixtures (basic-copilot, with-imports)

🤖 Smoke CI scheduled run completed — https://github.com/github/gh-aw/actions/runs/24818278489

Generated by Smoke CI · ● 393.3K ·


Changeset

  • Type: patch
  • Description: Fixes Codex threat-detection workflow generation to include MCP setup/OpenAI proxy bootstrap and avoid duplicate container download steps in detection jobs.

Warning

⚠️ Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • ab.chatgpt.com
  • chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"
    - "chatgpt.com"

See Network Configuration for more information.

Generated by Changeset Generator for issue #27974 ·


🤖 Smoke CI scheduled run completed — https://github.com/github/gh-aw/actions/runs/24818464108

Generated by Smoke CI · ● 395.3K ·



✨ PR Review Safe Output Test - Run 24818321063

💥 [THE END] — Illustrated by Smoke Claude · ● 230.7K ·

Copilot AI and others added 4 commits April 23, 2026 04:57
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/381da048-e9d5-4055-9374-fd6f95b64ca2

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/381da048-e9d5-4055-9374-fd6f95b64ca2

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/381da048-e9d5-4055-9374-fd6f95b64ca2

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/381da048-e9d5-4055-9374-fd6f95b64ca2

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot recompile

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

🚀 Smoke OpenCode MISSION COMPLETE! OpenCode delivered. 🔥

@github-actions
Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

⚠️ Smoke Gemini failed. Gemini encountered unexpected challenges...

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

⚠️ Smoke Crush failed. Crush encountered unexpected challenges...

@github-actions github-actions Bot removed the smoke label Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Copy Markdown
Contributor

Agent Container Tool Check

Tool Status Version
bash 5.2.21
sh available
git 2.53.0
jq 1.7
yq 4.52.5
curl 8.5.0
gh 2.89.0
node 20.20.2
python3 3.12.3
go 1.24.13
java 10.0.201
dotnet NOT FOUND

Result: 11/12 tools available — FAIL (dotnet missing)

🔧 Tool validation by Agent Container Smoke Test · ● 113.9K ·

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 23, 2026

@copilot recompile

Ran make recompile on this branch; it completed cleanly and produced no diffs, so no new commit was needed. Current commit: ae9c973.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh repo view --json owner,name --jq .owner.login &#43; &#34;/&#34; &#43; .name /opt/hostedtoolcache/node/24.14.1/x64/bin/node &#34;prettier&#34; --chegit GOPROXY 64/bin/go node /tmp�� /home/REDACTED/work/gh-aw/gh-aw/.github/workflows/agent-performance-analyzer.md go ache/node/24.14.1/x64/bin/node -json GO111MODULE 64/bin/go ache/node/24.14.1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo rev-�� --show-toplevel go Name,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle -json GO111MODULE 64/bin/go git remo�� add origin /usr/bin/git ub/workflows GO111MODULE x_amd64/asm git (http block)
    • Triggering command: /usr/bin/gh gh repo view owner/repo -1 xterm-color go /opt/hostedtoolcache/node/24.14.1/x64/bin/node Gitcustom_branchgit Gitcustom_branchrev-parse 64/bin/go /opt/hostedtoolcache/node/24.14.1/x64/bin/node /tmp�� inputs.version go /usr/bin/git rity3903635790/0git GO111MODULE x_amd64/vet git (http block)
  • https://api.github.com/orgs/test-owner/actions/secrets
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name run lint:cjs 64/bin/go lk-memory gh-aw.wasm -o gh-aw.opt.wasm &amp;&amp; \ mv gh-aw.opt.wasm gh-aw.wasm; \ AFTER=$(wc -c &lt; g GOWORK run-script/lib/n-json sh -c &#34;prettier&#34; --cheGOINSECURE sh 64/bin/go &#34;prettier&#34; --wri/opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /orgs/test-owner/actions/secrets --jq .secrets[].name -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv -m l /usr/bin/git -json GO111MODULE 64/bin/go git remo�� remove origin /usr/bin/git ithout_min-integnode GO111MODULE 64/pkg/tool/linuinstall git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git 59/001/test-inligit GO111MODULE 1/x64/bin/npx git remo�� add origin /usr/bin/git mpiledOutput2526node GO111MODULE 64/pkg/tool/linuinstall git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v3
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv --show-toplevel sh /usr/bin/git &#34;prettier&#34; --che/usr/bin/git GOPROXY 64/bin/go git -C /tmp/gh-aw-test-runs/20260423-052314-26346/test-3014968803 rev-parse /usr/bin/git 01 -trimpath 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq [.object.sha, .object.type] | @tsv -aw/git/ref/tags/v2.0.0 go bject.type] | @tsv -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v5
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv ub/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel 64/pkg/tool/linux_amd64/compile /usr/bin/git 999 GO111MODULE ache/go/1.25.8/x: git rev-�� --show-toplevel go /usr/bin/infocmp DefaultBranchFrogit DefaultBranchFrorev-parse ache/go/1.25.8/x--show-toplevel infocmp (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq [.object.sha, .object.type] | @tsv --show-toplevel /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linuconfig /usr/bin/git runs/20260423-05git GOPROXY /usr/bin/git git 1/x6�� --show-toplevel l /usr/bin/git --bare --initial-branchrev-parse /usr/bin/git git (http block)
  • https://api.github.com/repos/actions/checkout/git/ref/tags/v6
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv 32433618/001 GOPROXY /opt/hostedtoolcache/node/24.14.1/x64/bin/node GOSUMDB GOWORK 64/bin/go node /tmp�� -aw/git/ref/tags/v2.0.0 sh bject.type] | @tsv npx prettier --cgit GOPROXY 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq [.object.sha, .object.type] | @tsv -test.paniconexit0 -test.v=true /opt/hostedtoolcache/node/24.14.1/x64/bin/node -test.timeout=10git -test.run=^Test -test.short=true--show-toplevel node /tmp�� /tmp/TestHashStability_SameInputSameOutput339142--detach go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v8
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git orts1734629756/0git GO111MODULE ache/go/1.25.8/x-m git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE /opt/hostedtoolc--show-toplevel git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git 2438-41905/test-git GO111MODULE /opt/hostedtoolc-m git rev-�� --git-dir resolved$ /usr/bin/git tformat GO111MODULE ache/node/24.14.--show-toplevel git (http block)
  • https://api.github.com/repos/actions/github-script/git/ref/tags/v9
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv GOSUMDB GOWORK 64/bin/go GOINSECURE GOMOD GOMODCACHE node /opt�� prettier --check 64/bin/go **/*.ts **/*.json --ignore-path /bin/sh (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv &#34;prettier&#34; --cheGOINSECURE sh 64/bin/go tierignore (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v9 --jq [.object.sha, .object.type] | @tsv --check scripts/**/*.js 64/bin/go -d s/github-workfl 64/bin/go go env d/gh-aw-wasm GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/actions/setup-go/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git conf�� --get remote.origin.urname,path,state /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE ache/go/1.25.8/x--show-toplevel git (http block)
  • https://api.github.com/repos/actions/setup-node/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv GOPATH GOPROXY 6667722/b471/vet.cfg GOSUMDB GOWORK 64/bin/go node /tmp�� /tmp/TestHashStability_SameInputSameOutput2971052522/001/stability-test.md sh /usr/bin/git npx prettier --c/usr/bin/git GOPROXY 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE h git (http block)
  • https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv log.showsignature=false log /usr/lib/git-core/git -n1 --format=format:rev-parse --end-of-options--show-toplevel /usr/lib/git-core/git --gi�� for-each-ref --format=%(objectname) /usr/bin/git nZV9/SuQo-jIBk0Sgit GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/actions/upload-artifact/git/ref/tags/v4 --jq [.object.sha, .object.type] | @tsv log.showsignature=false log ache/node/24.14.1/x64/bin/node --format=%H:%ct ../../../**/*.jsrev-parse 64/bin/go git t-40�� k/gh-aw/gh-aw/.github/workflows/api-consumption-report.md go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv --show-toplevel git $name) { hasDiscussionsEnabled } } --show-toplevel go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /usr/bin/git git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq [.object.sha, .object.type] | @tsv --show-toplevel node /usr/bin/git /home/REDACTED/worgit go /usr/bin/git git rev-�� --show-toplevel git /usr/bin/git --show-toplevel go /opt/hostedtoolcgraphql git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v0.1.2
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v0.1.2 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git -json GO111MODULE oFiles,IgnoredOt--get git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE ache/go/1.25.8/x--show-toplevel git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv runs/20260423-052314-26346/test-4007966548 -buildtags kflows/test-no-expires.lock.yml -errorsas -ifaceassert -nilfunc node /tmp�� /tmp/TestHashConsistency_GoAndJavaScript1335362457/001/test-inlined-imports-enabled-with-body-cogit -tests /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv /usr/bin/git go /usr/lib/git-core/git -json GO111MODULE 64/bin/go /usr/lib/git-core/git main�� run --auto /usr/bin/git --detach GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw-actions/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv GOPATH GOPROXY /usr/bin/git GOSUMDB GOWORK 64/bin/go git ls-r�� --symref origin /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw-actions/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv runs/20260423-052438-41905/test-1038386846 go kflows/test-expires.lock.yml -json GO111MODULE 64/bin/go /bin/sh -c git-upload-pack &#39;/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitcustom_branch3700177684/001&#39; git-upload-pack &#39;/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitcustom_branch3700177684/001&#39; /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/1/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name GO111MODULE /usr/bin/git GOINSECURE GOMOD GOMODCACHE git stat�� --porcelain GOPROXY /bin/sh GOSUMDB GOWORK 64/bin/go /bin/sh (http block)
    • Triggering command: /usr/bin/gh gh run download 1 --dir test-logs/run-1 GO111MODULE ache/node/24.14.1/x64/bin/node GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linu--jq t-34�� k/gh-aw/gh-aw/.github/workflows/agentic-observability-kit.md -importcfg /usr/lib/git-core/git -s -w -buildmode=exe /usr/lib/git-core/git (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/1/artifacts --jq .artifacts[].name scripts/**/*.js trepo.git .prettierignore git 64/bin/go /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -ato�� -bool -buildtags /opt/hostedtoolcache/node/24.14.1/x64/bin/node -errorsas -ifaceassert -nilfunc node (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12345/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name GO111MODULE At,event,headBranch,headSha,displayTitle l GOMOD GOMODCACHE go env runs/20260423-052314-26346/test-2027833066 GO111MODULE epo.git GOINSECURE GOMOD GOMODCACHE node (http block)
    • Triggering command: /usr/bin/gh gh run download 12345 --dir test-logs/run-12345 GO111MODULE /usr/bin/chmod GOINSECURE GOMOD GOMODCACHE chmod &#43;x actions/setup-cli/install.sh GOPROXY 1/x64/bin/node GOSUMDB GOWORK 64/bin/go 1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12345/artifacts --jq .artifacts[].name GOPROXY /usr/bin/git l GOWORK 64/bin/go git -c log.showsignature=false log /usr/bin/git -n1 --format=format:rev-parse --end-of-options--show-toplevel git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/12346/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name GO111MODULE /opt/hostedtoolcache/go/1.25.8/x64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE /opt/hostedtoolcache/node/24.14.1/x64/bin/node GOINSECURE GOMOD GOMODCACHE node (http block)
    • Triggering command: /usr/bin/gh gh run download 12346 --dir test-logs/run-12346 GO111MODULE /bin/sh GOINSECURE GOMOD GOMODCACHE /bin/sh -c echo &#34;Syncing install-gh-aw.sh to actions/setup-cli/install.sh...&#34; GOPROXY /usr/bin/git GOSUMDB GOWORK 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/12346/artifacts --jq .artifacts[].name GOPROXY 1/x64/bin/node ntent.md GOWORK run-script/lib/n--show-toplevel 1/x64/bin/node for-�� -aw/git/ref/tags/v1.0.0 --merged=ae9c973bcee59ce85fbe788f86c969e4f73924d5 bject.type] | @tsv -json GO111MODULE 64/bin/go /bin/sh (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/2/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name GO111MODULE /usr/bin/git GOINSECURE GOMOD GOMODCACHE git -c log.showsignature=false log /usr/lib/git-core/git-receive-pack --format=%H:%ct GOWORK 64/bin/go git-receive-pack (http block)
    • Triggering command: /usr/bin/gh gh run download 2 --dir test-logs/run-2 GO111MODULE /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/link -o /tmp/go-build3676667722/b404/cli.test l /usr/lib/git-core/git -s -w -buildmode=exe /usr/lib/git-core/git (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/2/artifacts --jq .artifacts[].name scripts/**/*.js /usr/bin/git .prettierignore pkg/agentdrain/arev-parse 64/bin/go git conf�� user.email test@example.com /opt/hostedtoolcache/node/24.14.1/x64/bin/node -json GO111MODULE 64/bin/go node (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/3/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name GO111MODULE /usr/bin/git ntent.md GOMOD GOMODCACHE git for-�� --format=%(refname) --merged=ae9c973bcee59ce85fbe788f86c969e4f73924d5 1/x64/bin/node GOSUMDB GOWORK 64/bin/go 1/x64/bin/node (http block)
    • Triggering command: /usr/bin/gh gh run download 3 --dir test-logs/run-3 GO111MODULE /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet l GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -ato�� -bool -buildtags /usr/lib/git-core/git -errorsas -ifaceassert -nilfunc /usr/lib/git-core/git (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/3/artifacts --jq .artifacts[].name l /usr/bin/git .prettierignore pkg/workflow/comrev-parse 64/bin/go git conf�� /test1.md /test2.lock.yml /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/4/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name GO111MODULE /usr/bin/git GOINSECURE GOMOD GOMODCACHE git -c log.showsignature=false log /usr/lib/git-core/git -n1 --format=format:rev-parse --end-of-options--show-toplevel /usr/lib/git-core/git (http block)
    • Triggering command: /usr/bin/gh gh run download 4 --dir test-logs/run-4 GO111MODULE /tmp/go-build3676667722/b410/console.test GOINSECURE GOMOD GOMODCACHE /tmp/go-build3676667722/b410/console.test -tes�� -test.paniconexit0 -test.v=true /usr/lib/git-core/git -test.timeout=10git -test.run=^Test -test.short=true--show-toplevel /usr/lib/git-core/git (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/4/artifacts --jq .artifacts[].name scripts/**/*.js /usr/bin/git .prettierignore pkg/workflow/toorev-parse 64/bin/go git rev-�� --show-toplevel go /opt/hostedtoolcache/node/24.14.1/x64/bin/node -json GO111MODULE 64/bin/go node (http block)
  • https://api.github.com/repos/github/gh-aw/actions/runs/5/artifacts
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name GO111MODULE /usr/bin/git l GOMOD GOMODCACHE git conf�� extensions.objectformat GOPROXY /usr/lib/git-core/git GOSUMDB GOWORK 64/bin/go /usr/lib/git-core/git (http block)
    • Triggering command: /usr/bin/gh gh run download 5 --dir test-logs/run-5 GO111MODULE /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet GOINSECURE GOMOD GOMODCACHE /opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet -ato�� runs/20260423-052314-26346/test-298996981/custom/workflows -buildtags /usr/lib/git-core/git -errorsas -ifaceassert -nilfunc /usr/lib/git-core/git (http block)
    • Triggering command: /usr/bin/gh gh api --paginate repos/{owner}/{repo}/actions/runs/5/artifacts --jq .artifacts[].name scripts/**/*.js /usr/bin/git .prettierignore git 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/github/gh-aw/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path run lint:cjs 64/bin/go GOSUMDB GOWORK 64/bin/go sh -c &#34;prettier&#34; --cheGOINSECURE sh 64/bin/go &#34;prettier&#34; --wri/opt/hostedtoolcache/go/1.25.8/x64/pkg/tool/linux_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 100 GOMOD GOMODCACHE go 6061�� -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh run list --json databaseId,number,url,status,conclusion,workflowName,createdAt,startedAt,updatedAt,event,headBranch,headSha,displayTitle --workflow nonexistent-workflow-12345 --limit 6 GOMOD GOMODCACHE go env runs/20260423-052314-26346/test-3927433488/.github/workflows GO111MODULE 1/x64/bin/node GOINSECURE GOMOD GOMODCACHE 1/x64/bin/node (http block)
  • https://api.github.com/repos/github/gh-aw/contents/.github/workflows/shared/reporting.md
    • Triggering command: /tmp/go-build3676667722/b404/cli.test /tmp/go-build3676667722/b404/cli.test -test.testlogfile=/tmp/go-build3676667722/b404/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE sh -c npx prettier --cGOINSECURE GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go sh (http block)
    • Triggering command: /tmp/go-build3255665999/b404/cli.test /tmp/go-build3255665999/b404/cli.test -test.testlogfile=/tmp/go-build3255665999/b404/testlog.txt -test.paniconexit0 -test.v=true -test.parallel=4 -test.timeout=10m0s -test.run=^Test -test.short=true GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v0.47.4
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v0.47.4 --jq [.object.sha, .object.type] | @tsv --show-toplevel go /usr/bin/git sRemoteWithRealGgit sRemoteWithRealGrev-parse ache/uv/0.11.7/x--show-toplevel git rev-�� --show-toplevel resolved$ (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv /tmp/go-build387GOSUMDB -trimpath 64/bin/go -p main -lang=go1.25 go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq [.object.sha, .object.type] | @tsv re GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD iles,SysoFiles,T--git-dir go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.2.3
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv tmatter-with-env-template-expressions.md GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ub/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.2.3 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ub/workflows GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v2.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ay_c2559150574/001 GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v2.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env 30305/001 GO111MODULE x_amd64/vet GOINSECURE GOMOD GOMODCACHE x_amd64/vet (http block)
  • https://api.github.com/repos/github/gh-aw/git/ref/tags/v3.0.0
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv Gitcustom_branch2606164980/001&#39; Gitcustom_branch2606164980/001&#39; 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v3.0.0 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env ub/workflows GO111MODULE 64/bin/go N files are not git GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go ynced successfulgit GOMOD GOMODCACHE go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq [.object.sha, .object.type] | @tsv re GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE odules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/sh GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/nonexistent/repo/actions/runs/12345
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion l -ifaceassert -nilfunc git-upload-pack /tmp�� -stringintconv -tests /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh run view 12345 --repo nonexistent/repo --json status,conclusion -errorsas -ifaceassert -nilfunc /bin/sh -c git-upload-pack &#39;/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitbranch_with_hyphen4106071915//usr/bin/git git-upload-pack &#39;/tmp/TestParseDefaultBranchFromLsRemoteWithRealGitbranch_with_hyphen4106071915/remote /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
  • https://api.github.com/repos/owner/repo/actions/workflows
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo 64/bin/go GOSUMDB GOWORK 64/bin/go sh -c &#34;prettier&#34; --cheGOINSECURE sh 64/bin/go tierignore (http block)
    • Triggering command: /usr/bin/gh gh workflow list --repo owner/repo --json name,path,state /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git ub/workflows GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh workflow list --json name,state,path --repo owner/repo modules/@npmcli/run-script/lib/node-gyp-bin/sh GOINSECURE GOMOD GOMODCACHE go env h ../../../.prettierignore GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/test-owner/test-repo/actions/secrets
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name -template-expressions.md GOPROXY 64/bin/go GOSUMDB GOWORK 64/bin/go sh -c &#34;prettier&#34; --cheGOINSECURE node 64/bin/go prettier --write 64/bin/go go (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test-owner/test-repo/actions/secrets --jq .secrets[].name with-tools.md GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go env -json GO111MODULE 64/bin/go GOINSECURE GOMOD GOMODCACHE go (http block)
  • https://api.github.com/repos/test/repo
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git rev-�� --show-toplevel go /usr/bin/git -json GO111MODULE 64/bin/go git (http block)
    • Triggering command: /usr/bin/gh gh api /repos/test/repo --jq .default_branch --show-toplevel PRodn75/CeR35fLGremote /opt/hostedtoolcache/node/24.14.1/x64/bin/node json&#39; --ignore-pgit GO111MODULE f0977b1ec39fe417--show-toplevel /opt/hostedtoolcache/node/24.14.1/x64/bin/node /tmp�� /ref/tags/v9 go sv -json GO111MODULE 64/bin/go git (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@github-actions
Copy link
Copy Markdown
Contributor

Commit pushed: 495969a

Generated by Changeset Generator

@github-actions
Copy link
Copy Markdown
Contributor

Smoke test (Codex) for run 24818321037
Merged PRs:

Warning

⚠️ Firewall blocked 2 domains

The following domains were blocked by the firewall during workflow execution:

  • ab.chatgpt.com
  • chatgpt.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "ab.chatgpt.com"
    - "chatgpt.com"

See Network Configuration for more information.

🔮 The oracle has spoken through Smoke Codex ·

@pelikhan pelikhan marked this pull request as ready for review April 23, 2026 05:29
Copilot AI review requested due to automatic review settings April 23, 2026 05:29
@pelikhan pelikhan merged commit ecf2924 into main Apr 23, 2026
26 of 28 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Smoke Test Results§24818321079

Test Status
GitHub MCP
MCP Scripts GH CLI
Serena CLI
Playwright CLI
Web Fetch
File Writing + Bash
Discussion Interaction
Build + Artifact Upload
Discussion Creation
Workflow Dispatch
PR Review
Comment Memory

Overall: ✅ PASS

@pelikhan, @Copilot — all smoke tests passed!

📰 BREAKING: Report filed by Smoke Copilot · ● 1.4M ·

@pelikhan pelikhan deleted the copilot/investigate-codex-detection-job-issue branch April 23, 2026 05:29
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Good regression tests added for Codex detection MCP setup. Two minor suggestions on test coverage completeness — see inline comments.

📰 BREAKING: Report filed by Smoke Copilot · ● 1.4M


stepsString := strings.Join(steps, "")
if !strings.Contains(stepsString, "Start MCP Gateway") {
t.Errorf("Expected Codex detection steps to include MCP setup, got:\n%s", stepsString)
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.

Good test coverage for the MCP setup inclusion! Consider also asserting that the model_provider appears before the Codex execution step to ensure ordering is correct.

steps := compiler.buildDetectionJobSteps(data)
stepsString := strings.Join(steps, "")

if count := strings.Count(stepsString, "name: Download container images"); count != 1 {
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.

The duplicate step check uses strings.Count which is good, but consider also verifying the step ordering — the Download container images step should appear after Install AWF binary for detection jobs.

@github-actions
Copy link
Copy Markdown
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Copy Markdown
Contributor

Smoke Test Results — Run 24818321063

Core (#1–12): ✅✅✅✅✅✅✅✅✅❌✅✅
PR Review (#13–19): ✅✅✅⚠️✅✅⚠️

Overall: PARTIAL — 16 passed, 1 failed (#10 agentic-workflows status MCP error), 2 skipped (#16 no threads, #19 no test PR)

💥 [THE END] — Illustrated by Smoke Claude · ● 230.7K ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

💥 Automated smoke test review - all systems nominal!

💥 [THE END] — Illustrated by Smoke Claude · ● 230.7K

run: npm install --ignore-scripts -g @openai/codex@0.121.0
- name: Install AWF binary
run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.28
- name: Download container images
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.

🔍 Smoke test review comment #1: The "Download container images" step has been correctly moved to after the AWF binary installation step in the detection job. This ensures proper bootstrap ordering — the MCP gateway image is now available before Codex initialization runs.

run: npm install --ignore-scripts -g @openai/codex@0.121.0
- name: Install AWF binary
run: bash "${RUNNER_TEMP}/gh-aw/actions/install_awf_binary.sh" v0.25.28
- name: Download container images
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.

🔍 Smoke test review comment #2: The new "Start MCP Gateway" step correctly initializes the gateway with CODEX_HOME=/tmp/gh-aw/mcp-config and generates the config.toml with model_provider = "openai-proxy" at root level before [shell_environment_policy]. This matches the fix from #27959.

@github-actions github-actions Bot mentioned this pull request Apr 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Test Quality Sentinel Report

Test Quality Score: 85/100

Excellent

Metric Value
New/modified tests analyzed 2
✅ Design tests (behavioral contracts) 2 (100%)
⚠️ Implementation tests (low value) 0 (0%)
Tests with error/edge cases 1 (50%)
Duplicate test clusters 0
Test inflation detected No (42 test lines / 39 production lines ≈ 1.08:1)
🚨 Coding-guideline violations None

Test Classification Details

Test File Classification Issues Detected
TestBuildDetectionEngineExecutionStepCodexIncludesMCPSetup pkg/workflow/threat_detection_test.go:709 ✅ Design None — verifies observable YAML output includes MCP setup strings
TestBuildDetectionJobStepsCodexAvoidsDuplicateContainerPullStep pkg/workflow/threat_detection_test.go:733 ✅ Design None — regression test for duplicate step bug

Test Analysis

Both new tests directly correspond to the bug fixed in this PR ("Fix Codex threat detection job proxy setup"):

TestBuildDetectionEngineExecutionStepCodexIncludesMCPSetup — Verifies that when AI: "codex" is set, the generated detection steps contain the MCP gateway start step and the openai-proxy model provider configuration. This is a strong behavioral contract test: if someone broke the Codex proxy setup, this would catch it immediately. All assertions include descriptive error messages with the generated output.

TestBuildDetectionJobStepsCodexAvoidsDuplicateContainerPullStep — Explicitly guards against a regression where a "Download container images" step would appear more than once. This is a targeted edge-case regression test covering the specific bug this PR fixes. Uses strings.Count to assert exactly 1 occurrence.

Minor Observation (non-blocking)

TestBuildDetectionEngineExecutionStepCodexIncludesMCPSetup only tests the happy path (valid Codex engine config). A complementary test for what happens when MCP setup is absent or disabled could improve coverage, but this is not required for the fix.


Language Support

Tests analyzed:

  • 🐹 Go (*_test.go): 2 tests — unit (//go:build !integration) ✅

Verdict

Check passed. 0% of new tests are implementation tests (threshold: 30%). Both tests enforce behavioral contracts aligned with the PR's fix. Build tag present. No mock libraries. All assertions include descriptive messages.


📖 Understanding Test Classifications

Design Tests (High Value) verify what the system does:

  • Assert on observable outputs, return values, or state changes
  • Cover error paths and boundary conditions
  • Would catch a behavioral regression if deleted
  • Remain valid even after internal refactoring

Implementation Tests (Low Value) verify how the system does it:

  • Assert on internal function calls (mocking internals)
  • Only test the happy path with typical inputs
  • Break during legitimate refactoring even when behavior is correct
  • Give false assurance: they pass even when the system is wrong

Goal: Shift toward tests that describe the system's behavioral contract — the promises it makes to its users and collaborators.


References: §24818559215

🧪 Test quality analysis by Test Quality Sentinel · ● 784.1K ·

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

✅ Test Quality Sentinel: 85/100. Test quality is excellent — 0% of new tests are implementation tests (threshold: 30%). Both new tests enforce behavioral contracts for the Codex proxy setup fix.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes Codex threat-detection workflow generation so detection jobs consistently bootstrap MCP/OpenAI-proxy configuration (avoiding unauthorized API key failures) and removes a duplicated container image download step.

Changes:

  • Ensure MCP setup generation runs for Codex + AWF even when mcpTools is empty (to include the openai-proxy model provider).
  • Prepend Codex detection execution with MCP setup (gateway/config bootstrap) and improve failure logging.
  • Avoid duplicate Download container images step generation for Codex detection jobs; add regression tests and refresh lockfiles.
Show a summary per file
File Description
pkg/workflow/threat_detection.go Skips the standalone AWF pre-pull step for Codex detection and injects MCP setup into Codex detection execution; adds helper to resolve effective detection engine ID.
pkg/workflow/mcp_setup_generator.go Allows MCP setup generation to proceed for Codex+AWF even with no MCP tools configured.
pkg/workflow/threat_detection_test.go Adds regression tests for Codex detection MCP setup inclusion and duplicate container download avoidance.
.github/workflows/smoke-codex.lock.yml Regenerated lockfile reflecting MCP setup in Codex detection and adjusted container download placement.
.github/workflows/smoke-call-workflow.lock.yml Same as above for this workflow’s detection job.
.github/workflows/schema-feature-coverage.lock.yml Same as above for this workflow’s detection job.
.github/workflows/issue-arborist.lock.yml Same as above for this workflow’s detection job.
.github/workflows/grumpy-reviewer.lock.yml Same as above for this workflow’s detection job.
.github/workflows/duplicate-code-detector.lock.yml Same as above for this workflow’s detection job.
.github/workflows/daily-observability-report.lock.yml Same as above for this workflow’s detection job.
.github/workflows/daily-fact.lock.yml Same as above for this workflow’s detection job.
.changeset/patch-fix-codex-threat-detection-proxy.md Adds a patch changeset describing the fix.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 12/12 changed files
  • Comments generated: 1

if err := c.generateMCPSetup(&mcpSetup, threatDetectionData.Tools, engine, threatDetectionData); err == nil {
for line := range strings.SplitSeq(mcpSetup.String(), "\n") {
if line != "" {
steps = append(steps, line+"\n")
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

In buildDetectionEngineExecutionStep, the MCP setup lines appended for Codex detection (Download container images / Start MCP Gateway / config writes) are not gated by detectionStepCondition. As a result, these steps will still run even when detection_guard.outputs.run_detection == 'false', defeating the guard and adding unnecessary work (and potential failure modes) to skipped detection runs. Consider injecting if: always() && steps.detection_guard.outputs.run_detection == 'true' into each generated MCP setup step (e.g., after each - name:), or extending generateMCPSetup to support an optional step-level if condition for the detection job path.

Suggested change
steps = append(steps, line+"\n")
steps = append(steps, line+"\n")
if strings.HasPrefix(strings.TrimSpace(line), "- name:") {
steps = append(steps, fmt.Sprintf(" if: %s\n", detectionStepCondition))
}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants