feat: forward OIDC env vars into agent container#1796
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes GitHub Actions OIDC-based authentication inside the AWF agent container by forwarding the Actions OIDC environment variables in the default (non---env-all) env passthrough logic.
Changes:
- Forward
ACTIONS_ID_TOKEN_REQUEST_URLandACTIONS_ID_TOKEN_REQUEST_TOKENinto the agent container when present. - Add unit tests to verify both variables are forwarded when set and omitted when absent.
Show a summary per file
| File | Description |
|---|---|
| src/docker-manager.ts | Adds conditional forwarding for GitHub Actions OIDC env vars in the default env passthrough block. |
| src/docker-manager.test.ts | Adds tests covering OIDC env var forwarding/omission behavior. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 0
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (1 files)
Coverage comparison generated by |
Smoke Test Results✅ GitHub MCP: fix: add retry logic to apt-get upgrade in agent Dockerfile (#1781), fix: share mcpg network namespace to fix TLS hostname verification (#1778) Overall: PASS
|
Smoke Test: GitHub Actions Services Connectivity
All checks passed. (
|
Chroot Runtime Version Comparison
Result: FAILED — Python and Node.js versions differ between host and chroot environment. Go matches. The
|
|
Smoke Test Results (Codex)
|
🤖 Smoke Test Results — PASS
PR: feat: forward OIDC env vars into agent container
|
MCP servers with
auth.type: 'github-oidc'fail inside the AWF agent container becauseACTIONS_ID_TOKEN_REQUEST_URLandACTIONS_ID_TOKEN_REQUEST_TOKENare not in the default env var allowlist. Only--env-allwould pick them up.Changes
src/docker-manager.ts: Forward both OIDC variables in the default (non---env-all) env forwarding block, conditional on presence — same pattern asGITHUB_TOKEN,GITHUB_SERVER_URL, etc.src/docker-manager.test.ts: Three tests covering forwarding when present and omission when absent.No domain allowlist changes needed — callers using OIDC must already have
token.actions.githubusercontent.comin--allow-domains.