You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mcp_setup_generator.go compiler does not include ACTIONS_ID_TOKEN_REQUEST_URL or ACTIONS_ID_TOKEN_REQUEST_TOKEN in the -e flags of the MCP_GATEWAY_DOCKER_COMMAND it generates. This means the MCP gateway container cannot mint GitHub OIDC tokens for HTTP MCP servers with auth: { type: github-oidc }.
This is the compiler-side counterpart to the firewall fix in gh-aw-firewall#1796. The firewall issue (gh-aw-firewall#1792) explicitly noted that both layers must be addressed:
The gh-aw compiler (mcp_setup_generator.go) is being fixed to include these vars in the docker run command it generates for the MCP gateway. However, the AWF firewall also controls which host environment variables reach the agent container, so both layers must be addressed.
The firewall layer was fixed (gh-aw-firewall#1796, shipped in v0.25.17), but the compiler layer was not. Issue #25224 was closed without a compiler-side PR.
Environment
gh-aw CLI: v0.68.0
gh-aw-firewall/agent: v0.25.18
gh-aw-mcpg: v0.2.17
Two-hop architecture
Host runner (has ACTIONS_ID_TOKEN_REQUEST_URL)
↓ docker-manager.ts forwards env vars (FIXED in firewall v0.25.17)
Agent/Firewall container (now has ACTIONS_ID_TOKEN_REQUEST_URL)
↓ MCP_GATEWAY_DOCKER_COMMAND executes "docker run -e VAR1 -e VAR2 ..."
MCP Gateway container (MISSING — no -e flag for OIDC vars)
The firewall fix ensures the OIDC vars reach the agent container. But the MCP gateway is a separate Docker container started via MCP_GATEWAY_DOCKER_COMMAND. Without explicit -e ACTIONS_ID_TOKEN_REQUEST_URL -e ACTIONS_ID_TOKEN_REQUEST_TOKEN flags in that command, the vars are not forwarded to the gateway.
Source code confirmation (v0.68.0)
pkg/workflow/mcp_setup_generator.go (lines 650–813): Builds the entire MCP_GATEWAY_DOCKER_COMMAND with ~40+ explicit -e env vars. Zero references to ACTIONS_ID_TOKEN_REQUEST_URL, ACTIONS_ID_TOKEN_REQUEST_TOKEN, OIDC, or github-oidc.
pkg/workflow/mcp_environment.go: Also has zero OIDC-related references. The collectMCPEnvironmentVariables function handles HTTP header secrets, safe-outputs, mcp-scripts, and GitHub MCP tokens — but has no code path for github-oidc auth.
standardEnvVars dedup list (lines 756–768): Does not include the OIDC vars.
Meanwhile, the gateway (gh-aw-mcpg) correctly validates these vars at startup:
internal/config/validation.go (lines 261–270): Fail-fast check for ACTIONS_ID_TOKEN_REQUEST_URL when auth.type == "github-oidc"
internal/launcher/launcher.go (lines 68–71): Initializes OIDC provider from os.Getenv("ACTIONS_ID_TOKEN_REQUEST_URL")
Proposed fix
In mcp_setup_generator.go, conditionally add the two OIDC env vars when any HTTP MCP server uses auth.type: "github-oidc":
// GitHub Actions OIDC env vars — required by the gateway to mint tokens// for servers with auth.type: "github-oidc" (spec §7.6.1)ifhasGitHubOIDCAuth {
containerCmd.WriteString(" -e ACTIONS_ID_TOKEN_REQUEST_URL")
containerCmd.WriteString(" -e ACTIONS_ID_TOKEN_REQUEST_TOKEN")
}
Also add them to the standardEnvVars dedup list to prevent duplicate -e flags.
A hasGitHubOIDCAuth boolean can be derived by iterating over the HTTP MCP tools and checking if any have auth.type == "github-oidc".
Workaround
Users can manually patch the compiled lock file to add -e ACTIONS_ID_TOKEN_REQUEST_URL -e ACTIONS_ID_TOKEN_REQUEST_TOKEN to the MCP_GATEWAY_DOCKER_COMMAND string after each gh aw compile. This must be re-applied after every recompile.
Summary
The
mcp_setup_generator.gocompiler does not includeACTIONS_ID_TOKEN_REQUEST_URLorACTIONS_ID_TOKEN_REQUEST_TOKENin the-eflags of theMCP_GATEWAY_DOCKER_COMMANDit generates. This means the MCP gateway container cannot mint GitHub OIDC tokens for HTTP MCP servers withauth: { type: github-oidc }.This is the compiler-side counterpart to the firewall fix in gh-aw-firewall#1796. The firewall issue (gh-aw-firewall#1792) explicitly noted that both layers must be addressed:
The firewall layer was fixed (gh-aw-firewall#1796, shipped in v0.25.17), but the compiler layer was not. Issue #25224 was closed without a compiler-side PR.
Environment
gh-awCLI: v0.68.0gh-aw-firewall/agent: v0.25.18gh-aw-mcpg: v0.2.17Two-hop architecture
The firewall fix ensures the OIDC vars reach the agent container. But the MCP gateway is a separate Docker container started via
MCP_GATEWAY_DOCKER_COMMAND. Without explicit-e ACTIONS_ID_TOKEN_REQUEST_URL -e ACTIONS_ID_TOKEN_REQUEST_TOKENflags in that command, the vars are not forwarded to the gateway.Source code confirmation (v0.68.0)
pkg/workflow/mcp_setup_generator.go(lines 650–813): Builds the entireMCP_GATEWAY_DOCKER_COMMANDwith ~40+ explicit-eenv vars. Zero references toACTIONS_ID_TOKEN_REQUEST_URL,ACTIONS_ID_TOKEN_REQUEST_TOKEN,OIDC, orgithub-oidc.pkg/workflow/mcp_environment.go: Also has zero OIDC-related references. ThecollectMCPEnvironmentVariablesfunction handles HTTP header secrets, safe-outputs, mcp-scripts, and GitHub MCP tokens — but has no code path forgithub-oidcauth.standardEnvVarsdedup list (lines 756–768): Does not include the OIDC vars.Meanwhile, the gateway (
gh-aw-mcpg) correctly validates these vars at startup:internal/config/validation.go(lines 261–270): Fail-fast check forACTIONS_ID_TOKEN_REQUEST_URLwhenauth.type == "github-oidc"internal/launcher/launcher.go(lines 68–71): Initializes OIDC provider fromos.Getenv("ACTIONS_ID_TOKEN_REQUEST_URL")Proposed fix
In
mcp_setup_generator.go, conditionally add the two OIDC env vars when any HTTP MCP server usesauth.type: "github-oidc":Also add them to the
standardEnvVarsdedup list to prevent duplicate-eflags.A
hasGitHubOIDCAuthboolean can be derived by iterating over the HTTP MCP tools and checking if any haveauth.type == "github-oidc".Workaround
Users can manually patch the compiled lock file to add
-e ACTIONS_ID_TOKEN_REQUEST_URL -e ACTIONS_ID_TOKEN_REQUEST_TOKENto theMCP_GATEWAY_DOCKER_COMMANDstring after eachgh aw compile. This must be re-applied after every recompile.References
ACTIONS_ID_TOKEN_REQUEST_URL/ACTIONS_ID_TOKEN_REQUEST_TOKENenv vars #25224 (closed, but compiler fix was not included)pkg/workflow/mcp_setup_generator.go(lines ~650–813)pkg/workflow/mcp_environment.go(collectMCPEnvironmentVariables)