detectShell returns the appropriate shell and arguments based on the platform. It delegates to shellpath.DetectShell which uses absolute paths to prevent PATH hijacking (CWE-426).
()
| 547 | // It delegates to shellpath.DetectShell which uses absolute paths to prevent |
| 548 | // PATH hijacking (CWE-426). |
| 549 | func detectShell() (shell string, argsPrefix []string) { |
| 550 | return shellpath.DetectShell() |
| 551 | } |
| 552 | |
| 553 | // resolveWorkDir returns the effective working directory. |
| 554 | func (h *shellHandler) resolveWorkDir(cwd string) string { |