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
In #29378, the recommendation was to use engine.env secrets for BYOK variables, and it was confirmed that gh aw compile correctly handles these without treating them as unsafe.
However, gh aw upgrade was not updated with the same logic — it specifically flags COPILOT_PROVIDER_API_KEY as a security violation and removes it, producing:
✓ grumpy-reviewer.md
• Remove unsafe secrets from engine.env
Run gh aw compile — passes without security warning ✅
Run gh aw upgrade — removes COPILOT_PROVIDER_API_KEY from engine.env with the unsafe secrets warning ❌
Expected Behavior
gh aw upgrade should apply the same allowlist/security rules as gh aw compile and not strip COPILOT_PROVIDER_API_KEY from engine.env, since it is explicitly required for BYOK to function.
Actual Behavior
gh aw upgrade removes COPILOT_PROVIDER_API_KEY from engine.env and outputs:
✓ grumpy-reviewer.md
• Remove unsafe secrets from engine.env
Additional Context
Only COPILOT_PROVIDER_API_KEY is stripped — COPILOT_PROVIDER_BASE_URL and COPILOT_MODEL are left untouched.
Bug Report
Description
In #29378, the recommendation was to use
engine.envsecrets for BYOK variables, and it was confirmed thatgh aw compilecorrectly handles these without treating them as unsafe.However,
gh aw upgradewas not updated with the same logic — it specifically flagsCOPILOT_PROVIDER_API_KEYas a security violation and removes it, producing:Steps to Reproduce
.mdfile with the BYOK pattern as recommended in docs: COPILOT_PROVIDER_* variables not documented and strict-mode allowlist not updated #29378:gh aw compile— passes without security warning ✅gh aw upgrade— removesCOPILOT_PROVIDER_API_KEYfromengine.envwith the unsafe secrets warning ❌Expected Behavior
gh aw upgradeshould apply the same allowlist/security rules asgh aw compileand not stripCOPILOT_PROVIDER_API_KEYfromengine.env, since it is explicitly required for BYOK to function.Actual Behavior
gh aw upgraderemovesCOPILOT_PROVIDER_API_KEYfromengine.envand outputs:Additional Context
COPILOT_PROVIDER_API_KEYis stripped —COPILOT_PROVIDER_BASE_URLandCOPILOT_MODELare left untouched.compilepath. Theupgradecommand has its own separate validation that was not updated.compilesucceeds cleanly whileupgraderemoves the key that makes BYOK work.