File: internal/config/config.go
Lines: 1210-1215
Severity: Medium
Problem
expandEnvs() expands A2A.Auth.APIKeys (plural slice) and A2A.Host but skips A2A.Auth.APIKey (singular field). Users using ${ENV_VAR} in a2a.auth.api_key get the literal string instead of the env var value. A2A authentication fails silently.
Trigger Scenario
- User sets
a2a.auth.api_key: "${MY_KEY}" in config YAML
expandEnvs() runs: expands APIKeys[] (plural) and Host, but NOT APIKey (singular)
c.A2A.Auth.APIKey still contains literal "${MY_KEY}" — not expanded
- A2A authentication sends literal
${MY_KEY} as the API key — fails silently
Expected vs Actual
- Expected: Both singular and plural API key fields are env-expanded
- Actual: Only the plural
APIKeys is expanded; singular APIKey is silently skipped
Fix
Add before the APIKeys loop:
c.A2A.Auth.APIKey = ExpandEnvWithLookup(c.A2A.Auth.APIKey, lookup)
File:
internal/config/config.goLines: 1210-1215
Severity: Medium
Problem
expandEnvs()expandsA2A.Auth.APIKeys(plural slice) andA2A.Hostbut skipsA2A.Auth.APIKey(singular field). Users using${ENV_VAR}ina2a.auth.api_keyget the literal string instead of the env var value. A2A authentication fails silently.Trigger Scenario
a2a.auth.api_key: "${MY_KEY}"in config YAMLexpandEnvs()runs: expandsAPIKeys[](plural) andHost, but NOTAPIKey(singular)c.A2A.Auth.APIKeystill contains literal"${MY_KEY}"— not expanded${MY_KEY}as the API key — fails silentlyExpected vs Actual
APIKeysis expanded; singularAPIKeyis silently skippedFix
Add before the APIKeys loop: