CaptureOutput executa comando e captura apenas a saída (para uso interno)
(ctx context.Context, shell string, args []string)
| 296 | |
| 297 | // CaptureOutput executa comando e captura apenas a saída (para uso interno) |
| 298 | func (e *CommandExecutor) CaptureOutput(ctx context.Context, shell string, args []string) ([]byte, error) { |
| 299 | cmd := exec.CommandContext(ctx, shell, args...) //#nosec G204 -- agent/CLI tool execution; commands validated by command_validator + policy_manager upstream |
| 300 | cmd.Stdin = os.Stdin |
| 301 | |
| 302 | output, err := cmd.CombinedOutput() |
| 303 | return output, err |
| 304 | } |
no outgoing calls
no test coverage detected