diff --git a/.github/workflows/ab-testing-advisor.lock.yml b/.github/workflows/ab-testing-advisor.lock.yml index 281d54b0995..ba58c88e4c3 100644 --- a/.github/workflows/ab-testing-advisor.lock.yml +++ b/.github/workflows/ab-testing-advisor.lock.yml @@ -1137,9 +1137,7 @@ jobs: GH_AW_MCP_CONFIG_9cae98a26c55dcdd_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/ace-editor.lock.yml b/.github/workflows/ace-editor.lock.yml index 1292807f65b..17ab33ea11e 100644 --- a/.github/workflows/ace-editor.lock.yml +++ b/.github/workflows/ace-editor.lock.yml @@ -1035,9 +1035,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/agentic-token-trend-audit.lock.yml b/.github/workflows/agentic-token-trend-audit.lock.yml index 1cf84743edf..b664fcb80a6 100644 --- a/.github/workflows/agentic-token-trend-audit.lock.yml +++ b/.github/workflows/agentic-token-trend-audit.lock.yml @@ -1173,9 +1173,7 @@ jobs: GH_AW_MCP_CONFIG_967c77fb0f47d7c8_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/api-consumption-report.lock.yml b/.github/workflows/api-consumption-report.lock.yml index f3e86c4c62d..612caabc8c8 100644 --- a/.github/workflows/api-consumption-report.lock.yml +++ b/.github/workflows/api-consumption-report.lock.yml @@ -1451,9 +1451,7 @@ jobs: GH_AW_MCP_CONFIG_967c77fb0f47d7c8_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/artifacts-summary.lock.yml b/.github/workflows/artifacts-summary.lock.yml index 0ed11a3640f..4a4be5342c4 100644 --- a/.github/workflows/artifacts-summary.lock.yml +++ b/.github/workflows/artifacts-summary.lock.yml @@ -1121,9 +1121,7 @@ jobs: GH_AW_MCP_CONFIG_e6cf51b684ae3e82_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/audit-workflows.lock.yml b/.github/workflows/audit-workflows.lock.yml index 6a49d0674c3..b33363f0532 100644 --- a/.github/workflows/audit-workflows.lock.yml +++ b/.github/workflows/audit-workflows.lock.yml @@ -1389,9 +1389,7 @@ jobs: GH_AW_MCP_CONFIG_967c77fb0f47d7c8_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/auto-triage-issues.lock.yml b/.github/workflows/auto-triage-issues.lock.yml index 2a60d04a2c9..520d1c12ff3 100644 --- a/.github/workflows/auto-triage-issues.lock.yml +++ b/.github/workflows/auto-triage-issues.lock.yml @@ -1197,9 +1197,7 @@ jobs: GH_AW_MCP_CONFIG_132cbc4653e22064_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/bot-detection.lock.yml b/.github/workflows/bot-detection.lock.yml index 72c4acdcdb4..62d699e8f99 100644 --- a/.github/workflows/bot-detection.lock.yml +++ b/.github/workflows/bot-detection.lock.yml @@ -1156,9 +1156,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/changeset.lock.yml b/.github/workflows/changeset.lock.yml index 70179f8a782..ad3c9c9a116 100644 --- a/.github/workflows/changeset.lock.yml +++ b/.github/workflows/changeset.lock.yml @@ -1170,9 +1170,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/chaos-pr-bundle-fuzzer.lock.yml b/.github/workflows/chaos-pr-bundle-fuzzer.lock.yml index cc9ef2a80b3..c093d47c28c 100644 --- a/.github/workflows/chaos-pr-bundle-fuzzer.lock.yml +++ b/.github/workflows/chaos-pr-bundle-fuzzer.lock.yml @@ -1121,9 +1121,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/cloclo.lock.yml b/.github/workflows/cloclo.lock.yml index 0c4576b012c..817fd693751 100644 --- a/.github/workflows/cloclo.lock.yml +++ b/.github/workflows/cloclo.lock.yml @@ -1469,9 +1469,7 @@ jobs: GH_AW_MCP_CONFIG_5989682917542506_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/codex-github-remote-mcp-test.lock.yml b/.github/workflows/codex-github-remote-mcp-test.lock.yml index 6f8e148dd8f..d7810e16c83 100644 --- a/.github/workflows/codex-github-remote-mcp-test.lock.yml +++ b/.github/workflows/codex-github-remote-mcp-test.lock.yml @@ -987,9 +987,7 @@ jobs: GH_AW_MCP_CONFIG_6129f527a4c069c5_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/commit-changes-analyzer.lock.yml b/.github/workflows/commit-changes-analyzer.lock.yml index e4c89e95c2c..b364c910216 100644 --- a/.github/workflows/commit-changes-analyzer.lock.yml +++ b/.github/workflows/commit-changes-analyzer.lock.yml @@ -1126,9 +1126,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/copilot-centralization-drilldown.lock.yml b/.github/workflows/copilot-centralization-drilldown.lock.yml index 5608eebbdd1..630e4fbf7fd 100644 --- a/.github/workflows/copilot-centralization-drilldown.lock.yml +++ b/.github/workflows/copilot-centralization-drilldown.lock.yml @@ -1073,9 +1073,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/copilot-centralization-optimizer.lock.yml b/.github/workflows/copilot-centralization-optimizer.lock.yml index b80e4548c81..f9a2f98e974 100644 --- a/.github/workflows/copilot-centralization-optimizer.lock.yml +++ b/.github/workflows/copilot-centralization-optimizer.lock.yml @@ -1251,9 +1251,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-architecture-diagram.lock.yml b/.github/workflows/daily-architecture-diagram.lock.yml index 50ab63fbd84..9b5c86df81b 100644 --- a/.github/workflows/daily-architecture-diagram.lock.yml +++ b/.github/workflows/daily-architecture-diagram.lock.yml @@ -1262,9 +1262,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-arxiv-researcher.lock.yml b/.github/workflows/daily-arxiv-researcher.lock.yml index 2f2440043d0..07e4876481e 100644 --- a/.github/workflows/daily-arxiv-researcher.lock.yml +++ b/.github/workflows/daily-arxiv-researcher.lock.yml @@ -1222,9 +1222,7 @@ jobs: GH_AW_MCP_CONFIG_75e8bd06ccf365bf_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-awf-spec-compiler-surfacing.lock.yml b/.github/workflows/daily-awf-spec-compiler-surfacing.lock.yml index fcb479d2eba..e48ac6649e9 100644 --- a/.github/workflows/daily-awf-spec-compiler-surfacing.lock.yml +++ b/.github/workflows/daily-awf-spec-compiler-surfacing.lock.yml @@ -1179,9 +1179,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-cache-strategy-analyzer.lock.yml b/.github/workflows/daily-cache-strategy-analyzer.lock.yml index 9b0169981c3..520947eee8a 100644 --- a/.github/workflows/daily-cache-strategy-analyzer.lock.yml +++ b/.github/workflows/daily-cache-strategy-analyzer.lock.yml @@ -1247,9 +1247,7 @@ jobs: GH_AW_MCP_CONFIG_36436acc36060ed1_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-cli-performance.lock.yml b/.github/workflows/daily-cli-performance.lock.yml index 66299cb7e9c..2afffd9f294 100644 --- a/.github/workflows/daily-cli-performance.lock.yml +++ b/.github/workflows/daily-cli-performance.lock.yml @@ -1417,9 +1417,7 @@ jobs: GH_AW_MCP_CONFIG_b6ce80ed4e9abf52_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-cli-tools-tester.lock.yml b/.github/workflows/daily-cli-tools-tester.lock.yml index 09400152e92..2aef074a522 100644 --- a/.github/workflows/daily-cli-tools-tester.lock.yml +++ b/.github/workflows/daily-cli-tools-tester.lock.yml @@ -1162,9 +1162,7 @@ jobs: GH_AW_MCP_CONFIG_a8a9fa4a313a0806_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-doc-updater.lock.yml b/.github/workflows/daily-doc-updater.lock.yml index 93bf5b5537c..496c769aed7 100644 --- a/.github/workflows/daily-doc-updater.lock.yml +++ b/.github/workflows/daily-doc-updater.lock.yml @@ -1201,9 +1201,7 @@ jobs: GH_AW_MCP_CONFIG_9db829e93420603c_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-documentation-diagram.lock.yml b/.github/workflows/daily-documentation-diagram.lock.yml index 74194cb9c07..e1c33e43f89 100644 --- a/.github/workflows/daily-documentation-diagram.lock.yml +++ b/.github/workflows/daily-documentation-diagram.lock.yml @@ -1166,9 +1166,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-evals-report.lock.yml b/.github/workflows/daily-evals-report.lock.yml index 081522639ab..0eb957dfdb2 100644 --- a/.github/workflows/daily-evals-report.lock.yml +++ b/.github/workflows/daily-evals-report.lock.yml @@ -1181,9 +1181,7 @@ jobs: GH_AW_MCP_CONFIG_746ef8c9b86b18e3_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-fact.lock.yml b/.github/workflows/daily-fact.lock.yml index d42a1dd7fbc..de6e6aa6b53 100644 --- a/.github/workflows/daily-fact.lock.yml +++ b/.github/workflows/daily-fact.lock.yml @@ -1216,9 +1216,7 @@ jobs: GH_AW_MCP_CONFIG_41e889f8e0d6bc8b_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-go-test-parallelizer.lock.yml b/.github/workflows/daily-go-test-parallelizer.lock.yml index bc88d5a5d06..ff460084ec3 100644 --- a/.github/workflows/daily-go-test-parallelizer.lock.yml +++ b/.github/workflows/daily-go-test-parallelizer.lock.yml @@ -1128,9 +1128,7 @@ jobs: GH_AW_MCP_CONFIG_fdd457604803de4e_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-max-ai-credits-test.lock.yml b/.github/workflows/daily-max-ai-credits-test.lock.yml index a0a09adaaf0..460fc66508b 100644 --- a/.github/workflows/daily-max-ai-credits-test.lock.yml +++ b/.github/workflows/daily-max-ai-credits-test.lock.yml @@ -999,9 +999,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-observability-report.lock.yml b/.github/workflows/daily-observability-report.lock.yml index 8eebcfce054..b03996478d8 100644 --- a/.github/workflows/daily-observability-report.lock.yml +++ b/.github/workflows/daily-observability-report.lock.yml @@ -1162,9 +1162,7 @@ jobs: GH_AW_MCP_CONFIG_a6fa3fdd8bc58a5e_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-regulatory.lock.yml b/.github/workflows/daily-regulatory.lock.yml index bfdb2849674..8bf79cfa3ff 100644 --- a/.github/workflows/daily-regulatory.lock.yml +++ b/.github/workflows/daily-regulatory.lock.yml @@ -1788,9 +1788,7 @@ jobs: GH_AW_MCP_CONFIG_26992a872e3d8595_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-semgrep-scan.lock.yml b/.github/workflows/daily-semgrep-scan.lock.yml index 6491ae14b22..778ee9ba7be 100644 --- a/.github/workflows/daily-semgrep-scan.lock.yml +++ b/.github/workflows/daily-semgrep-scan.lock.yml @@ -1119,9 +1119,7 @@ jobs: GH_AW_MCP_CONFIG_9884b0bf9f59ee47_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-spending-forecast.lock.yml b/.github/workflows/daily-spending-forecast.lock.yml index ac674f305a9..8bd30b6fe3e 100644 --- a/.github/workflows/daily-spending-forecast.lock.yml +++ b/.github/workflows/daily-spending-forecast.lock.yml @@ -1205,9 +1205,7 @@ jobs: GH_AW_MCP_CONFIG_967c77fb0f47d7c8_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-storify.lock.yml b/.github/workflows/daily-storify.lock.yml index 78fb175a829..4f58a205a68 100644 --- a/.github/workflows/daily-storify.lock.yml +++ b/.github/workflows/daily-storify.lock.yml @@ -1238,9 +1238,7 @@ jobs: GH_AW_MCP_CONFIG_cc48450800c9cffa_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-windows-defender-scan.lock.yml b/.github/workflows/daily-windows-defender-scan.lock.yml index 276c107b13b..47ad72bf83b 100644 --- a/.github/workflows/daily-windows-defender-scan.lock.yml +++ b/.github/workflows/daily-windows-defender-scan.lock.yml @@ -1144,9 +1144,7 @@ jobs: GH_AW_MCP_CONFIG_fdd457604803de4e_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-windows-terminal-integration-builder.lock.yml b/.github/workflows/daily-windows-terminal-integration-builder.lock.yml index d6c54fef5d9..a5b9de92995 100644 --- a/.github/workflows/daily-windows-terminal-integration-builder.lock.yml +++ b/.github/workflows/daily-windows-terminal-integration-builder.lock.yml @@ -1037,9 +1037,7 @@ jobs: GH_AW_MCP_CONFIG_fdd457604803de4e_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/dependabot-go-checker.lock.yml b/.github/workflows/dependabot-go-checker.lock.yml index 856283d48eb..e05d6ef3819 100644 --- a/.github/workflows/dependabot-go-checker.lock.yml +++ b/.github/workflows/dependabot-go-checker.lock.yml @@ -1174,9 +1174,7 @@ jobs: GH_AW_MCP_CONFIG_1d1fbb0c7348f122_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/designer-drift-audit.lock.yml b/.github/workflows/designer-drift-audit.lock.yml index 41b94bd42bd..c71a617c8e8 100644 --- a/.github/workflows/designer-drift-audit.lock.yml +++ b/.github/workflows/designer-drift-audit.lock.yml @@ -1038,9 +1038,7 @@ jobs: GH_AW_MCP_CONFIG_fdd457604803de4e_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/engine-conformance-codex.lock.yml b/.github/workflows/engine-conformance-codex.lock.yml index a1ab2a31979..59cd82d98df 100644 --- a/.github/workflows/engine-conformance-codex.lock.yml +++ b/.github/workflows/engine-conformance-codex.lock.yml @@ -1197,9 +1197,7 @@ jobs: GH_AW_MCP_CONFIG_c113865cfcc36824_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/eslint-monster.lock.yml b/.github/workflows/eslint-monster.lock.yml index e13fef4f191..0443881e819 100644 --- a/.github/workflows/eslint-monster.lock.yml +++ b/.github/workflows/eslint-monster.lock.yml @@ -1300,9 +1300,7 @@ jobs: GH_AW_MCP_CONFIG_533bd047e6c6f465_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/example-failure-category-filter.lock.yml b/.github/workflows/example-failure-category-filter.lock.yml index 076e4477b29..368a0050cd7 100644 --- a/.github/workflows/example-failure-category-filter.lock.yml +++ b/.github/workflows/example-failure-category-filter.lock.yml @@ -1045,9 +1045,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/example-permissions-warning.lock.yml b/.github/workflows/example-permissions-warning.lock.yml index 15953c626bb..86212e62776 100644 --- a/.github/workflows/example-permissions-warning.lock.yml +++ b/.github/workflows/example-permissions-warning.lock.yml @@ -980,9 +980,7 @@ jobs: GH_AW_MCP_CONFIG_b417a4ccd961c2db_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/feature-grower.lock.yml b/.github/workflows/feature-grower.lock.yml index 870c49cae13..2b2f30a8b4a 100644 --- a/.github/workflows/feature-grower.lock.yml +++ b/.github/workflows/feature-grower.lock.yml @@ -1093,9 +1093,7 @@ jobs: GH_AW_MCP_CONFIG_2888ef3954c769b7_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/front-page-copy-guard.lock.yml b/.github/workflows/front-page-copy-guard.lock.yml index a43f6fe4cc8..3c89e6da3c1 100644 --- a/.github/workflows/front-page-copy-guard.lock.yml +++ b/.github/workflows/front-page-copy-guard.lock.yml @@ -1064,9 +1064,7 @@ jobs: GH_AW_MCP_CONFIG_fdd457604803de4e_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/functional-pragmatist.lock.yml b/.github/workflows/functional-pragmatist.lock.yml index 63c4c856fb1..f3960aaae3e 100644 --- a/.github/workflows/functional-pragmatist.lock.yml +++ b/.github/workflows/functional-pragmatist.lock.yml @@ -1110,9 +1110,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/github-remote-mcp-auth-test.lock.yml b/.github/workflows/github-remote-mcp-auth-test.lock.yml index 74fab7af5a2..7fde74f3dec 100644 --- a/.github/workflows/github-remote-mcp-auth-test.lock.yml +++ b/.github/workflows/github-remote-mcp-auth-test.lock.yml @@ -1048,9 +1048,7 @@ jobs: GH_AW_MCP_CONFIG_6e44f8f1ca58755e_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/gpclean.lock.yml b/.github/workflows/gpclean.lock.yml index 20d70fa6040..e2a71bbcdc4 100644 --- a/.github/workflows/gpclean.lock.yml +++ b/.github/workflows/gpclean.lock.yml @@ -1148,9 +1148,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/grumpy-reviewer.lock.yml b/.github/workflows/grumpy-reviewer.lock.yml index e0ca7392677..90b536eb798 100644 --- a/.github/workflows/grumpy-reviewer.lock.yml +++ b/.github/workflows/grumpy-reviewer.lock.yml @@ -1217,9 +1217,7 @@ jobs: GH_AW_MCP_CONFIG_5adeb06f91fbdd91_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/issue-arborist.lock.yml b/.github/workflows/issue-arborist.lock.yml index 675a751078b..a2f97f52d4a 100644 --- a/.github/workflows/issue-arborist.lock.yml +++ b/.github/workflows/issue-arborist.lock.yml @@ -1228,9 +1228,7 @@ jobs: GH_AW_MCP_CONFIG_132cbc4653e22064_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/issue-triage-agent.lock.yml b/.github/workflows/issue-triage-agent.lock.yml index d2811b1c568..d2b6ea41e9f 100644 --- a/.github/workflows/issue-triage-agent.lock.yml +++ b/.github/workflows/issue-triage-agent.lock.yml @@ -1275,9 +1275,7 @@ jobs: GH_AW_MCP_CONFIG_b0620309dcd8ec61_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/lint-monster.lock.yml b/.github/workflows/lint-monster.lock.yml index a8f3b2b4487..3f6b2407dd8 100644 --- a/.github/workflows/lint-monster.lock.yml +++ b/.github/workflows/lint-monster.lock.yml @@ -1228,9 +1228,7 @@ jobs: GH_AW_MCP_CONFIG_41e889f8e0d6bc8b_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/metrics-collector.lock.yml b/.github/workflows/metrics-collector.lock.yml index b3ab5ba3d0e..453ef160b7e 100644 --- a/.github/workflows/metrics-collector.lock.yml +++ b/.github/workflows/metrics-collector.lock.yml @@ -1198,9 +1198,7 @@ jobs: GH_AW_MCP_CONFIG_967c77fb0f47d7c8_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/notion-issue-summary.lock.yml b/.github/workflows/notion-issue-summary.lock.yml index ebc2100a5a0..ed85e7362cb 100644 --- a/.github/workflows/notion-issue-summary.lock.yml +++ b/.github/workflows/notion-issue-summary.lock.yml @@ -990,9 +990,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/pdf-summary.lock.yml b/.github/workflows/pdf-summary.lock.yml index 30cfbe01eee..a80880ebe39 100644 --- a/.github/workflows/pdf-summary.lock.yml +++ b/.github/workflows/pdf-summary.lock.yml @@ -1212,9 +1212,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/poem-bot.lock.yml b/.github/workflows/poem-bot.lock.yml index 9f7c051bfbd..515557d17c0 100644 --- a/.github/workflows/poem-bot.lock.yml +++ b/.github/workflows/poem-bot.lock.yml @@ -1501,9 +1501,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/ponytail-reviewer.lock.yml b/.github/workflows/ponytail-reviewer.lock.yml index 9abf0eac41e..acefcc5c69c 100644 --- a/.github/workflows/ponytail-reviewer.lock.yml +++ b/.github/workflows/ponytail-reviewer.lock.yml @@ -1279,9 +1279,7 @@ jobs: GH_AW_MCP_CONFIG_fdd457604803de4e_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/purelock.lock.yml b/.github/workflows/purelock.lock.yml index 7d0f7f80b0f..c53555696fe 100644 --- a/.github/workflows/purelock.lock.yml +++ b/.github/workflows/purelock.lock.yml @@ -1275,9 +1275,7 @@ jobs: GH_AW_MCP_CONFIG_b55ea657731e041a_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/python-data-charts.lock.yml b/.github/workflows/python-data-charts.lock.yml index 58198667a9e..ab7ed467ede 100644 --- a/.github/workflows/python-data-charts.lock.yml +++ b/.github/workflows/python-data-charts.lock.yml @@ -1214,9 +1214,7 @@ jobs: GH_AW_MCP_CONFIG_967c77fb0f47d7c8_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/repo-audit-analyzer.lock.yml b/.github/workflows/repo-audit-analyzer.lock.yml index b9d5e45e428..c3ebb392844 100644 --- a/.github/workflows/repo-audit-analyzer.lock.yml +++ b/.github/workflows/repo-audit-analyzer.lock.yml @@ -1104,9 +1104,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/schema-consistency-checker.lock.yml b/.github/workflows/schema-consistency-checker.lock.yml index 54effc68e4c..36ae19e612a 100644 --- a/.github/workflows/schema-consistency-checker.lock.yml +++ b/.github/workflows/schema-consistency-checker.lock.yml @@ -1100,9 +1100,7 @@ jobs: GH_AW_MCP_CONFIG_41e889f8e0d6bc8b_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/schema-feature-coverage.lock.yml b/.github/workflows/schema-feature-coverage.lock.yml index 8724580ffcb..7b1591d3ffb 100644 --- a/.github/workflows/schema-feature-coverage.lock.yml +++ b/.github/workflows/schema-feature-coverage.lock.yml @@ -1095,9 +1095,7 @@ jobs: GH_AW_MCP_CONFIG_e08337b93342067c_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/security-review.lock.yml b/.github/workflows/security-review.lock.yml index 012def7ff04..202f8e7b1ac 100644 --- a/.github/workflows/security-review.lock.yml +++ b/.github/workflows/security-review.lock.yml @@ -1499,9 +1499,7 @@ jobs: GH_AW_MCP_CONFIG_67f892398768d358_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/sighthound-security-scan.lock.yml b/.github/workflows/sighthound-security-scan.lock.yml index 0bcc950d8b8..bdfaee72cf4 100644 --- a/.github/workflows/sighthound-security-scan.lock.yml +++ b/.github/workflows/sighthound-security-scan.lock.yml @@ -1180,9 +1180,7 @@ jobs: GH_AW_MCP_CONFIG_b6ce80ed4e9abf52_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/skillet.lock.yml b/.github/workflows/skillet.lock.yml index 9e7b3f4eddd..bcbc9ee8018 100644 --- a/.github/workflows/skillet.lock.yml +++ b/.github/workflows/skillet.lock.yml @@ -1216,9 +1216,7 @@ jobs: GH_AW_MCP_CONFIG_fdd457604803de4e_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/smoke-azure-codex.lock.yml b/.github/workflows/smoke-azure-codex.lock.yml index ef8ca99a3ef..caad80c11ea 100644 --- a/.github/workflows/smoke-azure-codex.lock.yml +++ b/.github/workflows/smoke-azure-codex.lock.yml @@ -905,9 +905,7 @@ jobs: GH_AW_MCP_CONFIG_a7b051a7b6fe948c_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/smoke-call-workflow.lock.yml b/.github/workflows/smoke-call-workflow.lock.yml index b6ae81348be..13a93a23293 100644 --- a/.github/workflows/smoke-call-workflow.lock.yml +++ b/.github/workflows/smoke-call-workflow.lock.yml @@ -1137,9 +1137,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true @@ -2235,9 +2233,7 @@ jobs: GH_AW_MCP_CONFIG_a67ed8e9718085f9_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Execute Codex CLI if: always() && steps.detection_guard.outputs.run_detection == 'true' && steps.detection_setup.outcome == 'success' && steps.detection_setup.outputs.ready == 'true' continue-on-error: true diff --git a/.github/workflows/smoke-ci.lock.yml b/.github/workflows/smoke-ci.lock.yml index 5862944b3cc..92ab90deb4c 100644 --- a/.github/workflows/smoke-ci.lock.yml +++ b/.github/workflows/smoke-ci.lock.yml @@ -1400,9 +1400,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/smoke-codex-auto.lock.yml b/.github/workflows/smoke-codex-auto.lock.yml index 7640c1aaad5..6718ce4399a 100644 --- a/.github/workflows/smoke-codex-auto.lock.yml +++ b/.github/workflows/smoke-codex-auto.lock.yml @@ -902,9 +902,7 @@ jobs: GH_AW_MCP_CONFIG_a7b051a7b6fe948c_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/smoke-codex-bare-auto.lock.yml b/.github/workflows/smoke-codex-bare-auto.lock.yml index 3e7d0fef6d7..72751f72b84 100644 --- a/.github/workflows/smoke-codex-bare-auto.lock.yml +++ b/.github/workflows/smoke-codex-bare-auto.lock.yml @@ -902,9 +902,7 @@ jobs: GH_AW_MCP_CONFIG_a7b051a7b6fe948c_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/smoke-codex-routed-openai.lock.yml b/.github/workflows/smoke-codex-routed-openai.lock.yml index dea1d630c0d..83c46f86134 100644 --- a/.github/workflows/smoke-codex-routed-openai.lock.yml +++ b/.github/workflows/smoke-codex-routed-openai.lock.yml @@ -989,9 +989,7 @@ jobs: GH_AW_MCP_CONFIG_a7b051a7b6fe948c_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true @@ -2019,9 +2017,7 @@ jobs: GH_AW_MCP_CONFIG_a67ed8e9718085f9_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Execute Codex CLI if: always() && steps.detection_guard.outputs.run_detection == 'true' && steps.detection_setup.outcome == 'success' && steps.detection_setup.outputs.ready == 'true' continue-on-error: true diff --git a/.github/workflows/smoke-codex-routed.lock.yml b/.github/workflows/smoke-codex-routed.lock.yml index 0518a34b4c6..d6982b36049 100644 --- a/.github/workflows/smoke-codex-routed.lock.yml +++ b/.github/workflows/smoke-codex-routed.lock.yml @@ -981,9 +981,7 @@ jobs: GH_AW_MCP_CONFIG_a7b051a7b6fe948c_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/smoke-codex.lock.yml b/.github/workflows/smoke-codex.lock.yml index 0c3a9776f5d..2c297e5103f 100644 --- a/.github/workflows/smoke-codex.lock.yml +++ b/.github/workflows/smoke-codex.lock.yml @@ -1546,9 +1546,7 @@ jobs: GH_AW_MCP_CONFIG_45a625f1423f7cdf_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true @@ -2734,9 +2732,7 @@ jobs: GH_AW_MCP_CONFIG_a67ed8e9718085f9_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Execute Codex CLI if: always() && steps.detection_guard.outputs.run_detection == 'true' && steps.detection_setup.outcome == 'success' && steps.detection_setup.outputs.ready == 'true' continue-on-error: true diff --git a/.github/workflows/smoke-drive.lock.yml b/.github/workflows/smoke-drive.lock.yml index 42c62dff735..a20ae42ae41 100644 --- a/.github/workflows/smoke-drive.lock.yml +++ b/.github/workflows/smoke-drive.lock.yml @@ -1252,9 +1252,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true @@ -2366,9 +2364,7 @@ jobs: GH_AW_MCP_CONFIG_a67ed8e9718085f9_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Execute Codex CLI if: always() && steps.detection_guard.outputs.run_detection == 'true' && steps.detection_setup.outcome == 'success' && steps.detection_setup.outputs.ready == 'true' continue-on-error: true diff --git a/.github/workflows/smoke-github-codex.lock.yml b/.github/workflows/smoke-github-codex.lock.yml index 804bb88b56f..d8e0eb8c371 100644 --- a/.github/workflows/smoke-github-codex.lock.yml +++ b/.github/workflows/smoke-github-codex.lock.yml @@ -897,9 +897,7 @@ jobs: GH_AW_MCP_CONFIG_a7b051a7b6fe948c_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/smoke-otel-backends.lock.yml b/.github/workflows/smoke-otel-backends.lock.yml index 96e3cfed7a0..06b13d9efd2 100644 --- a/.github/workflows/smoke-otel-backends.lock.yml +++ b/.github/workflows/smoke-otel-backends.lock.yml @@ -1284,9 +1284,7 @@ jobs: GH_AW_MCP_CONFIG_90c372fb3f644ee6_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/spec-enforcer.lock.yml b/.github/workflows/spec-enforcer.lock.yml index ac12ec73039..177ab4da564 100644 --- a/.github/workflows/spec-enforcer.lock.yml +++ b/.github/workflows/spec-enforcer.lock.yml @@ -1180,9 +1180,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/update-astro.lock.yml b/.github/workflows/update-astro.lock.yml index 08d9d0ab32c..5c35e3053d0 100644 --- a/.github/workflows/update-astro.lock.yml +++ b/.github/workflows/update-astro.lock.yml @@ -1142,9 +1142,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/windows-grower.lock.yml b/.github/workflows/windows-grower.lock.yml index 8e80a1bb7fd..77ab175ef3d 100644 --- a/.github/workflows/windows-grower.lock.yml +++ b/.github/workflows/windows-grower.lock.yml @@ -1100,9 +1100,7 @@ jobs: GH_AW_MCP_CONFIG_fdd457604803de4e_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/windows.lock.yml b/.github/workflows/windows.lock.yml index 2b5fe5abc7d..b33633e84ec 100644 --- a/.github/workflows/windows.lock.yml +++ b/.github/workflows/windows.lock.yml @@ -1189,9 +1189,7 @@ jobs: GH_AW_MCP_CONFIG_4a0cda65967400b4_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/workflow-normalizer.lock.yml b/.github/workflows/workflow-normalizer.lock.yml index e90c28f7bb4..afdc20a95e0 100644 --- a/.github/workflows/workflow-normalizer.lock.yml +++ b/.github/workflows/workflow-normalizer.lock.yml @@ -1159,9 +1159,7 @@ jobs: GH_AW_MCP_CONFIG_967c77fb0f47d7c8_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/actions/setup/js/bash_command_parser.test.cjs b/actions/setup/js/bash_command_parser.test.cjs index 85f964b2729..ffb805b1a11 100644 --- a/actions/setup/js/bash_command_parser.test.cjs +++ b/actions/setup/js/bash_command_parser.test.cjs @@ -377,17 +377,13 @@ describe("extractCommandNamesFromPipeline", () => { it("extracts all command names from multiline script with variables and control flow", () => { const cmd = `set -euo pipefail -CACHE_DIR='cache/gh-aw/cache-memory/compiler-quality' -ANALYSES_DIR="$CACHE_DIR/analyses" -mkdir -p "$ANALYSES_DIR" -FILES='compiler.go compiler_activation_jobs.go compiler_orchestrator.go compiler_jobs.go compiler_safe_outputs.go compiler_safe_outputs_config.go compiler_safe_outputs_job.go compiler_yaml.go compiler_yaml_main_job.go' -for f in $FILES; do git -C /home/runner/work/gh-aw/gh-aw log -1 --format='%H' -- "pkg/workflow/$f" | sed "s|^|$f |"; done -printf '---ROTATION---\n' -if [ -f "$CACHE_DIR/rotation.json" ]; then cat "$CACHE_DIR/rotation.json"; fi -printf '\n---HASHES---\n' -if [ -f "$CACHE_DIR/file-hashes.json" ]; then cat "$CACHE_DIR/file-hashes.json"; fi -printf '\n---FILES---\n' -for f in $FILES; do wc -l "/home/runner/work/gh-aw/gh-aw/pkg/workflow/$f"; done`; +WORK_DIR='/tmp/work' +mkdir -p "$WORK_DIR" +FILES='file1.txt file2.txt' +git log -1 --format='%H' -- file.txt | sed 's|^|file.txt |' +printf '%s\n' '---FILES---' +if [ -f "$WORK_DIR/result.json" ]; then cat "$WORK_DIR/result.json"; fi +for f in $FILES; do wc -l "$WORK_DIR/$f"; done`; expect(extractCommandNamesFromPipeline(cmd)).toEqual(["set", "mkdir", "git", "sed", "printf", "cat", "wc"]); }); diff --git a/actions/setup/js/codex_harness.cjs b/actions/setup/js/codex_harness.cjs index 99527d86fed..7971dc71d4f 100644 --- a/actions/setup/js/codex_harness.cjs +++ b/actions/setup/js/codex_harness.cjs @@ -35,7 +35,8 @@ const { iterateJsonl, JsonlParser } = require("./jsonl_helpers.cjs"); const { getErrorMessage } = require("./error_helpers.cjs"); const fs = require("fs"); -const { DEFAULT_MCP_CALL_WATCHDOG_MS, MCP_CALL_TRANSPORT_GRACE_MS } = require("./constants.cjs"); +const path = require("node:path"); +const { DEFAULT_MCP_CALL_WATCHDOG_MS, MCP_CALL_TRANSPORT_GRACE_MS, TMP_GH_AW_PATH } = require("./constants.cjs"); const { loadCompiledConfig, mergeConfig } = require("./codex_config.cjs"); const { parseJsonPrefix } = require("./parse_json_prefix.cjs"); const { runProcess, formatDuration, sleep, MIN_POST_RESULT_WATCHDOG_TIMEOUT_MS, DEFAULT_POST_RESULT_WATCHDOG_IDLE_TIMEOUT_MS, MAX_POST_RESULT_WATCHDOG_TIMEOUT_MS, resolvePostResultWatchdogIdleTimeoutMs } = require("./process_runner.cjs"); @@ -685,6 +686,50 @@ function reflectHasMatchingProviderEndpoint(reflectData, provider) { return endpoints.some(ep => matchingProviders.has(normalizeReflectProviderName(ep.provider))); } +function resolveSafeCodexConfigPath(codexConfigPath, managedRoot = TMP_GH_AW_PATH) { + try { + if (!path.isAbsolute(codexConfigPath) || path.resolve(codexConfigPath) !== codexConfigPath) return ""; + const lexicalRoot = path.resolve(managedRoot); + const relativePath = path.relative(lexicalRoot, codexConfigPath); + const isWithinRoot = relative => relative !== ".." && !relative.startsWith(`..${path.sep}`) && !path.isAbsolute(relative); + if (path.basename(codexConfigPath) !== "config.toml" || !isWithinRoot(relativePath)) return ""; + + const root = fs.realpathSync(lexicalRoot); + const expectedRoot = path.join(fs.realpathSync(path.dirname(lexicalRoot)), path.basename(lexicalRoot)); + if (root !== expectedRoot) return ""; + const resolvedPath = path.resolve(codexConfigPath); + let resolvedDirectory; + try { + resolvedDirectory = fs.realpathSync(path.dirname(resolvedPath)); + } catch (error) { + if (/** @type {NodeJS.ErrnoException} */ error.code === "ENOENT") return resolvedPath; + return ""; + } + const relativeDirectory = path.relative(root, resolvedDirectory); + if (!isWithinRoot(relativeDirectory)) return ""; + const canonicalPath = path.join(resolvedDirectory, path.basename(resolvedPath)); + let stat; + try { + stat = fs.lstatSync(canonicalPath); + } catch (error) { + if (/** @type {NodeJS.ErrnoException} */ error.code === "ENOENT") return canonicalPath; + return ""; + } + return stat.isFile() && !stat.isSymbolicLink() ? canonicalPath : ""; + } catch { + return ""; + } +} + +function resolveRuntimeCodexConfigPath(codexConfigPath) { + const managedPath = resolveSafeCodexConfigPath(codexConfigPath); + if (managedPath) return managedPath; + if (isDetectionPhase(process.env.GH_AW_PHASE) && process.env.RUNNER_TEMP) { + return resolveSafeCodexConfigPath(codexConfigPath, path.join(process.env.RUNNER_TEMP, "gh-aw", "threat-detection")); + } + return ""; +} + /** * Validate that Codex openai-proxy base_url matches the configured provider endpoint from /reflect. * @param {{ @@ -697,10 +742,12 @@ function reflectHasMatchingProviderEndpoint(reflectData, provider) { */ function validateCodexOpenAIBaseURLFromReflect(options) { const readFileSync = (options && options.readFileSync) || fs.readFileSync; - const codexConfigPath = options && options.codexConfigPath; + const requestedConfigPath = options && options.codexConfigPath; + const codexConfigPath = requestedConfigPath ? resolveRuntimeCodexConfigPath(requestedConfigPath) : ""; const reflectPath = options && options.reflectPath; const provider = normalizeReflectProviderName(options?.provider || "openai", "openai"); - if (!codexConfigPath || !reflectPath) return { ok: true }; + if (!requestedConfigPath || !reflectPath) return { ok: true }; + if (!codexConfigPath) return { ok: false, reason: "Codex config path is outside a managed temporary directory" }; let tomlContent; let reflectContent; @@ -747,10 +794,16 @@ function validateCodexOpenAIBaseURLFromReflect(options) { */ function configureCodexProviderFromReflect(options) { const env = { ...process.env }; - const codexConfigPath = options && options.codexConfigPath; + const requestedConfigPath = options && options.codexConfigPath; + let codexConfigPath = requestedConfigPath || ""; const reflectPath = (options && options.reflectPath) || AWF_REFLECT_OUTPUT_PATH; const provider = normalizeReflectProviderName(options?.provider || process.env.GH_AW_LLM_PROVIDER, "openai"); if (!reflectPath) return { env, configured: false }; + if (codexConfigPath) codexConfigPath = resolveRuntimeCodexConfigPath(codexConfigPath); + if (requestedConfigPath && !codexConfigPath) { + log("warning: refusing to update Codex config outside the managed temporary directory"); + return { env, configured: false }; + } try { const reflectData = options?.reflectData || JSON.parse(fs.readFileSync(reflectPath, "utf8")); const resolved = resolveProviderEndpointFromReflect({ provider, reflectData, logger: log }); @@ -1396,6 +1449,7 @@ if (typeof module !== "undefined" && module.exports) { emitMissingToolPermissionIssue, buildCodexChildEnv, resolveCodexConfiguredModel, + resolveSafeCodexConfigPath, hasCodexAzureOIDCProxy, extractPortFromURL, extractOpenAIProxyBaseURLFromToml, diff --git a/actions/setup/js/codex_harness.test.cjs b/actions/setup/js/codex_harness.test.cjs index 4da1315e791..eefc77d49b8 100644 --- a/actions/setup/js/codex_harness.test.cjs +++ b/actions/setup/js/codex_harness.test.cjs @@ -27,6 +27,7 @@ const { buildMissingToolPermissionIssuePayload, buildCodexChildEnv, hasCodexAzureOIDCProxy, + resolveSafeCodexConfigPath, extractPortFromURL, extractOpenAIProxyBaseURLFromToml, getConfiguredProviderPortFromReflect, @@ -55,10 +56,18 @@ const { getCodexRoutingFailureCode, resolveCodexConfiguredModel, } = require("./codex_harness.cjs"); +const { TMP_GH_AW_PATH } = require("./constants.cjs"); const reflectFixtures = require("./fixtures/model_resolution_reflect.cjs"); const { detectNonRetryableHarnessGuard } = require("./harness_retry_guard.cjs"); -const agentTempDir = fs.mkdtempSync(path.join(os.tmpdir(), "codex-harness-tests-")); +let agentTempDir; +function makeHarnessTempDir(name) { + const parent = agentTempDir || TMP_GH_AW_PATH; + fs.mkdirSync(parent, { recursive: true }); + return fs.mkdtempSync(path.join(parent, name)); +} + +agentTempDir = makeHarnessTempDir("codex-harness-tests-"); afterAll(() => fs.rmSync(agentTempDir, { recursive: true, force: true })); const preloadPath = path.join(agentTempDir, "isolated-audit.cjs"); fs.writeFileSync( @@ -71,11 +80,6 @@ context.parseMaxAICreditsExceededFromAuditLog=()=>original(path.join(path.dirnam ` ); -function makeHarnessTempDir(name) { - fs.mkdirSync(agentTempDir, { recursive: true }); - return fs.mkdtempSync(path.join(agentTempDir, name)); -} - function spawnSync(command, args, options) { const env = { ...options.env, HOME: path.join(agentTempDir, "home"), AWF_REFLECT_ENABLED: options.env.AWF_REFLECT_ENABLED || "0" }; if (!env.CODEX_HOME || env.CODEX_HOME === process.env.CODEX_HOME) env.CODEX_HOME = path.join(agentTempDir, "codex-home"); @@ -1177,6 +1181,100 @@ fs.appendFileSync(process.env.GH_AW_SAFE_OUTPUTS, JSON.stringify(item) + "\\n"); fs.rmSync(tmpDir, { recursive: true, force: true }); } }); + + it("does not rewrite a Codex config outside the managed temporary directory", () => { + const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "codex-provider-outside-")); + const configPath = path.join(tmpDir, "config.toml"); + const reflectPath = path.join(tmpDir, "reflect.json"); + const originalConfig = '[model_providers.openai-proxy]\nbase_url = "http://172.30.0.30:10000"\n'; + fs.writeFileSync(configPath, originalConfig, "utf8"); + fs.writeFileSync(reflectPath, JSON.stringify({ endpoints: [{ provider: "openai", configured: true, port: 10000 }] }), "utf8"); + try { + const result = configureCodexProviderFromReflect({ codexConfigPath: configPath, reflectPath, provider: "openai" }); + expect(result.configured).toBe(false); + expect(fs.readFileSync(configPath, "utf8")).toBe(originalConfig); + } finally { + fs.rmSync(tmpDir, { recursive: true, force: true }); + } + }); + + it("does not rewrite a Codex config symlinked outside the managed temporary directory", () => { + const tmpDir = makeHarnessTempDir("codex-provider-symlink-"); + const outsideDir = fs.mkdtempSync(path.join(os.tmpdir(), "codex-provider-target-")); + const configPath = path.join(tmpDir, "config.toml"); + const outsideConfigPath = path.join(outsideDir, "config.toml"); + const reflectPath = path.join(tmpDir, "reflect.json"); + const originalConfig = '[model_providers.openai-proxy]\nbase_url = "http://172.30.0.30:10000"\n'; + fs.writeFileSync(outsideConfigPath, originalConfig, "utf8"); + fs.symlinkSync(outsideConfigPath, configPath); + fs.writeFileSync(reflectPath, JSON.stringify({ endpoints: [{ provider: "openai", configured: true, port: 10000 }] }), "utf8"); + try { + const result = configureCodexProviderFromReflect({ codexConfigPath: configPath, reflectPath, provider: "openai" }); + expect(result.configured).toBe(false); + expect(fs.readFileSync(outsideConfigPath, "utf8")).toBe(originalConfig); + } finally { + fs.rmSync(tmpDir, { recursive: true, force: true }); + fs.rmSync(outsideDir, { recursive: true, force: true }); + } + }); + + it("uses the canonical config path and supports a symlinked managed root", () => { + const tmpDir = makeHarnessTempDir("codex-provider-root-alias-"); + const realParent = path.join(tmpDir, "real-parent"); + const aliasParent = path.join(tmpDir, "alias-parent"); + const managedRoot = path.join(aliasParent, "managed-root"); + const realRoot = path.join(realParent, "managed-root"); + const configDir = path.join(realRoot, "codex-home"); + fs.mkdirSync(configDir, { recursive: true }); + fs.symlinkSync(realParent, aliasParent, "dir"); + const configPath = path.join(managedRoot, "codex-home", "config.toml"); + fs.writeFileSync(path.join(configDir, "config.toml"), '[model_providers.openai-proxy]\nbase_url = "http://172.30.0.30:10000"\n'); + + expect(resolveSafeCodexConfigPath(configPath, managedRoot)).toBe(path.join(configDir, "config.toml")); + }); + + it("rejects noncanonical paths containing symlink traversal", () => { + const tmpDir = makeHarnessTempDir("codex-provider-noncanonical-"); + const home = path.join(tmpDir, "codex-home"); + const outsideDir = fs.mkdtempSync(path.join(os.tmpdir(), "codex-provider-link-target-")); + fs.mkdirSync(home); + fs.mkdirSync(path.join(outsideDir, "child")); + fs.symlinkSync(path.join(outsideDir, "child"), path.join(home, "link")); + fs.writeFileSync(path.join(home, "config.toml"), "[model_providers.openai-proxy]\n"); + + expect(resolveSafeCodexConfigPath(`${home}/link/../config.toml`)).toBe(""); + fs.rmSync(outsideDir, { recursive: true, force: true }); + }); + + it("allows the staged ARC/DinD threat-detection Codex home", () => { + const runnerTemp = makeHarnessTempDir("codex-provider-arc-"); + const threatRoot = path.join(runnerTemp, "gh-aw", "threat-detection"); + const home = path.join(threatRoot, "codex-home"); + const configPath = path.join(home, "config.toml"); + const reflectPath = path.join(threatRoot, "reflect.json"); + fs.mkdirSync(home, { recursive: true }); + fs.writeFileSync(configPath, '[model_providers.openai-proxy]\nbase_url = "http://172.30.0.30:10000"\n'); + + const previousPhase = process.env.GH_AW_PHASE; + const previousRunnerTemp = process.env.RUNNER_TEMP; + process.env.GH_AW_PHASE = "detection"; + process.env.RUNNER_TEMP = runnerTemp; + try { + const result = configureCodexProviderFromReflect({ + codexConfigPath: configPath, + reflectPath, + provider: "openai", + reflectData: { endpoints: [{ provider: "openai", configured: true, port: 10000 }] }, + }); + expect(result.configured).toBe(true); + expect(fs.readFileSync(configPath, "utf8")).toContain('base_url = "http://api-proxy:10000"'); + } finally { + if (previousPhase === undefined) delete process.env.GH_AW_PHASE; + else process.env.GH_AW_PHASE = previousPhase; + if (previousRunnerTemp === undefined) delete process.env.RUNNER_TEMP; + else process.env.RUNNER_TEMP = previousRunnerTemp; + } + }); }); it("extracts openai-proxy base_url from TOML", () => { @@ -1225,15 +1323,14 @@ env_key = "OPENAI_API_KEY" { provider: "anthropic", port: 10001, configured: true }, ], }); - const files = { - "/tmp/codex-config.toml": toml, - "/tmp/awf-reflect.json": reflect, - }; - const readFileSync = filePath => files[filePath]; + const dir = makeHarnessTempDir("codex-provider-validation-"); + const configPath = path.join(dir, "config.toml"); + const reflectPath = path.join(dir, "awf-reflect.json"); + fs.writeFileSync(configPath, toml); + fs.writeFileSync(reflectPath, reflect); const result = validateCodexOpenAIBaseURLFromReflect({ - codexConfigPath: "/tmp/codex-config.toml", - reflectPath: "/tmp/awf-reflect.json", - readFileSync, + codexConfigPath: configPath, + reflectPath, }); expect(result.ok).toBe(false); expect(result.reason).toContain("mismatch"); @@ -1244,58 +1341,56 @@ env_key = "OPENAI_API_KEY" const reflect = JSON.stringify({ endpoints: [{ provider: "openai", port: 10000, configured: true }], }); - const files = { - "/tmp/codex-config.toml": toml, - "/tmp/awf-reflect.json": reflect, - }; - const readFileSync = filePath => files[filePath]; + const dir = makeHarnessTempDir("codex-provider-validation-"); + const configPath = path.join(dir, "config.toml"); + const reflectPath = path.join(dir, "awf-reflect.json"); + fs.writeFileSync(configPath, toml); + fs.writeFileSync(reflectPath, reflect); const result = validateCodexOpenAIBaseURLFromReflect({ - codexConfigPath: "/tmp/codex-config.toml", - reflectPath: "/tmp/awf-reflect.json", - readFileSync, + codexConfigPath: configPath, + reflectPath, }); expect(result.ok).toBe(true); }); it("validates against the selected GitHub provider", () => { - const files = { - "/tmp/codex-config.toml": `[model_providers.openai-proxy]\nbase_url = "http://api-proxy:10002"\n`, - "/tmp/awf-reflect.json": JSON.stringify({ endpoints: [{ provider: "copilot", port: 10002, configured: true }] }), - }; + const dir = makeHarnessTempDir("codex-provider-validation-"); + const configPath = path.join(dir, "config.toml"); + const reflectPath = path.join(dir, "awf-reflect.json"); + fs.writeFileSync(configPath, `[model_providers.openai-proxy]\nbase_url = "http://api-proxy:10002"\n`); + fs.writeFileSync(reflectPath, JSON.stringify({ endpoints: [{ provider: "copilot", port: 10002, configured: true }] })); const result = validateCodexOpenAIBaseURLFromReflect({ - codexConfigPath: "/tmp/codex-config.toml", - reflectPath: "/tmp/awf-reflect.json", + codexConfigPath: configPath, + reflectPath, provider: "github", - readFileSync: filePath => files[filePath], }); expect(result.ok).toBe(true); }); it("fails strictly when /reflect has configured endpoints but none for the selected provider", () => { - const files = { - "/tmp/codex-config.toml": `[model_providers.openai-proxy]\nbase_url = "http://172.30.0.30:10000"\n`, - "/tmp/awf-reflect.json": JSON.stringify({ endpoints: [{ provider: "anthropic", port: 10001, configured: true }] }), - }; + const dir = makeHarnessTempDir("codex-provider-validation-"); + const configPath = path.join(dir, "config.toml"); + const reflectPath = path.join(dir, "awf-reflect.json"); + fs.writeFileSync(configPath, `[model_providers.openai-proxy]\nbase_url = "http://172.30.0.30:10000"\n`); + fs.writeFileSync(reflectPath, JSON.stringify({ endpoints: [{ provider: "anthropic", port: 10001, configured: true }] })); const result = validateCodexOpenAIBaseURLFromReflect({ - codexConfigPath: "/tmp/codex-config.toml", - reflectPath: "/tmp/awf-reflect.json", + codexConfigPath: configPath, + reflectPath, provider: "github", - readFileSync: filePath => files[filePath], }); expect(result.ok).toBe(false); expect(result.reason).toContain("no configured endpoint for provider"); }); it("passes through when TOML lacks openai-proxy section", () => { - const files = { - "/tmp/codex-config.toml": `[history]\npersistence = "none"\n`, - "/tmp/awf-reflect.json": JSON.stringify({ endpoints: [{ provider: "openai", port: 10000, configured: true }] }), - }; - const readFileSync = filePath => files[filePath]; + const dir = makeHarnessTempDir("codex-provider-validation-"); + const configPath = path.join(dir, "config.toml"); + const reflectPath = path.join(dir, "awf-reflect.json"); + fs.writeFileSync(configPath, `[history]\npersistence = "none"\n`); + fs.writeFileSync(reflectPath, JSON.stringify({ endpoints: [{ provider: "openai", port: 10000, configured: true }] })); const result = validateCodexOpenAIBaseURLFromReflect({ - codexConfigPath: "/tmp/codex-config.toml", - reflectPath: "/tmp/awf-reflect.json", - readFileSync, + codexConfigPath: configPath, + reflectPath, }); expect(result.ok).toBe(true); }); diff --git a/actions/setup/js/convert_gateway_config_codex.cjs b/actions/setup/js/convert_gateway_config_codex.cjs index 1c572e40998..f29f0662344 100644 --- a/actions/setup/js/convert_gateway_config_codex.cjs +++ b/actions/setup/js/convert_gateway_config_codex.cjs @@ -26,6 +26,68 @@ const path = require("path"); const fs = require("fs"); const { runGatewayConversion, writeSecureOutput } = require("./convert_gateway_config_shared.cjs"); const { buildConfig, serializeConfig, tomlValue, loadCompiledConfig, mergeConfig, expandConfigEnv, isTable, directToolCatalog } = require("./codex_config.cjs"); +const { TMP_GH_AW_PATH } = require("./constants.cjs"); + +function isWithinRoot(relativePath) { + return relativePath !== ".." && !relativePath.startsWith(`..${path.sep}`) && !path.isAbsolute(relativePath); +} + +function writeCodexHomeFile(home, filename, content) { + if (!home || !path.isAbsolute(home) || path.resolve(home) !== home) { + throw new Error("CODEX_HOME must be a canonical absolute path"); + } + if (filename !== "config.toml" && filename !== "models.json") { + throw new Error("Unsupported Codex home output file"); + } + + const managedRoot = path.resolve(TMP_GH_AW_PATH); + const relativeHome = path.relative(managedRoot, home); + if (!isWithinRoot(relativeHome)) { + throw new Error("CODEX_HOME must be within the managed temporary directory"); + } + + fs.mkdirSync(managedRoot, { recursive: true }); + const realRoot = fs.realpathSync(managedRoot); + const expectedRoot = path.join(fs.realpathSync(path.dirname(managedRoot)), path.basename(managedRoot)); + if (realRoot !== expectedRoot) { + throw new Error("Managed temporary directory resolves outside its canonical parent"); + } + let realHome = realRoot; + for (const component of relativeHome.split(path.sep).filter(Boolean)) { + const next = path.join(realHome, component); + try { + const stat = fs.lstatSync(next); + if (!stat.isDirectory() || stat.isSymbolicLink()) { + throw new Error("CODEX_HOME contains a symlink or non-directory component"); + } + } catch (error) { + if (/** @type {NodeJS.ErrnoException} */ error.code !== "ENOENT") throw error; + fs.mkdirSync(next); + } + realHome = fs.realpathSync(next); + if (!isWithinRoot(path.relative(realRoot, realHome))) { + throw new Error("CODEX_HOME resolves outside the managed temporary directory"); + } + } + + const outputPath = path.join(realHome, filename); + try { + const stat = fs.lstatSync(outputPath); + if (!stat.isFile() || stat.isSymbolicLink()) { + throw new Error("Codex home output must be a regular, non-symlink file"); + } + } catch (error) { + if (/** @type {NodeJS.ErrnoException} */ error.code !== "ENOENT") throw error; + } + const flags = fs.constants.O_WRONLY | fs.constants.O_CREAT | fs.constants.O_TRUNC | fs.constants.O_NOFOLLOW; + const fd = fs.openSync(outputPath, flags, 0o600); + try { + fs.writeFileSync(fd, content); + fs.fchmodSync(fd, 0o600); + } finally { + fs.closeSync(fd); + } +} /** * @param {string} name @@ -53,10 +115,16 @@ function main() { // Avoid Node's UTF-8 pipe short-read overflow (nodejs/node#66341). const catalog = directToolCatalog(JSON.parse(fs.readFileSync(0).toString("utf8"))); const output = JSON.stringify(catalog); - writeSecureOutput(path.join(home, "models.json"), output); + writeCodexHomeFile(home, "models.json", output); return output; } const outputPath = path.join(process.env.RUNNER_TEMP || "/tmp", "gh-aw/mcp-config/config.toml"); + if (process.argv.includes("--copy-config")) { + const home = process.env.CODEX_HOME; + if (!home) throw new Error("CODEX_HOME is required to configure Codex"); + writeCodexHomeFile(home, "config.toml", fs.readFileSync(outputPath)); + return ""; + } if (process.argv.includes("--bootstrap")) { const compiled = loadCompiledConfig(); const overrides = expandConfigEnv(compiled.overrides); @@ -75,7 +143,7 @@ function main() { writeSecureOutput(outputPath, output); const home = process.env.CODEX_HOME; if (!home) throw new Error("CODEX_HOME is required to configure Codex"); - writeSecureOutput(path.join(home, "config.toml"), output); + writeCodexHomeFile(home, "config.toml", output); return output; } return runGatewayConversion({ diff --git a/actions/setup/js/convert_gateway_config_codex.test.cjs b/actions/setup/js/convert_gateway_config_codex.test.cjs index 4040cf42645..6d3b9bfd0b1 100644 --- a/actions/setup/js/convert_gateway_config_codex.test.cjs +++ b/actions/setup/js/convert_gateway_config_codex.test.cjs @@ -9,6 +9,7 @@ import { tmpdir } from "os"; const req = createRequire(import.meta.url); const { toCodexTomlSection, main } = req("./convert_gateway_config_codex.cjs"); +const { TMP_GH_AW_PATH } = req("./constants.cjs"); describe("convert_gateway_config_codex", () => { describe("toCodexTomlSection", () => { @@ -39,6 +40,8 @@ describe("convert_gateway_config_codex", () => { let tempDir; /** @type {string} */ let gatewayOutputFile; + /** @type {string} */ + let codexHome; /** @type {Record} */ let savedEnv; /** @type {string[]} */ @@ -47,6 +50,8 @@ describe("convert_gateway_config_codex", () => { beforeEach(() => { tempDir = mkdtempSync(join(tmpdir(), "codex-config-test-")); gatewayOutputFile = join(tempDir, "gateway-output.json"); + fs.mkdirSync(TMP_GH_AW_PATH, { recursive: true }); + codexHome = mkdtempSync(join(TMP_GH_AW_PATH, "codex-config-home-")); savedEnv = { CODEX_HOME: process.env.CODEX_HOME, @@ -75,6 +80,7 @@ describe("convert_gateway_config_codex", () => { } } rmSync(tempDir, { recursive: true, force: true }); + rmSync(codexHome, { recursive: true, force: true }); }); /** @@ -88,7 +94,7 @@ describe("convert_gateway_config_codex", () => { it("reads the direct-tool catalog as a Buffer before decoding UTF-8", () => { const catalog = { models: [{ slug: "fixture-model", tool_mode: "code_mode_only", instructions: "\u00e9".repeat(70000) }] }; const read = vi.spyOn(fs, "readFileSync").mockReturnValueOnce(Buffer.from(JSON.stringify(catalog))); - process.env.CODEX_HOME = join(tempDir, "codex-home"); + process.env.CODEX_HOME = codexHome; process.argv = [...process.argv, "--direct-tools"]; const output = main(); @@ -121,15 +127,48 @@ const timer = setInterval(() => { process.execPath, new URL("./convert_gateway_config_codex.cjs", import.meta.url).pathname, ], - { env: { ...process.env, CODEX_HOME: tempDir }, encoding: "utf8", timeout: 10000 } + { env: { ...process.env, CODEX_HOME: codexHome }, encoding: "utf8", timeout: 10000 } ); expect(result.error).toBeUndefined(); expect(result.status, result.stderr).toBe(0); - const catalog = JSON.parse(fs.readFileSync(join(tempDir, "models.json"), "utf8")); + const catalog = JSON.parse(fs.readFileSync(join(codexHome, "models.json"), "utf8")); expect(catalog.models).toEqual([{ slug: "fixture-model", tool_mode: "direct", instructions: "x".repeat(400000) }]); }); + it("copies generated config into the managed Codex home", () => { + const source = join(tempDir, "gh-aw", "mcp-config", "config.toml"); + fs.mkdirSync(join(tempDir, "gh-aw", "mcp-config"), { recursive: true }); + writeFileSync(source, 'model = "fixture-model"\n'); + process.env.CODEX_HOME = codexHome; + process.argv = [...process.argv, "--copy-config"]; + + main(); + + const copied = join(codexHome, "config.toml"); + expect(fs.readFileSync(copied, "utf8")).toBe('model = "fixture-model"\n'); + expect(fs.statSync(copied).mode & 0o777).toBe(0o600); + }); + + it("refuses to copy generated config through a symlinked Codex home", () => { + const source = join(tempDir, "gh-aw", "mcp-config", "config.toml"); + const outside = mkdtempSync(join(tmpdir(), "codex-config-outside-")); + const linkedHome = join(TMP_GH_AW_PATH, `codex-config-link-${process.pid}`); + fs.mkdirSync(join(tempDir, "gh-aw", "mcp-config"), { recursive: true }); + writeFileSync(source, 'model = "fixture-model"\n'); + fs.symlinkSync(outside, linkedHome, "dir"); + process.env.CODEX_HOME = linkedHome; + process.argv = [...process.argv, "--copy-config"]; + + try { + expect(() => main()).toThrow(/symlink or non-directory/); + expect(fs.existsSync(join(outside, "config.toml"))).toBe(false); + } finally { + fs.rmSync(linkedHome, { force: true }); + rmSync(outside, { recursive: true, force: true }); + } + }); + it("resolves host.docker.internal to 172.30.0.1 in TOML server URLs", () => { writeGatewayOutput({ github: { url: "http://host.docker.internal:80/mcp/github", headers: { Authorization: "token abc" } }, diff --git a/pkg/workflow/codex_config.go b/pkg/workflow/codex_config.go index 987441ece63..93a66e19d3b 100644 --- a/pkg/workflow/codex_config.go +++ b/pkg/workflow/codex_config.go @@ -269,11 +269,42 @@ func validateCodexManagedConfig(config *codexNativeConfig, firewallEnabled, gith func codexHome(workflowData *WorkflowData) string { if home := getEngineEnvOverrides(workflowData)["CODEX_HOME"]; home != "" { - return home + if isSafeCodexHome(home) { + return home + } } return constants.TmpMcpConfigDir } +func isSafeCodexHome(home string) bool { + if !path.IsAbs(home) || path.Clean(home) != home { + return false + } + if home == constants.TmpGhAwDir { + return true + } + prefix := constants.TmpGhAwDir + "/" + if !strings.HasPrefix(home, prefix) { + return false + } + for component := range strings.SplitSeq(strings.TrimPrefix(home, prefix), "/") { + if component == "" || component == "." || component == ".." { + return false + } + for _, char := range component { + if (char >= 'a' && char <= 'z') || + (char >= 'A' && char <= 'Z') || + (char >= '0' && char <= '9') || + char == '.' || char == '_' || char == '-' { + continue + } else { + return false + } + } + } + return true +} + func codexConfigEnv(workflowData *WorkflowData) map[string]string { result := make(map[string]string) if workflowData == nil || workflowData.EngineConfig == nil { diff --git a/pkg/workflow/codex_config_test.go b/pkg/workflow/codex_config_test.go index 831160391c5..5b94abb6154 100644 --- a/pkg/workflow/codex_config_test.go +++ b/pkg/workflow/codex_config_test.go @@ -11,6 +11,7 @@ import ( "strings" "testing" + "github.com/github/gh-aw/pkg/constants" "github.com/goccy/go-yaml" "github.com/pelletier/go-toml/v2" "github.com/stretchr/testify/assert" @@ -275,8 +276,10 @@ Complete the task. } func TestCodexGitHubDirectToolCatalogConfiguration(t *testing.T) { - dir := t.TempDir() - home := filepath.Join(dir, "custom-codex-home") + require.NoError(t, os.MkdirAll(constants.TmpGhAwDir, 0o700)) + home, err := os.MkdirTemp(constants.TmpGhAwDir, "custom-codex-home-") + require.NoError(t, err) + t.Cleanup(func() { _ = os.RemoveAll(home) }) cmd := exec.Command("node", "actions/setup/js/convert_gateway_config_codex.cjs", "--direct-tools") cmd.Dir = filepath.Join("..", "..") cmd.Env = append(os.Environ(), "CODEX_HOME="+home) @@ -317,6 +320,34 @@ func TestCodexGitHubDirectToolCatalogConfiguration(t *testing.T) { } } +func TestCodexHomeStaysWithinManagedTemporaryDirectory(t *testing.T) { + tests := []struct { + name string + home string + want string + }{ + {name: "default", want: constants.TmpMcpConfigDir}, + {name: "managed path", home: constants.TmpGhAwDir + "/custom", want: constants.TmpGhAwDir + "/custom"}, + {name: "managed nested path", home: constants.TmpGhAwDir + "/repo-memory/state/codex", want: constants.TmpGhAwDir + "/repo-memory/state/codex"}, + {name: "managed root", home: constants.TmpGhAwDir, want: constants.TmpGhAwDir}, + {name: "outside path", home: "/etc", want: constants.TmpMcpConfigDir}, + {name: "path traversal", home: constants.TmpGhAwDir + "/../../etc", want: constants.TmpMcpConfigDir}, + {name: "noncanonical path", home: constants.TmpGhAwDir + "/custom/../codex", want: constants.TmpMcpConfigDir}, + {name: "relative path", home: "../codex-home", want: constants.TmpMcpConfigDir}, + {name: "expression", home: "${{ github.event.issue.title }}", want: constants.TmpMcpConfigDir}, + {name: "prefixed expression", home: constants.TmpGhAwDir + "/${{ inputs.codex_dir }}", want: constants.TmpMcpConfigDir}, + {name: "shell substitution", home: constants.TmpGhAwDir + "/$(touch marker)", want: constants.TmpMcpConfigDir}, + {name: "whitespace", home: constants.TmpGhAwDir + "/codex home", want: constants.TmpMcpConfigDir}, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + data := &WorkflowData{EngineConfig: &EngineConfig{Env: map[string]string{"CODEX_HOME": test.home}}} + assert.Equal(t, test.want, codexHome(data)) + }) + } +} + func TestCodexNativeConfigShellEnvironment(t *testing.T) { data := &WorkflowData{ EngineConfig: &EngineConfig{Env: map[string]string{ @@ -356,6 +387,8 @@ func TestCodexNativeConfigCanonicalFiltersAcrossSetupModes(t *testing.T) { require.NoError(t, err) dir := t.TempDir() gatewayPath := filepath.Join(dir, "gateway.json") + codexHome := filepath.Join(constants.TmpGhAwDir, filepath.Base(dir), "codex-home") + t.Cleanup(func() { _ = os.RemoveAll(filepath.Dir(codexHome)) }) require.NoError(t, os.WriteFile(gatewayPath, []byte(`{"mcpServers":{"github":{"headers":{"Authorization":"fixture-token"}}}}`), 0o600)) args := []string{"actions/setup/js/convert_gateway_config_codex.cjs"} if mode != "gateway" { @@ -366,7 +399,7 @@ func TestCodexNativeConfigCanonicalFiltersAcrossSetupModes(t *testing.T) { cmd.Env = append(os.Environ(), "GH_AW_CODEX_CONFIG_JSON="+string(payload), "RUNNER_TEMP="+dir, - "CODEX_HOME="+filepath.Join(dir, "codex-home"), + "CODEX_HOME="+codexHome, "MCP_GATEWAY_OUTPUT="+gatewayPath, "MCP_GATEWAY_DOMAIN=gateway", "MCP_GATEWAY_PORT=80", @@ -443,6 +476,22 @@ func TestCodexExplicitProviderMarker(t *testing.T) { } } +func TestCodexExecutionEnvKeepsValidatedCodexHomeAfterOverrides(t *testing.T) { + data := &WorkflowData{ + EngineConfig: &EngineConfig{ + ID: "codex", + Env: map[string]string{"CODEX_HOME": "/tmp/outside-codex"}, + }, + SandboxConfig: &SandboxConfig{ + Agent: &AgentSandboxConfig{Env: map[string]string{"CODEX_HOME": constants.TmpGhAwDir + "/agent-codex"}}, + }, + } + + env := NewCodexEngine().buildCodexExecutionEnv(data, false, false, "MODEL") + + assert.Equal(t, constants.TmpMcpConfigDir, env["CODEX_HOME"]) +} + func TestCodexNativeConfigValidation(t *testing.T) { for _, config := range []string{ "[features]\nplugins = false\nplugins = true", diff --git a/pkg/workflow/codex_engine.go b/pkg/workflow/codex_engine.go index 169e055ca63..f5c0b68cacf 100644 --- a/pkg/workflow/codex_engine.go +++ b/pkg/workflow/codex_engine.go @@ -518,6 +518,7 @@ func (e *CodexEngine) buildCodexExecutionEnv(workflowData *WorkflowData, firewal applyCodexModelEnv(env, workflowData, modelConfigured, modelEnvVar) applyEngineCwdEnv(env, workflowData) applyEngineAndAgentEnv(env, workflowData, codexEngineLog) + env["CODEX_HOME"] = codexHome(workflowData) if isCodexAzureOIDC(workflowData) { // Non-secret launch policy; the harness also verifies fresh AWF reflection. env["GH_AW_CODEX_OIDC_AUTH"] = "azure" diff --git a/pkg/workflow/codex_engine_test.go b/pkg/workflow/codex_engine_test.go index d8487900af8..5abc3f93132 100644 --- a/pkg/workflow/codex_engine_test.go +++ b/pkg/workflow/codex_engine_test.go @@ -445,7 +445,7 @@ func TestCodexEngineRenderMCPConfig(t *testing.T) { `"container": "ghcr.io/github/github-mcp-server:` + string(constants.DefaultGitHubMCPServerVersion), `"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_MCP_SERVER_TOKEN"`, `"guard-policies"`, `"allow-only"`, `"startupTimeout": 120`, - `start_mcp_gateway.cjs`, `GH_AW_CODEX_CONFIG=`, `cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"`, + `start_mcp_gateway.cjs`, `GH_AW_CODEX_CONFIG=`, `convert_gateway_config_codex.cjs" --copy-config`, } { assert.Contains(t, generated.String(), fragment) } diff --git a/pkg/workflow/codex_mcp.go b/pkg/workflow/codex_mcp.go index 1711d125e6e..98ebed90e58 100644 --- a/pkg/workflow/codex_mcp.go +++ b/pkg/workflow/codex_mcp.go @@ -40,9 +40,7 @@ func (e *CodexEngine) RenderMCPConfig(yaml *strings.Builder, tools map[string]an yaml.WriteString(codexRunBlockIndent + "\n") yaml.WriteString(codexRunBlockIndent + "# Sync converter output to writable CODEX_HOME for Codex\n") - yaml.WriteString(codexRunBlockIndent + "mkdir -p \"${CODEX_HOME}\"\n") - yaml.WriteString(codexRunBlockIndent + "if [ \"${RUNNER_TEMP}/gh-aw/mcp-config/config.toml\" != \"${CODEX_HOME}/config.toml\" ]; then cp \"${RUNNER_TEMP}/gh-aw/mcp-config/config.toml\" \"${CODEX_HOME}/config.toml\"; fi\n") - yaml.WriteString(codexRunBlockIndent + "chmod 600 \"${CODEX_HOME}/config.toml\"\n") + yaml.WriteString(codexRunBlockIndent + `"$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config` + "\n") return nil } diff --git a/pkg/workflow/safe_outputs_mcp_integration_test.go b/pkg/workflow/safe_outputs_mcp_integration_test.go index af019bd8636..d2321ff2525 100644 --- a/pkg/workflow/safe_outputs_mcp_integration_test.go +++ b/pkg/workflow/safe_outputs_mcp_integration_test.go @@ -218,8 +218,8 @@ Test safe outputs workflow with Codex engine. if !strings.Contains(yamlStr, "convert_gateway_config_codex.cjs") { t.Error("Expected Codex gateway-to-native configuration converter") } - if !strings.Contains(yamlStr, `cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"`) { - t.Error("Expected generated Codex config to be copied to CODEX_HOME") + if !strings.Contains(yamlStr, `convert_gateway_config_codex.cjs" --copy-config`) { + t.Error("Expected generated Codex config to be copied securely to CODEX_HOME") } pinnedGhAwNodeImage := resolveMCPGatewayContainerImage(constants.DefaultGhAwNodeImage, nil) diff --git a/pkg/workflow/testdata/TestWasmGolden_AllEngines/codex.golden b/pkg/workflow/testdata/TestWasmGolden_AllEngines/codex.golden index 3694335fcbe..d00da625fa5 100644 --- a/pkg/workflow/testdata/TestWasmGolden_AllEngines/codex.golden +++ b/pkg/workflow/testdata/TestWasmGolden_AllEngines/codex.golden @@ -917,9 +917,7 @@ jobs: GH_AW_MCP_CONFIG_NORM_EOF # Sync converter output to writable CODEX_HOME for Codex - mkdir -p "${CODEX_HOME}" - if [ "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" != "${CODEX_HOME}/config.toml" ]; then cp "${RUNNER_TEMP}/gh-aw/mcp-config/config.toml" "${CODEX_HOME}/config.toml"; fi - chmod 600 "${CODEX_HOME}/config.toml" + "$(command -v node)" "${RUNNER_TEMP}/gh-aw/actions/convert_gateway_config_codex.cjs" --copy-config - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true