(env map[string]string, workflowData *WorkflowData)
| 573 | } |
| 574 | |
| 575 | func (e *CopilotEngine) addCopilotFinalStepEnv(env map[string]string, workflowData *WorkflowData) { |
| 576 | // Inject GH_AW_ENGINE_CWD when engine.cwd is configured. |
| 577 | applyEngineCwdEnv(env, workflowData) |
| 578 | applyEngineAndAgentEnv(env, workflowData, copilotExecLog) |
| 579 | // Always inject the Copilot integration ID for agentic workflows after all env merges |
| 580 | // so user-supplied env does not override this value. |
| 581 | env[constants.CopilotCLIIntegrationIDEnvVar] = constants.CopilotCLIIntegrationIDValue |
| 582 | // Add HTTP MCP header secrets to env for passthrough |
| 583 | for varName, secretExpr := range collectHTTPMCPHeaderSecrets(workflowData.Tools) { |
| 584 | if _, exists := env[varName]; !exists { |
| 585 | env[varName] = secretExpr |
| 586 | } |
| 587 | } |
| 588 | applyMCPScriptsSecretEnv(env, workflowData) |
| 589 | } |
| 590 | |
| 591 | func (e *CopilotEngine) addCopilotSandboxEnv(env map[string]string, sandboxEnabled bool) { |
| 592 | // Inject the dummy BYOK sentinel and AWF_REFLECT_ENABLED only when the AWF sandbox is active. |
no test coverage detected