goyek / goyek

Task automation Go library

Home Page:https://pkg.go.dev/github.com/goyek/goyek/v2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove `A.Cmd`

pellared opened this issue · comments

The reasons to remove A.Cmd are the following:

  1. os/exec is not hardened by default. More: Go blog: Command PATH security in Go
  2. github.com/goyek/x/cmd covers most use cases. It can use golang.org/x/sys/execabs to be more secure.

Programs build using Go 1.19 has the fix in place. See https://pkg.go.dev/os/exec#hdr-Executables_in_the_current_directory and https://go.dev/blog/go1.19.

  1. Reduce the API surface. Users can use their own helpers or github.com/goyek/x/cmd.