Improve Gotsha sign-off and notes handling - #85
Conversation
|
Requesting changes for one blocking security regression.
Those strings are executed through Please avoid building these commands with string interpolation. The safest fix is to stop invoking Git through a shell for these lookups and instead pass argv directly, or at minimum validate/escape the branch name before embedding it in the command. |
Extract RemoteResolver module that uses Open3.capture2 (argv array) instead of interpolating branch names into shell commands via BashCommand.run!. This closes a local code execution vector where a branch name containing shell metacharacters (e.g. $(whoami)) would be evaluated by bash when running gotsha fetch or gotsha push. Also deduplicates the identical remote method from Fetch and Push.
Summary