(workflowData *WorkflowData, tools map[string]any, safeOutputs *SafeOutputsConfig, mcpScripts *MCPScriptsConfig)
| 117 | } |
| 118 | |
| 119 | func buildCLIWorkflowDataForMounts(workflowData *WorkflowData, tools map[string]any, safeOutputs *SafeOutputsConfig, mcpScripts *MCPScriptsConfig) *WorkflowData { |
| 120 | if workflowData == nil { |
| 121 | workflowData = &WorkflowData{} |
| 122 | } |
| 123 | |
| 124 | copied := *workflowData |
| 125 | if copied.Tools == nil { |
| 126 | copied.Tools = tools |
| 127 | } |
| 128 | if copied.SafeOutputs == nil { |
| 129 | copied.SafeOutputs = safeOutputs |
| 130 | } |
| 131 | if copied.MCPScripts == nil { |
| 132 | copied.MCPScripts = mcpScripts |
| 133 | } |
| 134 | if copied.ParsedTools == nil && copied.Tools != nil { |
| 135 | copied.ParsedTools = NewTools(copied.Tools) |
| 136 | } |
| 137 | |
| 138 | return &copied |
| 139 | } |
| 140 | |
| 141 | // hasBashRestrictedAllowlist reports true when tools contains an explicit, finite bash |
| 142 | // command allowlist (not a wildcard). Used to decide whether implicit commands must be |
no test coverage detected