-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
icmd: replace all usages of os/exec with golang.org/x/sys/execabs #218
Conversation
0bc7e7e
to
762f31e
Compare
https://blog.golang.org/path-security is interesting! #219 should fix the test-windows job. This is marked as a draft, but it seems to be working. Anything left to do? |
Project now started to do releases; this one was related to a security issue on Windows, replacing all usages of os/exec with golang.org/x/sys/execabs. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Nope! I just rebased to get rid of the other commits (well, doesn't really change, but it's confusing on GitHub otherwise); moving it out of draft |
Blogpost is indeed interesting; I was aware of similar things with dll's on Windows, but guess this one is a typical case of "common knowledge that we forgot about"; thought it wouldn't hurt to follow their recommendations (IMO, |
Following the changes in Go, and golang.org/x/tools themselves, this change ensures that packages using exec.LookPath or exec.Command to find or run binaries do not accidentally run programs from the current directory when they mean to run programs from the system PATH instead. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thank you!
go.mod: golang.org/x/tools v0.1.0
Project now started to do releases; this one was related to a
security issue on Windows, replacing all usages of os/exec with
golang.org/x/sys/execabs.
icmd: replace all usages of os/exec with golang.org/x/sys/execabs
Following the changes in Go, and golang.org/x/tools themselves, this change
ensures that packages using exec.LookPath or exec.Command to find or run
binaries do not accidentally run programs from the current directory when
they mean to run programs from the system PATH instead.